old-www/LDP/LDP-Author-Guide/html/markup.html

279 lines
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Markup: A General Overview</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="LDP Author Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Markup"
HREF="ag-markup.html"><LINK
REL="PREVIOUS"
TITLE="Markup"
HREF="ag-markup.html"><LINK
REL="NEXT"
TITLE="DocBook: What it is and why we use it"
HREF="docbook-why.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>LDP Author Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ag-markup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 5. Markup</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="docbook-why.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="markup"
></A
>5.1. Markup: A General Overview</H1
><P
>&#13; A markup language is a system for marking or tagging a document to
define the structure of the document. You may add tags to your document
to define which parts of your document are paragraphs, titles,
sections, glossary items (the list goes on!).
There are many markup languages in use today. XHTML and HTML will be
familiar to those who author web documents. The LDP uses a markup
language known as DocBook. Each of these markup languages uses its own
<SPAN
CLASS="QUOTE"
>"controlled vocabulary"</SPAN
> to describe documents. For
example: in XHTML a paragraph would be marked up with the tagset
&#60;p&#62;&#60;/p&#62; while in DocBook a paragraph would be marked up
with <TT
CLASS="sgmltag"
>&#60;para&#62;</TT
><TT
CLASS="sgmltag"
>&#60;/para&#62;</TT
>. The tagsets are defined in a quasi
dictionary known as a Document Type Definition (DTD).
</P
><P
>&#13; Markup languages also follow a set of rules on how a document
can be assembled. The rules are either SGML (Standard Generalized
Markup Language) or XML (eXtensible Markup Language). These rules are
essentially the <SPAN
CLASS="QUOTE"
>"grammar"</SPAN
> of a document's markup. SGML and
XML are very similiar. XML is a sub-set of SGML, but XML requires more
precise use of the tags when marking up a document.
The LDP accepts both SGML and XML documents, but prefers XML.
</P
><P
>There are three components to an XML/SGML document which is read by a
person.</P
><P
></P
><UL
><LI
><DIV
CLASS="formalpara"
><P
><B
>Content. </B
>
As a TLDP author it is good to remember
that this is the most important piece. Many authors will
write the content first and add their markup later. Content
may include both plain text and graphics. This is the only part that
is required of LDP authors!
</P
></DIV
></LI
><LI
><DIV
CLASS="formalpara"
><P
><B
>Markup. </B
>
To describe the structure of a document a controlled
vocabulary is added on top of the content. It is used to
distinguish different kinds of content: paragraphs,
lists, tables, warnings (and so on). The markup must also conform to
either SGML or XML rules. If you are not comfortable
adding markup to your document, a TLDP volunteer will do it for you.
</P
></DIV
></LI
><LI
><DIV
CLASS="formalpara"
><P
><B
>Transformation. </B
>
Finally the document is transformed from DocBook to PDF, HTML,
PostScript for display in digital or paper form. This transformation is controlled
through the Document Style Semantics and Specification
Language (DSSSL).
The DSSSL tells the program doing the transformation how to
convert the raw markup into something that a human can read.
The LDP uses a series of scripts to automate these transformations.
You are not required to transform your own documents.
</P
></DIV
></LI
></UL
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Content, markup and transformations</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Steve Champeon does a great job of
explaining how content, markup languages, and transformations all fit
together in his article <A
HREF="http://hotwired.lycos.com/webmonkey/02/42/index4a.html"
TARGET="_top"
>The
Secret Life of Markup</A
>. Although he is writing from an HTML
perspective, the ideas are relevant and there is an example of DocBook markup.</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ag-markup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="docbook-why.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Markup</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ag-markup.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>DocBook: What it is and why we use it</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>