The Modular DocBook Stylesheets

Norman Walsh

This software may be distributed under the same terms as Jade:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Except as contained in this notice, the names of individuals credited with contribution to this software shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the individuals in question.

Any stylesheet derived from this Software that is publically distributed will be identified with a different name and the version strings in any derived Software will be changed so that no possibility of confusion between the derived package and this Software will exist.

Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Questions and Comments

Please direct all questions, bug reports, or suggestions for changes to Norman Walsh, <ndw@nwalsh.com>.

See http://nwalsh.com/docbook/dsssl/ for more information.


Table of Contents
1. Installation and Setup
Installing Jade
Installing the DocBook DTD
Installing the Modular DocBook Stylesheets
2. Customizing the Stylesheets
Writing Your Own Driver
Changing the Localization
A Single Stylesheet for Both Print and HTML
Customizing the Title Page
Using the Stylesheets with XML
3. The Print Stylesheet
Documentation
Change Log
4. The HTML Stylesheet
Documentation
Change Log
5. The Common Module
Change Log
6. The Library Module
Change Log
I. DSSSL Library
trim-string — Trims the tail off of a string
node-list-filter-by-not-gi — Returns selected elements from a node list
%library-version% — Defines the library version string
node-list-filter-by-gi — Returns selected elements from a node list
node-list-filter-elements — Returns the elements in 'nodelist'
list-member-find — Returns the index of an element in a list
list->string — Converts a list of characters into a string
normalize — Normalize the str according to the SGML declaration in effect
url-encode-char — Returns the url-encoded equivalent of a character
sgml-root-element — Returns the node that is the root element of the current document
repl-substring-list-target — Return the target that matches in a string
map — Implements map
default-lowercase-list — The default list of lowercase characters
node-list-filter-out-pis — Returns the nodelist with all PIs removed
find-first-char — Find the first occurance of a character in a string
expt — Exponentiation
repl-substring — Replace substring in a string
default-uppercase-list — The default list of uppercase characters
parse-skip-pi-attribute — no documented purpose
match-split — Splits string at target and returns the resulting list of tokens
string-list-sosofo — Build sosofo from a list of strings and an associative list
file-extension — Return the extension of a filename
x-absolute-child-number — Returns the absolute child number of the specified node
url-encode-string — Returns str with all special characters %-encoded
repl-substring? — Returns true if the specified substring can be replaced
assoc-objs — Returns a list of the objects in an associative list
parse-starttag-pi — Parses a structured PI and returns a list of values
dingbat — Map dingbat names to Unicode characters
case-fold-down-charlist — Return the list of characters, shifted to lowercase
siblings — Implements siblings as per ISO/IEC 10179:1996
repl-substring-list? — Perform repl-substring? with a list of target/replacement pairs
string-index — Finds first occurance of 'target' in 'source'
unit-conversion-alist — Defines the base length of specific unit names
has-ancestor-member? — Returns true if the specified node has one of a set of GIs as an ancestor
length-string-number-part — Returns the numeric part of a length string
ancestor-member — Returns the first ancestor in a list of GIs
measurement-to-length — Convert a measurement to a length
case-fold-up-charlist — Return the list of characters, shifted to uppercase
repl-substring-list — Replace the first target in the replacement list that matches
split — Splits string at whitespace and returns the resulting list of tokens
string->list — Converts a string into a list of characters.
node-list-last — Implements node-list-last as per ISO/IEC 10179:1996
join — Joins a list of strings together
strip — Strip leading and trailing characters off of a string
match-split-string-list — Splits each string in a list of strings and returns the concatenated result list
constant-list — Returns a list of the specified value
node-list-reduce — Implements node-list-reduce as per ISO/IEC 10179:1996
length-string-unit-part — Returns the unit part of a length string
directory-depth — Count the directory depth of a path name
string-with-space — Returns string with a space appended or the empty string
pad-string — Pads a string, in front, to the specified length
assoc — Returns the association of an object in an associative list
my-debug — A debugging function more helpful than (debug)
ipreced — Implements ipreced as per ISO/IEC 10179:1996
ifollow — Implements ifollow as per ISO/IEC 10179:1996
match-substitute-sosofo — Return matching sosofo from associative list
nth-node — Return a specific node in a node list (by numeric index)
case-fold-down-char — Return the lowercase form of a single character
copy-string — Return a string duplicated a specified number of times
string-replace — Replace all occurances of a target substring in a string
case-fold-up — Shift a string to uppercase
parse-pi-attribute — no documented purpose
list-put — Replace a specific member of a list
node-list->string — Return a string representation of the node list
absolute-child-number — Returns the absolute child number of the specified node
node-list-last-element — Return the last element node in a node list
string-replace-list — Replace a list of target substrings in a string
repl-substring-list-repl — Return the replacement that would be used in the string
case-fold-up-char — Return the uppercase form of a single character
descendant-of? — Returns true if the child is some descendant of the specified node
system-id-filename — Returns the filename part of the system id of target
parse-measurement — Parse a string containing a measurement and return the magnitude and units
match-split-list — Splits a string at a list of targets and returns the resulting list of tokens
include-file — Return the literal content of fileref
case-fold-down — Shift a string to lowercase
expand-children — Expand selected nodes in a node list
decrement-list-members — Decrement each member of a list
component-child-number — Find child-number within a component
node-list-first-element — Return the first element node in a node list
list-head — Return the head of a list
II. DocBook HTML Parameters
%gentext-nav-use-ff% — Add "fast-forward" to the navigation links?
%titlepage-in-info-order% — Place elements on title page in document order?
%admon-graphics-path% — Path to admonition graphics
nochunks — Suppress chunking of output pages
%shade-verbatim% — Should verbatim environments be shaded?
%default-title-end-punct% — Default punctuation at the end of a run-in head.
%generate-set-titlepage% — Should a set title page be produced?
%html-pubid% — What public ID are you declaring your HTML compliant with?
%olink-sysid% — Portion of the URL which identifies the system identifier
%olink-fragid% — Portion of the URL which identifies the fragment identifier
%generate-set-toc% — Should a Table of Contents be produced for Sets?
%stylesheet-type% — The type of the stylesheet to use
%section-autolabel% — Are sections enumerated?
%generate-part-toc% — Should a Table of Contents be produced for Parts?
$admon-graphic-width$ — Admonition graphic file width
%html-header-tags% — What additional HEAD tags should be generated?
%olink-outline-ext% — Extension for olink outline file
$table-element-list$ — List of table element names
biblio-number — Enumerate bibliography entries
%stylesheet% — Name of the stylesheet to use
html-index-filename — Name of HTML index file
%admon-graphics% — Use graphics in admonitions?
%css-liststyle-alist% — Map DocBook OVERRIDE and MARK attributes to CSS
%chapter-autolabel% — Are chapters enumerated?
%simplelist-column-width% — Width of columns in tabular simple lists
%generate-book-titlepage% — Should a book title page be produced?
%html-ext% — Default extension for HTML output files
%refentry-generate-name% — Output NAME header before 'RefName'(s)?
%generate-part-toc-on-titlepage% — Should the Part TOC appear on the Part title page?
%generate-reference-toc% — Should a Table of Contents be produced for References?
%cals-table-class% — Class attribute for CALS tables
html-manifest — Write a manifest?
%css-decoration% — Enable CSS decoration of elements
%olink-pubid% — Portion of the URL which identifies the public identifier
%default-quadding% — The default quadding
%gentext-nav-tblwidth% — If using tables for navigation, how wide should the tables be?
%linenumber-length% — Width of line numbers in enumerated environments
%refentry-function% — Are 'RefEntry's functions?
%author-othername-in-middle% — Author OTHERNAME appears between FIRSTNAME and SURNAME?
%content-title-end-punct% — List of punctuation chars at the end of a run-in head
%number-synopsis-lines% — Enumerate lines in a 'Synopsis'?
%footnotes-at-end% — Should footnotes appear at the end of HTML pages?
%spacing-paras% — Block-element spacing hack
$legalnotice-link-file$ — Name of output file for legal notices
%generate-reference-toc-on-titlepage% — Should the Reference TOC appear on the Reference title page?
%number-programlisting-lines% — Enumerate lines in a 'ProgramListing'?
%funcsynopsis-style% — What style of 'FuncSynopsis' should be generated?
%force-chapter-toc% — Force a chapter TOC even if it includes only a single entry
%writing-mode% — The writing mode
%use-id-as-filename% — Use ID attributes as name for component HTML files?
%fix-para-wrappers% — Block element in para hack
%generate-legalnotice-link% — Should legal notices be a link to a separate file?
%generate-part-titlepage% — Should a part title page be produced?
html-index — HTML indexing?
%olink-resolution% — URL script for OLink resolution
%link-mailto-url% — Mailto URL for LINK REL=made
%number-address-lines% — Enumerate lines in a 'Address'?
biblio-filter-used — Suppress unreferenced bibliography entries
biblio-citation-check — Check citations
%generate-article-titlepage% — Should an article title page be produced?
$generate-book-lot-list$ — Which Lists of Titles should be produced for Books?
%funcsynopsis-decoration% — Decorate elements of a FuncSynopsis?
%number-literallayout-lines% — Enumerate lines in a 'LiteralLayout'?
html-manifest-filename — Name of HTML manifest file
$linenumber-space$ — Returns the sosofo which separates line numbers from the text
%annotate-toc% — Annotate TOC entries
%generate-article-toc% — Should a Table of Contents be produced for Articles?
$generate-chapter-toc$ — Should a Chapter Table of Contents be produced?
%default-simplesect-level% — Default section level for 'SimpleSect's.
%generate-partintro-on-titlepage% — Should the PartIntro appear on the Part/Reference title page?
%linenumber-padchar% — Pad character in line numbers
%callout-default-col% — Default column for callouts
%root-filename% — Name for the root HTML document
%gentext-nav-use-tables% — Use tables to build the navigation headers and footers?
%generate-reference-titlepage% — Should a reference title page be produced?
$shade-verbatim-attr$ — Attributes used to create a shaded verbatim environment.
$table-width$ — Calculate table width
%body-attr% — What attributes should be hung off of BODY?
%generate-book-toc% — Should a Table of Contents be produced for Books?
$admon-graphic$ — Admonition graphic file
$object-titles-after$ — List of objects who's titles go after the object
%graphic-default-extension% — Default extension for graphic FILEREFs
%graphic-extensions% — List of graphic filename extensions
%number-funcsynopsisinfo-lines% — Enumerate lines in a 'FuncSynopsisInfo'?
%number-screen-lines% — Enumerate lines in a 'Screen'?
%linenumber-mod% — Controls line-number frequency in enumerated environments.
III. DocBook Print Parameters
%page-height% — no documented purpose
%titlepage-in-info-order% — Place elements on title page in document order?
%admon-graphics-path% — Path to admonition graphics
%generate-heading-level% — Output RTF heading level characteristics?
%kr-funcsynopsis-indent% — Indent-depth in K&R-style function synopses
%default-title-end-punct% — Default punctuation at the end of a run-in head.
%generate-set-titlepage% — Should a set title page be produced?
%visual-acuity% — General measure of document text size
%para-indent% — First line start-indent for paragraphs (other than the first)
%article-page-number-restart% — Restart page numbers in each article?
%generate-set-toc% — Should a Table of Contents be produced for Sets?
%body-start-indent% — Default indent of body text
%ss-size-factor% — Super/subscript scaling factor
%section-autolabel% — Are sections enumerated?
%component-title-quadding% — Component title quadding
%callout-fancy-bug% — Use fancy callout bugs?
%chap-app-running-head-autolabel% — Put chapter labels in running heads?
%head-after-factor% — Factor used to calculate space below a title
%head-before-factor% — Factor used to calculate space above a title
%body-font-family% — The font family used in body text
%generate-part-toc% — Should a Table of Contents be produced for Parts?
$admon-graphic-width$ — Admonition graphic file width
%generate-article-toc-on-titlepage% — Should the Article TOC appear on the Article title page?
%page-number-restart% — Restart page numbers in each component?
%component-subtitle-quadding% — Component subtitle quadding
%olink-outline-ext% — Extension for olink outline file
%section-subtitle-quadding% — Section subtitle quadding
%right-margin% — Width of the right margin
$table-element-list$ — List of table element names
biblio-number — Enumerate bibliography entries
%mono-font-family% — The font family used in verbatim environments
%admon-graphics% — Use graphics in admonitions?
%chapter-autolabel% — Are chapters enumerated?
%simplelist-column-width% — Width of columns in tabular simple lists
%verbatim-size-factor% — Verbatim font scaling factor
%generate-book-titlepage% — Should a book title page be produced?
%text-width% — no documented purpose
%refentry-generate-name% — Output NAME header before 'RefName'(s)?
%generate-part-toc-on-titlepage% — Should the Part TOC appear on the Part title page?
%division-subtitle-quadding% — Division subtitle quadding
%generate-reference-toc% — Should a Table of Contents be produced for References?
%generate-article-titlepage-on-separate-page% — Should the article title page be on a separate page?
%default-quadding% — The default quadding
%linenumber-length% — Width of line numbers in enumerated environments
%refentry-keep% — Keep RefEntrys together?
%refentry-function% — Are 'RefEntry's functions?
%author-othername-in-middle% — Author OTHERNAME appears between FIRSTNAME and SURNAME?
%content-title-end-punct% — List of punctuation chars at the end of a run-in head
%number-synopsis-lines% — Enumerate lines in a 'Synopsis'?
%paper-type% — Name of paper type
%para-indent-firstpara% — First line start-indent for the first paragraph
%two-side% — Is two-sided output being produced?
%bf-size% — no documented purpose
%number-programlisting-lines% — Enumerate lines in a 'ProgramListing'?
%hsize-bump-factor% — Font scaling factor
%refentry-new-page% — 'RefEntry' starts on new page?
%generate-reference-toc-on-titlepage% — Should the Reference TOC appear on the Reference title page?
%funcsynopsis-style% — What style of 'FuncSynopsis' should be generated?
%title-font-family% — The font family used in titles
%writing-mode% — The writing mode
%guilabel-font-family% — The font family used in GUI labels
%verbatim-default-width% — Default width of verbatim environments
%para-sep% — Distance between paragraphs
%generate-part-titlepage% — Should a part title page be produced?
%ss-shift-factor% — Super/subscript shift factor
%section-title-quadding% — Section title quadding
%block-sep% — Distance between block-elements
%admon-font-family% — The font family used in admonitions
biblio-filter-used — Suppress unreferenced bibliography entries
%number-address-lines% — Enumerate lines in a 'Address'?
%smaller-size-factor% — Smaller font scaling factor
%page-n-columns% — Sets the number of columns on each page
biblio-citation-check — Check citations
%line-spacing-factor% — Factor used to calculate leading
%generate-article-titlepage% — Should an article title page be produced?
%number-literallayout-lines% — Enumerate lines in a 'LiteralLayout'?
%funcsynopsis-decoration% — Decorate elements of a FuncSynopsis?
$generate-book-lot-list$ — Which Lists of Titles should be produced for Books?
%page-width% — no documented purpose
%chap-app-running-heads% — Generate running headers and footers on chapter-level elements?
$linenumber-space$ — Returns the sosofo which separates line numbers from the text
%division-title-quadding% — Division title quadding
%generate-article-toc% — Should a Table of Contents be produced for Articles?
%refentry-name-font-family% — The font family used in RefName
%default-simplesect-level% — Default section level for 'SimpleSect's.
%callout-default-col% — Default column for callouts
%linenumber-padchar% — Pad character in line numbers
%generate-partintro-on-titlepage% — Should the PartIntro appear on the Part/Reference title page?
%generate-reference-titlepage% — Should a reference title page be produced?
%block-start-indent% — Extra start-indent for block-elements
%left-margin% — Width of left margin
%generate-book-toc% — Should a Table of Contents be produced for Books?
$admon-graphic$ — Admonition graphic file
$object-titles-after$ — List of objects who's titles go after the object
%graphic-default-extension% — Default extension for graphic FILEREFs
%body-width% — no documented purpose
%graphic-extensions% — List of graphic filename extensions
%linenumber-mod% — Controls line-number frequency in enumerated environments.
%number-screen-lines% — Enumerate lines in a 'Screen'?
%number-funcsynopsisinfo-lines% — Enumerate lines in a 'FuncSynopsisInfo'?