Blame SOURCES/docbook-simple.README.redhat

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