Blame SOURCES/docbook-simple.README.redhat

8be206
docbook-simple - basic distribution howto
8be206
-----------------------------------------
8be206
8be206
The Simplified DocBook XML DTD is a small subset of the DocBook XML
8be206
DTD having only ~100 elements. The full version has ~380 elements.
8be206
8be206
Online documentation of the content models for this dtd is here:
8be206
 http://www.oasis-open.org/docbook/xml/simple/
8be206
8be206
This DTD only supports simple documents, e.g. 'article' or 'refentry',
8be206
rather than the more complex documents like 'book' or 'set' which is
8be206
supported by the full docbook DTD.
8be206
8be206
Simplified DocBook documents can be viewed in a browser (w/o requiring
8be206
XSLT processing) and can be styled with a CSS stylesheet, which can be
8be206
specified in the document itself with an XML Processing Instruction
8be206
(PI) of the form:
8be206
8be206
8be206
8be206
The default stylesheet generates quite plain output and should likely
8be206
be customized. Section III below gives an example of how to reference
8be206
the CSS stylesheet in your source document.
8be206
8be206
8be206
I. How To Write An Article That Uses The Simplified Docbook DTD:
8be206
================================================================
8be206
8be206
Use the following prolog in your XML file to use the Simplified
8be206
DocBook Document Type in your document:
8be206
8be206
8be206
8be206
     PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN"
8be206
     "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd">
8be206
<article>
8be206
...
8be206
</article>
8be206
8be206
8be206
II. How To Write A Manual Page That Uses The Simplified DocBook DTD:
8be206
====================================================================
8be206
8be206
The sdocbookref.dtd provides a simplified subset of DocBook to support
8be206
writing manual pages.
8be206
8be206
Use the following prolog in your XML file to use the Simplified
8be206
DocBook Document Type in your document:
8be206
8be206
8be206
8be206
     PUBLIC "-//OASIS//DTD Simplified DocBook RefEntry XML V1.1//EN"
8be206
     "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbookref.dtd">
8be206
<refentry>
8be206
...
8be206
</refentry>
8be206
8be206
8be206
III. How To Associate A CSS Stylesheet To Your Simplified Docbook Document:
8be206
===========================================================================
8be206
8be206
Simply place the xml-stylesheet PI in the prolog of the doc as follows:
8be206
8be206
8be206
8be206
8be206
     PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN"
8be206
     "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd">
8be206
<article>
8be206
...
8be206
</article>
8be206
8be206
You may place the stylesheet wherever you please, as long as the path
8be206
to the stylesheet in the PI is correct with respect to the HTML output
8be206
files.
8be206
8be206
8be206
IV. Generating HTML From Your XML Source Document:
8be206
==================================================
8be206
8be206
Before processing your document, you might wish to take a look at some
8be206
of the HTML stylesheet parameters you can set to customize the output
8be206
HTML. These parameters are all explained in the reference
8be206
documentation included with the docbook-style-xsl package. In
8be206
addition, you may wish to take a peek at the
8be206
/usr/share/sgml/docbook/xsl-stylesheets/html/param.xsl file, which
8be206
lists the defaults for the HTML parameters.
8be206
8be206
For example, to generate a bunch of linked HTML pages (aka chunked)
8be206
from your XML source document while setting the parameter
8be206
'toc.section.depth' to a value of '2', you can issue an xsltproc
8be206
command like the following:1
8be206
8be206
xsltproc --stringparam toc.section.depth 2 \
8be206
	 /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl \
8be206
	 sourcefile.xml
8be206
8be206
*Note: I do not cover the conversion to print output in this README,
8be206
        as the print toolchains are slightly more complicated.
8be206
8be206
8be206
Feel free to offer comments, suggestions, or complaints.
8be206
8be206
     Mark
8be206
8be206
8be206
 -- Mark Johnson <mjohnson@redhat.com>, Tue Sep  7 15:51:51 EDT 2004
8be206
 --changes for 1.1 by Ondrej Vasik <ovasik@redhat.com>, Thu May 24 2007