XWEB"> ]>
Literate DocBook XML Stylesheets Part of Literate Programming in XML 05 Oct 2001 $Id: ldocbook.xweb,v 1.4 2002/01/06 19:27:56 nwalsh Exp $ 0.1 05 Oct 2001 ndw Initial draft. NormanWalsh The ldocbook.xsl stylesheet transforms an &xweb; documentation file (a woven &xweb; document) into HTML documentation. This stylesheet assumes that fragments appear inside DocBook section elements. Some additional customization of the and will be required to support a different organization.
The Stylesheets This document describes both the HTML and XSL Formatting Objects versions of the stylesheet.
The HTML Stylesheet The stylesheet performs some initialization and establishes templates for the Literate Programming elements that can appear in the documentation. Most of the documentation elements will be DocBook elements handled by the imported stylesheet.
The Chunking HTML Stylesheet The stylesheet performs some initialization and establishes templates for the Literate Programming elements that can appear in the documentation. Most of the documentation elements will be DocBook elements handled by the imported stylesheet.
The FO Stylesheet The stylesheet performs some initialization and establishes templates for the Literate Programming elements that can appear in the documentation. Most of the documentation elements will be DocBook elements handled by the imported stylesheet.
Initialization The stylesheet initializes the processor by loading its version information (stored in a separate file because it is shared by several stylesheets), importing the base DocBook stylesheet, setting some parameters, and setting up some internationalized text.
Parameters In DocBook Literate Programming documentation, we always number sections and verbatim environments.
Localization Localized text in the DocBook stylesheets makes use of an external document to determine the nature of, among other things, element titles and cross references. Cross references to src:fragments are not supported in the stock stylesheets (since there is no such element in DocBook). In order to make cross references work properly, we must provide an appropriate localization for src:fragment titles. We do this by pointing the local.l10n.xml at ourselves (at the stylesheet document). In our local localization document, we add an l:i18n element to provide the necessary context. If you want to support DocBook Literate Programming in other languages, this section will have to be updated.
Process HTML Fragments Fragments are output as verbatim environments with numbered lines, if possible. A table is used to make the listings stand out. Fragment labels and titles must also be supported.
Fragment Labels A fragment label consists of a section mark followed by the label of the current section and the number of the fragment within that section. § .
Fragment Titles A fragment title is the title of the section that contains it.
Process FO Fragments Fragments are output as verbatim environments with numbered lines, if possible. : ,
Process HTML Fragment References A fragment reference has exactly the same semantics as a DocBook xref.
Fragment Cross-Reference Text Cross references to fragments produce the fragment label and title. .
Process FO Fragment References A fragment reference has exactly the same semantics as a DocBook xref.
Fragment Cross-Reference Text Cross references to fragments produce the fragment label and title. .