GNOME Documentation XSLT Manual
1. Introduction
The GNOME XSLT Stylesheets are used to generate HTML from DocBook files.
Some of the goals of these stylesheets are:
- To provide real-time translation of DocBook into HTML. The GNOME Help Browser, Yelp, uses these stylesheets to format help documents.
- To provide a customized look and feel for GNOME's documentation.
- To provide translation support for GNOME documentation.
2. Using the Stylesheets
To use the stylesheets you should be familiar with the xsltproc application. The first argument is the location of the db2html.xsl stylesheet. The second argument is the top-level docbook file for which to generate the HTML.
$ xsltproc /usr/share/xml/gnome/xslt/docbook/html/db2html.xsl <docbook file>For more information on xsltproc and the libxslt libraries, see http://xmlsoft.org/.
If you make use of XInclude to include other files in your document, then you must use the --xinclude parameter to generate the complete DocBook file before processing it with the db2html.xsl stylesheet(s).
3. Specifying Parameters
There are a number of parameters available in the stylesheets which you can set to customize the generated html. An exhaustive list is available in the following sections, but we will go over a few of the more commonly used ones in this section.
To specify a parameter to the stylesheets, use the --stringparam option of the xsltproc application.
- db.chunk.chunk_top
-
Set this parameter to 1 if you want the stylesheets to chunk1 the top level element (<article> or <book>) into a file called index.xhtml.
- db.chunk.max_depth
-
Specifies the maximum depth of chunked elements specified in db.chunk.chunks parameter.
- db.chunk.extension
-
Set this parameter to the extension you would like for the chunked output files.
$ xsltproc \
--stringparam db.chunk.chunk_top 1 \
--stringparam db.chunk.max_depth 1 \
--stringparam db.chunk.extension '.html' \
/usr/share/xml/gnome/xslt/docbook/html/db2html.xsl \
<path to docbook file>4. Limitations
Currently, the stylesheets require that there be an id attribute on each chunked element.
5. Translating the Stylesheets
The Gnome documentation stylesheets provide support for localizing the rendered output from DocBook documents. Localizable strings in the stylesheets are marked for translation and extracted into PO files and intltool. After they have been translated, intltool merges them into an XML file called l10n.xml, which is then used by the stylesheets to localize the output.
Providing full internationalization support for the DocBook stylesheets is not trivial, and providing localizations requires translators to understand how documents are formatted and, to some extent, how DocBook works. DocBook is a high-level markup language, and it requires processing applications to provide much of the formatting for documents. DocBook applications must resolve cross references, create tables of contents, format headers, and perform other formatting tasks that need to be localized. Localizing these tasks involves more than translating stand-alone sentences. In effect, the very formatting code itself is localizable.
Document formatting varies greatly across the world. Each locale has a long history of formatting conventions and methods. The maintainers of these stylesheets do not know all the nuances of formatting documents in all locales. The only way we can create better output for your locale is if you tell us when you encounter problems.
Although all localization is done by translating strings in a PO file, there are many cases where the translatable string is not a simple sentence or phrase. Rather, translators must provide data using XML fragments. These structured fragments can be used to work with plural forms, provide alternative formattings based on context, or provide format strings.
- 5.1. Simple Strings
- 5.2. Plurals
- 5.3. Roles
- 5.4. Format Strings
- 5.5. Common Formatter Types
5.1. Simple Strings
Translated strings are extracted in the stylesheets by a template called l10n.gettext. This template extracts strings from an XML file, which is built from PO files by intltool. For example, consider the string Caution, which is used as a heading for caution elements. The stylesheets would call l10n.gettext to extract the translated value of this string for the document's language. The l10n.xml file would have an entry similar to this:
<msgset xmlns=""http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"> <msgid>Caution</msgid> <msg>Caution</msg> <msg xml:lang="ar">إنتباه</msg> <msg xml:lang="bg">Внимание</msg> <msg xml:lang="ca">Compte</msg> <msg xml:lang="cs">Upozornění</msg> <msg xml:lang="da">Forsigtig</msg> <msg xml:lang="de">Achtung</msg> <msg xml:lang="el">Προσοχή</msg> <msg xml:lang="en_CA">Caution</msg> <msg xml:lang="en_GB">Caution</msg> <msg xml:lang="es">Precaución</msg> <msg xml:lang="et">Ettevaatust</msg> <msg xml:lang="fi">Varoitus</msg> <msg xml:lang="fr">Attention</msg> <msg xml:lang="gu">સાવધાન</msg> <msg xml:lang="hi">चेतावनी</msg> <msg xml:lang="hu">Figyelem</msg> <msg xml:lang="id">Perhatian</msg> <msg xml:lang="it">Attenzione</msg> <msg xml:lang="ja">注意</msg> <msg xml:lang="ko">주의</msg> <msg xml:lang="lt">Įspėjimas</msg> <msg xml:lang="nb">Advarsel</msg> <msg xml:lang="ne">सावधानी</msg> <msg xml:lang="nl">Let op</msg> <msg xml:lang="no">Advarsel</msg> <msg xml:lang="pa">ਸਾਵਧਾਨ</msg> <msg xml:lang="pt">Cuidado</msg> <msg xml:lang="pt_BR">Cuidado</msg> <msg xml:lang="ro">Atenţie</msg> <msg xml:lang="sk">Výstraha</msg> <msg xml:lang="sq">Kujdes</msg> <msg xml:lang="sr">Пажња</msg> <msg xml:lang="sr@Latn">Pažnja</msg> <msg xml:lang="sv">Varning</msg> <msg xml:lang="tr">Uyarı</msg> <msg xml:lang="uk">Застереження</msg> <msg xml:lang="vi">Cảnh báo</msg> <msg xml:lang="wa">Adviertance</msg> <msg xml:lang="zh_CN">小心</msg> <msg xml:lang="zh_TW">注意</msg> </msgset>
Translators, however, will work only with the PO files. Using PO files for these strings is no different than any other simple string translation. The PO entry in the sr locale for the above string would look like this:
#: ../xslt/gettext/l10n.xml.in.h:1347 msgid "Caution" msgstr "Пажња"
5.2. Plurals
In many cases, a static string is insufficient for proper localized content. For these cases, the stylesheets allow for alternate strings by placing the strings in a structured XML fragment. Alternate strings are used in two ways: to provide plural forms according to the plural rules of the language, and to provide alternate formattings based on a specified role. This section discusses plurals. See Section 5.3 ― Roles for a discussion of roles.
Plural forms are handled similarly to how they are handled in other applications. A rule is provided to transform a number into a plural index, and a translation is provided for each of those indexes. Unfortunately, there is no standard way to encode this information into XML; thus, there is no mechanism in intltool's XML mode. Consequently, translators must place their translations in an XML fragment. This fragment is merged into the l10n.xml file, and the stylesheets extract the appropriate form.
Here is an example entry in the l10n.xml file:
<msgset xmlns=""http://www.gnome.org/~shaunm/gnome-doc-utils/l10n">
<msgid>Author</msgid>
<msg>
<msgstr form='0'>Author</msgstr>
<msgstr form='1'>Authors</msgstr>
</msg>
<msg xml:lang="sr">
<msgstr form='0'>Аутор</msgstr>
<msgstr form='1'>Аутори</msgstr>
<msgstr form='2'>Аутори</msgstr>
</msg>
</msgset>Since the Serbian language has three plural forms, three translations have been provided. Each of these is placed in a msgstr element, and the form attribute is used to indicate for which plural form they are used.
Again, translators will only see the entries in their PO files. The PO file entry for the above translation looks like this:
#. Used as a header before a list of authors. #: ../xslt/gettext/l10n.xml.in.h:1310 msgid "" "<msgstr form='0'>Author</msgstr> " "<msgstr form='1'>Authors</msgstr>" msgstr "" "<msgstr form='0'>Аутор</msgstr>\n" "<msgstr form='1'>Аутори</msgstr>\n" "<msgstr form='2'>Аутори</msgstr>"
Since intltool often alters whitespace, the entry in the PO file might not look as nice as this. When creating the translated message strings, translators may add or remove whitespace between msgstr elements if they choose. This extra text content is ignored by l10n.gettext.
Note that translators may add a msgstr element without a form attribute as a fallback translation. In the example above, the last two msgstr elements could have been replaced by a single msgstr element without a form attribute. The l10n.gettext template would match the first element whenever the plural form is 0, and the fallback element otherwise.
The plural form is selected using the l10n.plural.form template. This templates takes the number of items as a parameter, and returns the numeric index of the plural form to use. Currently, the rule cannot be automatically extracted from the Plural-Forms entry in the PO file, though this feature is planned for the future. Until this feature is added, plural rules have to be coded manually in the stylesheets. Translators need to notify the maintainers when they begin translating the stylesheets.
5.3. Roles
In many cases, how to render an element depends on various conditions, such as the grammatical role. For these cases, the stylesheets allow translators to provide multiple translations, each marked with a role attribute from a fixed vocabulary. The list of valid roles will depend on the template, and should be given in the translator comment accompanying each string. However, there are a number of common cases, particularly for labels and cross references.
Translating using roles is similar to translating using plural forms. A translation consists of any number of msgstr elements, each with a role attribute. A msgstr element without an attribute can be provided as a default if none of the roles match.
For example, the citetitle element in DocBook is used to cite the title of a publication. The type of the publication is specified in the class attribute. In many English publications, article titles are placed in quotes, while book titles are italicized. The following fragment will quote article titles, but italicize all other cited titles.
<msgstr role='article'>“<node/>”</msgstr> <msgstr><i><node/></i></msg:msgstr>
The Serbian translation team has chosen to follow the same convention of quoting article titles and italicizing all others. The entry in sr.po follows.
#: ../xslt/gettext/l10n.xml.in.h:304 msgid "" "<msgid>citetitle.format</msgid> " "<msgstr role='article'>“<node/>”</msgstr> " "<msgstr><i><node/></i></msgstr>" msgstr "" "<msgstr role='article'>„<node/>“</msgstr>\n" "<msgstr><i><node/></i></msgstr>"
The meaning of the markup inside the msgstr elements will be explained in Section 5.4 ― Format Strings. For now, simply note that multiple strings have been provided, each in a msgstr element. The only difference between the original string and the Serbian string is that Serbian is using a different opening quote character, aligned at the baseline.
Note also that the original translation contains an additional msgid element. This element is redundant in the merged XML; its only purpose is to distinguish the string from other strings, which may potentially have the same formatting in English. Redundant msgid elements are sometimes used even when neither plural forms nor roles are being used. In those cases, the sole translatable string is placed in a msgstr element with no attributes.
5.4. Format Strings
Using specialized format strings, the Gnome documentation stylesheets can translate more than just simple strings. These format strings are similar in principle to format strings used in C programs, except that XML is used to insert named parameters, rather than special format tokens being used to insert positional parameters.
For instance, DocBook provides the quote element, used to mark inline quotations. How to render an inline quotation depends on the typographic conventions of the language. In U.S. English, they are rendered inside “double inverted-comma” quotation marks. In Serbian, they are typically rendered with the opening quotation „aligned at the baseline“. The entry in the Serbian PO file for this format string follows.
#: ../xslt/gettext/l10n.xml.in.h:936 msgid "" "<msgid>quote.format</msgid> " "<msgstr role='inner'>‘<node/>’</msgstr> " "<msgstr>“<node/>”</msgstr>" msgstr "" "<msgstr role='inner'>‘<node/>’</msgstr>\n" "<msgstr>„<node/>”</msgstr>"
Multiple msgstr elements have been provided with roles. These are used to distinguish inner quotes from outer quotes. Roles were described in Section 5.3 ― Roles. The msgstr elements also contain inline markup. This markup is used to insert additional content. In this case, only the <node/> element has been used. This element is replaced by the contents of the quotation element being processed.
Each format string has a set number of named arguments available. These arguments should be documented in the translator comments that accompany the string. Note that the default translation may not make use of all the available arguments.
In addition to marker elements in format strings, translators may also use simple inline formatting markup. Any content can be wrapped in a span element with certain attributes to control formatting. The attributes are a subset of CSS properties. For HTML output, they are converted directly into the corresponding CSS. The list of allowed attributes is as follows:
- font-family
This attribute sets the font family. Specifying exact font is generally a not advisable. Rather, this should be used to provide a generic family: serif, sans-serif, cursive, fantasy, or monospace.
- font-style
This attribute can be used to italicize the text. The allowed values are italic, oblique, and normal.
- font-variant
This attribute can be used to set the text in small caps. Small caps prints lowercase letters with smaller versions of the uppercase glyphs. The allowed values are small-caps and normal.
- font-weight
This attribute can be used to mark the text bold. CSS allows any number from 100 to 900, with normal text being 400 and bold being 700. In addition to numerical values, you can use one of bold, bolder, lighter, or normal to use pre-defined values. Only bold and normal should generally be needed.
- font-stretch
This attribute can be used to stretch or condense the font. CSS allows a number of keywords to specify by exactly how much to stretch the font. In practice, only wider, narrower, and normal should generally be used.
- font-size
This attribute sets the size of the font. CSS allows both absolute font sizes using keywords or numeric lenghts, as well as relative font sizes using keywords or percentages. Generally, only larger, smaller, and normal should be used for this attribute. Better, use the big and small convenience elements described below. They are defined to respect the size scales used throughout the stylesheets.
- text-decoration
This attribute can set various effects on the text. The allowed values are none, underline, overline, line-through, and blink. Don't use blink.
Additionally, extra inline elements are provided for convenience. The formatting done by these elements could also be done using the span element. Using these elements is just easier for common formatting tasks.
- big
Make the text larger. This is preferred over using the font-size attribute, because it is defined to use the size scale used throughout the stylesheets.
- small
Make the text smaller. This is preferred over using the font-size attribute, because it is defined to use the size scale used throughout the stylesheets.
- sub
Render the text as a subscript.
- sup
Render the text as a superscript.
- b
Make the text bold. This is equivalent to setting the font-weight attribute to bold.
- i
Make the text italic. This is equivalent to setting the font-style attribute to italic.
- tt
Make the text monospace. This is equivalent to setting the font-family attribute to monospace.
- u
Underline the text. This is equivalent to setting the text-decoration attribute to underline.
5.5. Common Formatter Types
There are a number of common types of format strings that are marked for translation in the stylesheets. DocBook contains a lot of structural markup, and many of the same sorts of formatting tasks have to be performed on different elements. For example, chapters, appendixes, and sections all have similar formatting needs, but they usually need to be handled distinctly. The stylesheets do not expose every distinct element of DocBook; rather, they only make distinctions when they matter from a document presentation viewpoint.
This section outlines many of the common types of strings translators will encounter. Strings of the same type will generally have the same format arguments and the same set of roles.
- 5.5.1. Label Formatters
- 5.5.2. Number Formatters
- 5.5.3. Digit Formats
- 5.5.4. Cross Reference Formatters
- 5.5.5. Tooltip Formatters
5.5.1. Label Formatters
Labels are used before titles in headers and contents listings. Usually, a label will contain the object's number followed by some punctuation. Formal block objects, such as tables and figures, often have more information in the label.
The Serbian label formatters for sections and figures follow.
#: ../xslt/gettext/l10n.xml.in.h:1128 msgid "" "<msgid>section.label</msgid> " "<msgstr role='header'><number/>. </msgstr> " "<msgstr role='li'><number/>. </msgstr> " "<msgstr>Section <number/></msgstr>" msgstr "" "<msgstr role='header'><number/>. </msgstr>\n" "<msgstr role='li'><number/>. </msgstr>\n" "<msgstr>Одељак <number/></msgstr>" #: ../xslt/gettext/l10n.xml.in.h:492 msgid "" "<msgid>figure.label</msgid> " "<msgstr role='header'><i>Figure <number/></i> </msgstr> " "<msgstr role='li'>Figure <number/> </msgstr> " "<msgstr>Figure <number/></msgstr>" msgstr "" "<msgstr role='header'><i>Слика <number/></i> </msgstr>\n" "<msgstr role='li'>Слика <number/> </msgstr>\n" "<msgstr>Слика <number/></msgstr>"
In both cases, translations are provided for the header and li roles. Additionally, a fallback formatting has been provided to format labels when no role is provided. Label formatters will generally use the same two roles. Fallback translations should be provided as well.
Most label formatters provide three format arguments which can be used in the translations:
- <title/>
Insert the title of the element being labeled. For most types of element, the title is simply provided by the title in DocBook. A few DocBook elements, notably refentry, have more complicated content models. Translators need only reference the argument, and the stylesheets will determine the title.
- <titleabbrev/>
Insert the abbreviated title of the element being labeled. Abbreviated titles are provided by the titleabbrev element in DocBook. If the labeled element does not have an abbreviated title, the title is used instead.
- <number/>
Insert the fully qualified number of the element being labeled. For most label formatters, there is a corresponding number formatter that will be called for this argument.
Since labels are used before titles, most label formatters should only need to use the number of the element.
5.5.2. Number Formatters
Numbers are used in labels, cross references, and other identifiers. Numbers identify elements by their position in the document. Numbers can be as simple as single-level positions, or they may indicate a hierarchy. For example, the third subsection of the fourth section in the second chapter would be Section 2.4.3. The job of number formatters is to put together the hierarchical number string. Thus, number formatters are not called for single-level numbers.
The single-level number of an element in its parent is referred to as that element's digit. Number formatters work by specifying how to combine the parent element's number with the current element's digit. Two format arguments are allowed:
- <parent/>
Insert the fully qualified number of the element's parent. In many cases, this number is constructed by calling the number formatter for the parent element.
- <digit/>
Insert the single-level position of the element in its parent element. How the digit is displayed is determined by the corresponding digit format.
The Serbian label formatters for sections and figures follow.
#: ../xslt/gettext/l10n.xml.in.h:1162 msgid "" "<msgid>section.number</msgid> " "<msgstr><parent/>.<digit/></msgstr>" msgstr"" "<msgstr><parent/>.<digit/></msgstr>" #: ../xslt/gettext/l10n.xml.in.h:525 msgid "" "<msgid>figure.number</msgid> " "<msgstr><parent/>-<digit/></msgstr>" msgstr "" "<msgstr><parent/>-<digit/></msgstr>"
Note that msgstr elements are used to contain the strings, even though neither plural forms nor roles are being used. This is because a msgid has been inserted into the translatable string to allow number formatters for different elements to be distinct messages in PO files.
5.5.3. Digit Formats
Digits are the part of an element's number that specify its position in its parent element. An element's number consists of its parent number and its digit. Digits can be formatted using a number of numbering systems.
Digit formats aren't actually format strings, nor are they user-visible strings. They're simply tokens that specify how to format a number. Currently, only the following five digit formats are supported:
- 1
Format the number using Arabic numerals: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.
- A
Format the number using uppercase Latin letters: A, B, C, D, E, F, G, H, I, J, K, L.
- a
Format the number using lowercase Latin letters: a, b, c, d, e, f, g, h, i, j, k, l.
- I
Format the number using uppercase Roman numerals: I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII:
- i
Format the number using lowercase Roman numerals: i, ii, iii, iv, v, vi, vii, viii, ix, x, xi, xii:
These five numbering systems are unlikely to be sufficient, particularly for non-Western languages. Translators who would like to format numbers differently should contact the maintainers, and we can try to add additional digit formats.
5.5.4. Cross Reference Formatters
Cross reference formatters are used to format the text of a link to another element in the document. In many languages, how best to format an individual cross reference will depend on its usage. Often, cross references will need to be formatted differently based on their grammatical role in a sentence.
The cross reference formatters allow translators to provide multiple formattings using roles. Documentation authors and translators can then select the format for a cross reference using the xrefstyle attribute on the xref element. The Gnome documentation stylesheets allow xrefstyle attributes of the form role:somerole, where somerole is the role to be passed to the cross reference formatter.
Cross reference formatters generally provide the following three format arguments:
- <title/>
Insert the title of the element being referenced. For most types of element, the title is simply provided by the title in DocBook. A few DocBook elements, notably refentry, have more complicated content models. Translators need only reference the argument, and the stylesheets will determine the title.
- <titleabbrev/>
Insert the abbreviated title of the element being referenced. Abbreviated titles are provided by the titleabbrev element in DocBook. If the labeled element does not have an abbreviated title, the title is used instead.
- <number/>
Insert the fully qualified number of the element being referenced. For most label formatters, there is a corresponding number formatter that will be called for this argument.
5.5.5. Tooltip Formatters
Each hyperlink in the HTML output is given a tooltip by the stylesheets. Since hyperlinks can be created using a number of different semantic linking mechanisms in DocBook, the stylesheets are able to provide rich information in the hyperlink tooltips. The stylesheets provide tooltip formatters for various linking mechanisms. These can then be translated to provide rich information about hyperlinks in any language.
For example, the email element in DocBook is converted into a hyperlink allowing users to send email to the given address. The Serbian translation for this formatter follows.
#: ../xslt/gettext/l10n.xml.in.h:329 msgid "" "<msgid>email.tooltip</msgid> " "<msgstr>Send email to ‘<node/>’.</msgstr>" msgstr "" "Пошаљите е-писмо на „<node/>“."
Each tooltip formatter will have its own format arguments. Generally, only a single format argument will be needed, and the translator comments for the string should clearly specify the valid arguments.
6. Stylesheet Reference
- 6.1. DocBook Chunking
- 6.2. DocBook Common
- 6.3. DocBook Labels
- 6.4. DocBook Titles
- 6.5. DocBook Cross References
- 6.6. DocBook to HTML
- 6.7. DocBook to XHTML
- 6.8. DocBook to HTML - Tables of Contents
- 6.9. DocBook to HTML - Bibliographies
- 6.10. DocBook to HTML - Block Elements
- 6.11. DocBook to HTML - Callouts
- 6.12. DocBook to HTML - Class Synopses
- 6.13. DocBook to HTML - Command Synopses
- 6.14. DocBook to HTML - CSS
- 6.15. DocBook to HTML - Division Elements
- 6.16. DocBook to HTML - EBNF Elements
- 6.17. DocBook to HTML - Footnotes
- 6.18. DocBook to HTML - Function Synopses
- 6.19. DocBook to HTML - Indexes
- 6.20. DocBook to HTML - Title Pages
- 6.21. DocBook to HTML - Inline Elements
- 6.22. DocBook to HTML - Localization Formatters
- 6.23. DocBook to HTML - Lists
- 6.24. DocBook to HTML - Images and Media
- 6.25. DocBook to HTML - Question and Answer Sets
- 6.26. DocBook to HTML - Reference Pages
- 6.27. DocBook to HTML - Tables
- 6.28. DocBook to HTML - Titles and Subtitles
- 6.29. DocBook to HTML - Links and Cross References
- 6.30. DocBook to ScrollKeeper OMF
- 6.31. Themes
- 6.32. Common XSLT Utilities
- 6.33. Localized Strings
- 6.34. Localized Numbers
6.1. DocBook Chunking
- db.chunk.chunks
A space-seperated list of the names of elements that should be chunked
- db.chunk.chunk_top
Whether the top-level chunk should be output with the chunking mechanism
- db.chunk.max_depth
The maximum depth for chunking sections
- db.chunk.basename
The base filename of the output file, without an extension
- db.chunk.extension
The default file extension for new output documents
- db.chunk.info_chunk
Whether to create a chunk for the title page
- db.chunk.info_basename
The base filename for the title page
- db.chunk.doctype_public
The public DOCTYPE for output files
- db.chunk.doctype_system
The system DOCTYPE for output files
- db.chunk.info.content.mode
Renders the contents of the title page
- db.chunk.content.mode
Renders the entire contents of the chunk
- db.chunk
Creates a new page of output
- db.chunk.content
Creates the content of a new page of output
- db.chunk.children
Creates new output pages for the children of an element
- db.chunk.depth-in-chunk
Determines the depth of an element in the containing chunk
- db.chunk.depth-of-chunk
Determines the depth of teh containing chunk in the document
- db.chunk.chunk-id
Determines the id of the chunk that contains an element
- db.chunk.chunk-id.axis
Determines the id of the first chunk along a specified axis
- db.chunk.chunks — A space-seperated list of the names of elements that should be chunked
- db.chunk.chunk_top — Whether the top-level chunk should be output with the chunking mechanism
- db.chunk.max_depth — The maximum depth for chunking sections
- db.chunk.basename — The base filename of the output file, without an extension
- db.chunk.extension — The default file extension for new output documents
- db.chunk.info_chunk — Whether to create a chunk for the title page
- db.chunk.info_basename — The base filename for the title page
- db.chunk.doctype_public — The public DOCTYPE for output files
- db.chunk.doctype_system — The system DOCTYPE for output files
- db.chunk.info.content.mode — Renders the contents of the title page
- db.chunk.content.mode — Renders the entire contents of the chunk
- db.chunk — Creates a new page of output
- db.chunk.content — Creates the content of a new page of output
- db.chunk.children — Creates new output pages for the children of an element
- db.chunk.depth-in-chunk — Determines the depth of an element in the containing chunk
- db.chunk.depth-of-chunk — Determines the depth of teh containing chunk in the document
- db.chunk.chunk-id — Determines the id of the chunk that contains an element
- db.chunk.chunk-id.axis — Determines the id of the first chunk along a specified axis
db.chunk.chunks
Description
db.chunk.chunk_top
Description
db.chunk.basename
Description
db.chunk.extension
Description
db.chunk.info.content.mode
Parameters
- depth_in_chunk
The depth of the element in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
Description
When processed in this mode, a division element should output the top-level markup for the output page.
db.chunk.content.mode
Parameters
- depth_in_chunk
The depth of the element in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
Description
When processed in this mode, a division element should output the top-level markup for the output page.
db.chunk
Parameters
- node
The source element for the output page
- template
The named template to call to create the page
- href
The name of the file for the output page
- depth_of_chunk
The depth of this chunk in the document
Description
The db.chunk template creates a new output document using the exsl:document extension element. This template calls db.chunk.content to create the content of the document, passing through all parameters. This allows you to override the chunking mechanism without having to duplicate the content-generation code.
db.chunk.content
Parameters
- node
The source element for the output page
- template
The named template to call to create the page
- depth_of_chunk
The depth of this chunk in the document
Description
The db.chunk.content template creates the actual content of a new output page. It should generally only be called by db.chunk.
This template will always pass the depth_in_chunk and depth_of_chunk parameters with appropriate values to the templates it calls.
db.chunk.children
Parameters
- node
The parent element whose children will be chunked
- depth_of_chunk
The depth of node in the document
Description
db.chunk.depth-in-chunk
Parameters
- node
The element to determine the depth of
Description
db.chunk.depth-of-chunk
Parameters
- node
The element to determine the depth of
Description
db.chunk.chunk-id
Parameters
- id
The id of the element to determine the chunk id of
- node
The element to determine the chunk id of
- depth_in_chunk
The depth of node in the containing chunk
Description
db.chunk.chunk-id.axis
Parameters
- node
The base element
- node
The axis along which to find the first chunk
- depth_in_chunk
The depth of node in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
Description
6.2. DocBook Common
This stylesheet module provides utility templates for DocBook that are independant of the target format.
- db.copyright
Outputs copyright information
- db.linenumbering
Numbers each line in a verbatim environment
- db.linenumbering.start
Determines the starting line number for a verbatim element
- db.orderedlist.start
Determines the number to use for the first listitem in an orderedlist
- db.personname
Outputs the name of a person
- db.personname.list
Outputs a list of people's names
- db.copyright — Outputs copyright information
- db.linenumbering — Numbers each line in a verbatim environment
- db.linenumbering.start — Determines the starting line number for a verbatim element
- db.orderedlist.start — Determines the number to use for the first listitem in an orderedlist
- db.personname — Outputs the name of a person
- db.personname.list — Outputs a list of people's names
db.copyright
Parameters
- node
The copyright element to format
Description
This template outputs copyright information from a copyright elements. It assembles the year and holder elements into a simple copyright notice, beginning with the copyright symbol "©".
db.linenumbering
Parameters
- node
The verbatim element to create the line numbering for
- number
The starting line number
Description
This template outputs a string with line numbers for each line in a verbatim elements. Each line number is on its own line, allowing the output string to be placed to the side of the verbatim output.
db.linenumbering.start
Parameters
- node
The verbatim element to determine the starting line number for
Description
This template determines the starting line number for a verbatim element using the continuation attribute. The template finds the first preceding element of the same name, counts its lines, and handles any startinglinenumber or continuation element it finds on that element.
db.orderedlist.start
Parameters
- node
The orderedlist element to use
Description
This template determines the starting number for an orderedlist element using the continuation attribute. Thi template finds the first preceding orderedlist element and counts its list items. If that element also uses the continuation, this template calls itself recursively to add that element's starting line number to its list item count.
db.personname
Parameters
- node
The element containing tags such as firstname and surname
- lang
The language rules to use to construct the name
Description
This template outputs the name of a person as modelled by the personname element. The personname element allows authors to mark up components of a person's name, such as the person's first name and surname. This template assembles those into a string.
db.personname.list
Parameters
- nodes
The elements containing tags such as firstname and surname
- lang
The language rules to use to construct the list of names
Description
This template outputs a list of names of people as modelled by the personname element. The personname element allows authors to mark up components of a person's name, such as the person's first name and surname. This template makes a list formatted according to the locale set in lang and calls the template db.personname for each element in nodes.
6.3. DocBook Labels
- db.label.mode
- db.number.mode
FIXME
- db.digit.mode
FIXME
- db.number.parent.mode
FIXME
- db.label.mode —
- db.number.mode — FIXME
- db.digit.mode — FIXME
- db.number.parent.mode — FIXME
- db.label — Generates the label for an element
- db.number — Generates the number portion of a label
- db.digit — FIXME
db.label.mode
Parameters
- role
The role of the label, as passed to the format template
Description
db.label
Parameters
- node
The node to generate a label for
- role
The role of the label, as passed to the format template
Description
This template generates the label used for some sectioning and block-level elements. For instance, this would generate strings such as Section 14.3 or Table 5-2. The template simply applies the mode db.label.mode to the element. To change the behavior of a particular type of element, you should always override the mode template for that element.
Overriding the db.label template should only be done if you wish to change the labelling mechanism completely, or if you wish to wrap the labelling mechanism (for instance, with a caching extension). Do not override this template to suppress label prefixes in titles.
db.number
Parameters
- node
The element to generate a number for
Description
This template generates the number portion of the label used for some sectioning and block-level elements. The template simply applies the mode db.number.mode to the element. To change the behavior of a particular type of element, you should always override the mode template for that type of element.
Overriding the db.number template should only be done if you wish to change the numbering mechanism completely, or you wish to wrap the numbering mechanism (for example, with a caching extension).
6.4. DocBook Titles
- db.title.mode
FIXME
- db.titleabbrev.mode
FIXME
- db.subtitle.mode
FIXME
- db.title
Processes the title of an element
- db.titleabbrev
Processes the abbreviated title of an element
- db.subtitle
Processes the subtitle of an element
- db.title.mode — FIXME
- db.titleabbrev.mode — FIXME
- db.subtitle.mode — FIXME
- db.title — Processes the title of an element
- db.titleabbrev — Processes the abbreviated title of an element
- db.subtitle — Processes the subtitle of an element
db.title
Parameters
- node
The element to process the title of
Description
db.titleabbrev
Parameters
- node
The element to process the abbreviated title of
Description
6.5. DocBook Cross References
- db.xref.content.mode
FIXME
- db.xref.tooltip.mode
FIXME
- db.ulink.tooltip
Generates the tooltip for an external link
- db.xref.content
Generates the content of a cross reference
- db.xref.target
Generates the target identifier of a cross reference
- db.xref.tooltip
Generates the tooltip for a cross reference
- db.xref.content.mode — FIXME
- db.xref.tooltip.mode — FIXME
- db.ulink.tooltip — Generates the tooltip for an external link
- db.xref.content — Generates the content of a cross reference
- db.xref.target — Generates the target identifier of a cross reference
- db.xref.tooltip — Generates the tooltip for a cross reference
db.xref.content.mode
Parameters
- xrefstyle
The cross reference style, usually from the xrefstyle attribute
- role
For a role-based xrefstyle, the role of the cross reference
Description
db.ulink.tooltip
Parameters
- node
The element to generate a tooltip for
- url
The URL of the link, usually from the url attribute
Description
db.xref.content
Parameters
- linkend
The id of the linked-to element, usually from the linkend attribute
- target
The linked-to element
- xrefstyle
The cross reference style, usually from the xrefstyle attribute
- role
For a role-based xrefstyle, the role of the cross reference
Description
db.xref.target
Parameters
- linkend
The id of the linked-to element, usually from the linkend attribute
- target
The linked-to element
- is_chunk
Whether target is known to be a chunked element
Description
6.8. DocBook to HTML - Tables of Contents
This module provides templates to create tables of contents from any division-level elements.
- db2html.autotoc.mode
Renders a TOC entry for an element and its children
- db2html.autotoc
Creates a table of contents for a given element
- db2html.autotoc.mode — Renders a TOC entry for an element and its children
- db2html.autotoc — Creates a table of contents for a given element
db2html.autotoc.mode
Parameters
- is_info
Whether this contents list is for the info page
- selected
A currently-selected page
- toc_depth
How deep to create entries in the table of contents
- labels
Whether to generate labels
- titleabbrev
Whether to use titleabbrev instead of title
Description
This mode outputs a single element in a table of contents. If the toc_depth parameter is non-zero, then templates implementing this mode should call db2html.autotoc in their context node, passing their division-level child elements and decrementing toc_depth by one.
For a description of the other parameters, see db2html.autotoc.
db2html.autotoc
Parameters
- node
The element to create a table of contents for
- show_info
Whether to include a link to the info page
- is_info
Whether this contents list is for the info page
- show_title
Whether to give the contents list a title
- selected
A currently-selected page
- divisions
The division-level child elements of node
- toc_depth
How deep nested contents should be listed.
- labels
Whether to generate labels
- titleabbrev
Whether to use titleabbrev instead of title
Description
This template creates a table of contents for a given division-level element. The calling template should pass the division-level child elements in the divisions parameter. Nested divisions will be listed to the depth specified in the toc_depth parameter. If the selected parameter is set to an existing element, then this template will only output ancestors and siblings of ancestors of the selected element. This effectively creates a tree which is expanded sufficiently to show a particular element.
This template accepts a number of parameters that control the style of the table of contents. The show_info parameter specifies whether a link to the info page ("About This Document") should be shown. The is_info parameter specifies whether the info page should be treated as the selected page. If the info page is selected, it will not be displayed as a link.
The show_title specifies whether a title should be placed at the top of the table of contents. The labels parameter specifies whether to place section numbers as labels before each element in the list. Finally, the titleabbrev element specifies whether list elements should use the titleabbrev of each element for the link text, if available.
6.9. DocBook to HTML - Bibliographies
This module provides templates to process DocBook bibliograpies.
- db2html.biblioentry.mode
Formats elements inside a biblioentry element
- db2html.bibliomixed.mode
Formats elements inside a bibliomixed element
- db2html.biblioentry.label
Outputs the label for a bibliography entry
- db2html.biblioentry.mode — Formats elements inside a biblioentry element
- db2html.bibliomixed.mode — Formats elements inside a bibliomixed element
- db2html.biblioentry.label — Outputs the label for a bibliography entry
db2html.biblioentry.mode
Description
This mode is used when processing the child elements of a biblioentry element. Many elements are treated differently when they appear inside a bibliography entry.
db2html.bibliomixed.mode
Description
This mode is used when processing the child elements of a bibliomixed element. Many elements are treated differently when they appear inside a bibliography entry.
db2html.biblioentry.label
Parameters
- node
The biblioentry or bibliomixed element to generate a label for
Description
This outputs a label to be placed inline at the beginning of a bibliography entry. Labels are created for both biblioentry and bibliomixed elements. The label is typically an abbreviation of the authors' names an the year of publication. In DocBook, it is usually provides with a leading abbrev element. Without a leading abbrev element, this template will instead use the xreflabel or id attribute.
6.10. DocBook to HTML - Block Elements
This module handles most simple block-level elements, turning them into the appropriate HTML tags. It does not handle tables, lists, and various other complex block-level elements.
- db2html.block
Renders a block-level element to an HTML div tag
- db2html.block.title
Renders a formal title for a block-level element
- db2html.blockquote
Renders a blockquote element to HTML
- db2html.para
Renders a block-level element as an HTML p element
- db2html.pre
Renders a block-level element as an HTML pre element
- db2html.block — Renders a block-level element to an HTML div tag
- db2html.block.title — Renders a formal title for a block-level element
- db2html.blockquote — Renders a blockquote element to HTML
- db2html.para — Renders a block-level element as an HTML p element
- db2html.pre — Renders a block-level element as an HTML pre element
db2html.block
Parameters
- node
The block-level element to render
- class
An extra string to insert in the class attribute
- first
Whether this is the first child block in the parent
- indent
Whether this block should be indented
- verbatim
Whether to maintain whitespace as written
- formal
Whether this is a formal block element
- title
When formal is true, an element to use for the title
- caption
When formal is true, an element to use for the caption
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
This template creates an HTML div element for the given DocBook element. This template uses the parameters to construct the class attribute, which is then used by the CSS for styling.
db2html.block.title
Parameters
- node
The block-level element being processed
- title
The element containing the title
- lang
The locale of the text in title
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
This template formats the contents of title as a title for a block-level element. It is called by db2html.block for formal block elements.
db2html.blockquote
Parameters
- node
The blockquote element to render
- first
Whether this is the first child block in the parent
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
This template creates an HTML blockquote element for the given DocBook element.
db2html.para
Parameters
- node
The block-level element to render
- first
Whether this is the first child block in the parent
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
This template creates an HTML p element for the given DocBook element.
db2html.pre
Parameters
- node
The block-level element to render
- class
An extra string to insert in the class attribute
- first
Whether this is the first child block in the parent
- indent
Whether this block should be indented
- children
The child elements to process
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
This template creates an HTML pre element for the given DocBook element. This template uses the parameters to construct the class attribute, which is then used by the CSS for styling.
If node has the linenumbering attribute set to "numbered", then this template will create line numbers for each line, using the db.linenumbering template.
6.11. DocBook to HTML - Callouts
- db2html.co.color
The text color for callout dingbats
- db2html.co.background_color
The background color for callout dingbats
- db2html.co.border_color
The border color for callout dingbats
- db2html.co.color.hover
The text color for callout dingbats when hovering
- db2html.co.background_color.hover
The background color for callout dingbats when hovering
- db2html.co.border_color.hover
The border color for callout dingbats when hovering.
- db2html.co.dingbat
Creates a callout dingbat for a co element
- db2html.co.dingbats
Renders a callout dingbat for each co referenced in arearefs
- db2html.callout.css
Outputs CSS that controls the appearance of callouts
- db2html.co.color — The text color for callout dingbats
- db2html.co.background_color — The background color for callout dingbats
- db2html.co.border_color — The border color for callout dingbats
- db2html.co.color.hover — The text color for callout dingbats when hovering
- db2html.co.background_color.hover — The background color for callout dingbats when hovering
- db2html.co.border_color.hover — The border color for callout dingbats when hovering.
- db2html.co.dingbat — Creates a callout dingbat for a co element
- db2html.co.dingbats — Renders a callout dingbat for each co referenced in arearefs
- db2html.callout.css — Outputs CSS that controls the appearance of callouts
db2html.co.background_color
Description
db2html.co.color.hover
Description
db2html.co.background_color.hover
Description
db2html.co.border_color.hover
Description
db2html.co.dingbat
Parameters
- co
The co element to create a callout dingbat for
Description
db2html.co.dingbats
Parameters
- arearefs
A space-separated list of co elements
Description
6.12. DocBook to HTML - Class Synopses
- db2html.classsynopsis.language
The default programming language used to format classsynopsis elements
- db2html.classsynopsis.language — The default programming language used to format classsynopsis elements
- db2html.class.cpp.mode —
- db2html.class.python.mode —
6.13. DocBook to HTML - Command Synopses
This module contains templates to process DocBook command synopsis elements.
- db2html.arg.choice
The default value of the choice parameter for arg elements
- db2html.arg.rep
The default value of the rep parameter for arg elements
- db2html.group.choice
The default value of the choice parameter for group elements
- db2html.group.rep
The default value of the rep parameter for group elements
- db2html.cmdsynopsis.sbr.padding.mode
Outputs padding for elements leading up to an sbr element
- db2html.arg.choice — The default value of the choice parameter for arg elements
- db2html.arg.rep — The default value of the rep parameter for arg elements
- db2html.group.choice — The default value of the choice parameter for group elements
- db2html.group.rep — The default value of the rep parameter for group elements
- db2html.cmdsynopsis.sbr.padding.mode — Outputs padding for elements leading up to an sbr element
db2html.arg.choice
Description
db2html.arg.rep
Description
db2html.group.choice
Description
db2html.group.rep
Description
db2html.cmdsynopsis.sbr.padding.mode
Parameters
- sbr
The sbr element to pad up to
- sepchar
The value of the sepchar attribute on the enclosing cmdsynopsis
Description
When processed in this mode, elements output whitespace to the length of the textual output they would normally produce. This allows options to be aligned when explicit line breaks are inserted with sbr elements.
To create the padding for a given sbr element, this mode is called on the enclosing cmdsynopsis element, passing the sbr element. When processed in this mode, elements should only output padding for content the leads up to the sbr element passed in the sbr parameter. When processing children that don't contain the given sbr element, the sbr parameter should be set to false() for those children. This avoids additional ancestor selectors, which are generally expensive to perform.
6.14. DocBook to HTML - CSS
- db2html.css.file
The file to output CSS to
- db2html.css
Outputs the CSS that controls the appearance of the entire document
- db2html.css.content
Outputs the actual CSS directives
- db2html.css.custom
Allows extension stylesheets to extend or override CSS
- db2html.css.file — The file to output CSS to
- db2html.css — Outputs the CSS that controls the appearance of the entire document
- db2html.css.content — Outputs the actual CSS directives
- db2html.css.custom — Allows extension stylesheets to extend or override CSS
db2html.css.file
Description
This parameter allows you to output the CSS to separate file which is referenced by each HTML file. If this parameter is blank, then the CSS is embedded inside a style tag in the HTML instead.
db2html.css
Parameters
- css_file
Whether to create a CSS file when db2html.css.file is set.
Description
This template outputs a style or link tag and calls db2html.css.content to output the actual CSS directives. An external CSS file will only be created when css_file is true. This is only set to true by the top-level chunk to avoid creating the same file multiple times.
db2html.css.content
Description
This template is called by db2html.css to output CSS content. It also calls templates from other modules to output CSS specific to the content addressed in those modules.
This template calls db2html.css.custom at the end. That template may be used by extension stylesheets to extend or override the CSS.
6.15. DocBook to HTML - Division Elements
- db2html.linktrail
Whether to place a link trail under the header
- db2html.navbar.top
Whether to place a navigation bar at the top of the page
- db2html.navbar.bottom
Whether to place a navigation bar at the bottom of the page
- db2html.sidenav
Whether to create a navigation sidebar
- db2html.division.div.content.mode
Renders the block-level content of a division element
- db2html.division.html
Renders a complete HTML page for a division element
- db2html.division.div
Renders the content of a division element, chunking children if necessary
- db2html.header
Generates a header with a title and optional subtitle
- db2html.linktrail
Generates links to pages from ancestor elements
- db2html.navbar
Generates navigation links for a page
- db2html.sidenav
Generates a navigation sidebar
- db2html.division.head.extra
FIXME
- db2html.division.top
FIXME
- db2html.division.sidebar
FIXME
- db2html.division.bottom
FIXME
- db2html.linktrail — Whether to place a link trail under the header
- db2html.navbar.top — Whether to place a navigation bar at the top of the page
- db2html.navbar.bottom — Whether to place a navigation bar at the bottom of the page
- db2html.sidenav — Whether to create a navigation sidebar
- db2html.division.div.content.mode — Renders the block-level content of a division element
- db2html.division.html — Renders a complete HTML page for a division element
- db2html.division.div — Renders the content of a division element, chunking children if necessary
- db2html.header — Generates a header with a title and optional subtitle
- db2html.linktrail — Generates links to pages from ancestor elements
- db2html.navbar — Generates navigation links for a page
- db2html.sidenav — Generates a navigation sidebar
- db2html.division.head.extra — FIXME
- db2html.division.top — FIXME
- db2html.division.sidebar — FIXME
- db2html.division.bottom — FIXME
db2html.linktrail
Description
This boolean parameter specifies whether a block containing links to ancestor elements should be included under the header.
db2html.navbar.top
Description
This boolean parameter specifies whether a block containing navigation links should be placed at the top of the page. The top navigation bar is inserted by db2html.division.top, so this parameter may have no effect if that template has been overridden.
db2html.navbar.bottom
Description
This boolean parameter specifies whether a block containing navigation links should be placed at the bottom of the page. The bottom navigation bar is inserted by db2html.division.bottom, so this parameter may have no effect if that template has been overridden.
db2html.sidenav
Description
This boolean parameter specifies whether a full navigation tree in a sidebar. The navigation sidebar is inserted by db2html.division.sidebar, so this parameter may have no effect if that template has been overridden.
db2html.division.div.content.mode
Parameters
- depth_in_chunk
The depth of the context element in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
Description
db2html.division.html
Parameters
- node
The element to create an HTML page for
- info
The info child element of node
- template
The named template to call to create the page
- depth_of_chunk
The depth of the containing chunk in the document
- prev_id
The id of the previous page
- next_id
The id of the next page
Description
db2html.division.div
Parameters
- node
The element to render the content of
- info
The info child element of node
- title_node
The element containing the title of node
- subtitle_node
The element containing the subtitle of node
- title_content
The title for divisions lacking a title tag
- subtitle_content
The subtitle for divisions lacking a subtitle tag
- entries
The entry-style child elements
- divisions
The division-level child elements
- callback
Whether to process node in db2html.division.div.content.mode
- depth_in_chunk
The depth of node in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
- chunk_divisions
Whether to create new documents for divisions
- chunk_info
Whether to create a new document for a title page
- autotoc_depth
How deep to create contents listings of divisions
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
Description
db2html.header
Parameters
- node
The element containing the title
- title_node
The title element to render
- subtitle_node
The subtitle element to render
- depth_in_chunk
The depth of node in the containing chunk
- depth_of_chunk
The depth of the containing chunk in the document
- generate_label
Whether to generate a label in the title
- title_content
An optional string containing the title
- subtitle_content
An optional string containing the subtitle
Description
db2html.linktrail
Parameters
- node
The element to generate links for
Description
db2html.navbar
Parameters
- node
The element to generate links for
- prev_id
The id of the previous page
- next_id
The id of the next page
- prev_node
The element of the previous page
- next_node
The element of the next page
- position
Where the block is positioned on the pages, either 'top' or 'bottom'
Description
db2html.sidenav
Parameters
- node
The currently-selected division element
- template
The named template to call to create the page
Description
db2html.division.top
Parameters
- node
The division element being rendered
- info
The info child element of node
- template
The named template to call to create the page
- depth_of_chunk
The depth of the containing chunk in the document
- prev_id
The id of the previous page
- next_id
The id of the next page
- prev_node
The element of the previous page
- next_node
The element of the next page
Description
db2html.division.sidebar
Parameters
- node
The division element being rendered
- info
The info child element of node
- template
The named template to call to create the page
- depth_of_chunk
The depth of the containing chunk in the document
- prev_id
The id of the previous page
- next_id
The id of the next page
- prev_node
The element of the previous page
- next_node
The element of the next page
Description
db2html.division.bottom
Parameters
- node
The division element being rendered
- info
The info child element of node
- template
The named template to call to create the page
- depth_of_chunk
The depth of the containing chunk in the document
- prev_id
The id of the previous page
- next_id
The id of the next page
- prev_node
The element of the previous page
- next_node
The element of the next page
Description
6.17. DocBook to HTML - Footnotes
FIXME: Describe this module
- db2html.footnote.ref
Generates a superscript link to a footnote
- db2html.footnote.note
Generates a footnote
- db2html.footnote.footer
Generates a foot containing all the footnotes in the chunk
- db2html.footnote.css
Outputs CSS that controls the appearance of footnotes
- db2html.footnote.ref — Generates a superscript link to a footnote
- db2html.footnote.note — Generates a footnote
- db2html.footnote.footer — Generates a foot containing all the footnotes in the chunk
- db2html.footnote.css — Outputs CSS that controls the appearance of footnotes
db2html.footnote.ref
Parameters
- node
The footnote element to process
Description
db2html.footnote.note
Parameters
- node
The footnote element to process
Description
db2html.footnote.footer
Parameters
- node
The division element containing footnotes
- depth_of_chunk
The depth of the containing chunk in the document
Description
6.18. DocBook to HTML - Function Synopses
- db2html.funcsynopsis.style
How to render funcsynopsis elements
- db2html.funcsynopsis.style — How to render funcsynopsis elements
db2html.funcsynopsis.style
Description
This parameter controls the indentation style used to render funcsynopsis elements. Supported values are 'KR' and 'ANSI'. This value can also be set with the db2html.funcsynopsis.style processing instruction at the top of the XML document. The same processing instruction or inside a funcsynopsis element will override this setting for that synopsis.
6.20. DocBook to HTML - Title Pages
- db2html.info.mode
FIXME
- db2html.info.div
Renders the contents of the title page of a division element
- db2html.info.title
Outputs the title of a title page
- db2html.info.subtitle
Outputs the subtitle of a title page
- db2html.info.authors
Creates the author credits in a title page
- db2html.info.editors
Creates the editor credits in a title page
- db2html.info.collabs
Creates the collaborator credits in a title page
- db2html.info.translators
Creates the translator credits in a title page
- db2html.info.publishers
Creates the publisher credits in a title page
- db2html.info.othercredits
Creates all other credits in a title page
- db2html.info.copyrights
Creates the copyright statements in a title page
- db2html.info.mode — FIXME
- db2html.info.div — Renders the contents of the title page of a division element
- db2html.info.title — Outputs the title of a title page
- db2html.info.subtitle — Outputs the subtitle of a title page
- db2html.info.authors — Creates the author credits in a title page
- db2html.info.editors — Creates the editor credits in a title page
- db2html.info.collabs — Creates the collaborator credits in a title page
- db2html.info.translators — Creates the translator credits in a title page
- db2html.info.publishers — Creates the publisher credits in a title page
- db2html.info.othercredits — Creates all other credits in a title page
- db2html.info.copyrights — Creates the copyright statements in a title page
db2html.info.div
Parameters
- node
The division element to generate a title page for
- info
The info child element of node
- depth_of_chunk
The depth of the containing chunk in the document
Description
db2html.info.title
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.subtitle
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.authors
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.editors
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.collabs
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.translators
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.publishers
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
db2html.info.othercredits
Parameters
- node
The division element for which a title page is being generated
- info
The info child element of node
Description
6.21. DocBook to HTML - Inline Elements
- db2html.inline
Renders an inline element as an HTML span element
- db2html.inline.content.mode — FIXME
- db2html.inline — Renders an inline element as an HTML span element
db2html.inline
Parameters
- node
The element to render
- children
The child elements to process
- class
The value of the class attribute on the span tag
- bold
Whether to render the element in bold face
- italic
Whether to render the element in italics
- underline
Whether to underline the element
- mono
Whether to render the element in a monospace font
- sans
Whether to render the element in a sans-serif font
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
- ltr
Whether to default to ltr if neither lang nor dir is specified
Description
6.22. DocBook to HTML - Localization Formatters
- l10n.format.span
FIXME
- l10n.format.span — FIXME
l10n.format.span
Parameters
- node
The node in the original document being processed
- span
The msg:span element in the localized formatter
- font_family
The font family to render the text in
- font_style
The font style, generally used for italic
- font_variant
The font variant, generally used for small-caps
- font_stretch
The amount to stretch the font
- font_size
The size of the text
- text_decoration
The decoration on the text, generally used for underline
Description
6.24. DocBook to HTML - Images and Media
- db2html.imagedata
Renders an imagedata element into an img element
- db2html.imagedata.src
Outputs the content of the src attribute for an img element
- db2html.mediaobject
Outputs HTML for a mediaobject element
- db2html.imagedata — Renders an imagedata element into an img element
- db2html.imagedata.src — Outputs the content of the src attribute for an img element
- db2html.mediaobject — Outputs HTML for a mediaobject element
db2html.imagedata
Parameters
- node
The element to render
Description
This template creates an img element in the HTML output. This named template is called not only for imagedata elements, but also for graphic and inlinegraphic elements. Note that graphic and inlinegraphic are deprecated and should not be used in any newly-written DocBook files. Use mediaobject instead.
db2html.imagedata.src
Parameters
- node
The element to render
Description
This template is called by db2html.imagedata.src for the content of the src attribute of an img element.
db2html.mediaobject
Parameters
- node
The element to render
Description
This template processes a mediaobject element and outputs the appropriate HTML. DocBook allows multiple objects to be listed in a mediaobject element. Processing tools are expected to choose the earliest suitable object. Currently, this template only chooses the first suitable imageobject element. Support for videobject and audioobject should be added in future versions, as well as a text-only mode.
6.25. DocBook to HTML - Question and Answer Sets
- db2html.qanda.css
Outputs CSS that controls the appearance of question and answer elements
- db2html.qanda.css — Outputs CSS that controls the appearance of question and answer elements
6.27. DocBook to HTML - Tables
- db2html.row
Creates a tr element for a row element
- db2html.entry
Creates a td element for an entry element
- db2html.entry.implicit
Creates an implicit td element to fill up unoccupied columns
- db2html.entry.colnum
Calculates the actual column number for an entry element
- db2html.colspec.colnum
Calculates the column number for a colspec element
- db2html.entry.colspan
Calculates the colspan for an entry element
- db2html.spanstr
Generates a string specifying the row spans in effect
- db2html.spanstr.pop
Calculates the remaining spans after an entry element
- db2html.row — Creates a tr element for a row element
- db2html.entry — Creates a td element for an entry element
- db2html.entry.implicit — Creates an implicit td element to fill up unoccupied columns
- db2html.entry.colnum — Calculates the actual column number for an entry element
- db2html.colspec.colnum — Calculates the column number for a colspec element
- db2html.entry.colspan — Calculates the colspan for an entry element
- db2html.spanstr — Generates a string specifying the row spans in effect
- db2html.spanstr.pop — Calculates the remaining spans after an entry element
db2html.row
Parameters
- row
The row element to process
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- colsep
Whether column separators are currently enabled
- rowsep
Whether column separators are currently enabled
- spanstr
The string representation of the row spans
Description
FIXME
db2html.entry
Parameters
- entry
The entry element to process
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- colsep
Whether column separators are currently enabled
- rowsep
Whether column separators are currently enabled
- colpos
The output column position currently being considered
- colnum
The actual column number of entry
- spanstr
The string representation of the row spans
Description
This template processes a single entry element and generates td elements as needed. It then calls itself on the following entry element, adjusting parameters as necessary. Under certain conditions, this template may not be able to output a td element immediately. In these cases, it makes whatever adjustments are needed and calls itself or db2html.entry.implicit (which, in turn, calls this template again when it's finished).
Three parameters are used to determine whether a td element can be output. The spanstr parameter provides infomation about row spans in effect from entries in previous rows; the colpos parameter specifies which column we would output to if we created a td; and the colnum parameter specifies which column this entry should be in, according to any relevant colspec or spanspec elemets.
There are two conditions that cause this template not to output a td element immediately: if the spanstr parameter does not start with 0:, and if the colpos parameter is less than the colnum parameter.
The spanstr parameter specifies the row spans in effect from entries in previous rows. As this template iterates over the entry elements, it strips off parts of spanstr so that only the parts relevant to the entry are present. If spanstr does not start with 0:, then an entry in a previous row occupies this column position. In this case, that value is removed from spanstr, the colpos parameter is incremented, and db2html.entry is called again. Additionally, since db2html.entry.colnum doesn't consider row spans, the colnum parameter may be incremented as well.
If the colpos parameter is less than the colnum parameter, then the document has skipped entries by explicitly referencing a column. This is allowed in CALS tables, but not in HTML. To fill the blank spaces, we call db2html.entry.implicit, which outputs an empty td element spanning as many columns as necessary to fill in the blanks. The db2html.entry.implicit template then calls this template again with appropriate parameter values.
When this template is finally able to output a td element, it calculates appropriate values for the style and class attribute based on DocBook attributes on the entry, the relevant colspec or spanspec, and any relevant ancestor elements. It then calls itself on the following entry element to output the next td.
db2html.entry.implicit
Parameters
- entry
The entry element currently being processed
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- colsep
Whether column separators are currently enabled
- rowsep
Whether column separators are currently enabled
- colpos
The output column position currently being considered
- colnum
The actual column number of entry
- colspan
How many columns the implicit td currently spans
- spanstr
The string representation of the row spans
Description
CALS tables in DocBook don't need to have entry elements for each column in each row, even when the column is not covered by a row-spanning entry from a previous row. An entry can explicitly specify which column it's in, and any previous unfilled columns are considered blank. Since HTML tables don't have this mechanism, we have to insert blank td elements to fill the gaps.
When db2html.entry detects a blank entry, it will call this template with the approprite parameters. This template then calls itself recursively, each time adjusting the colpos, colspan, and spanstr parameters, until it comes across the last column that needs to be filled. It then outputs a td element with an appropriate colspan attribute.
Finally, this template calls db2html.entry again on entry. With the values of colpos and spanstr suitably adjusted, that template is then able to output the td for the entry element.
db2html.entry.colnum
Parameters
- entry
The entry element to process
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- colpos
The column position, as passed by the preceding entry
Description
FIXME
db2html.colspec.colnum
Parameters
- colspec
The colspec element to process
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
Description
FIXME
db2html.entry.colspan
Parameters
- entry
The entry element to process
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
Description
This template calculates how many columns an entry element should span. In CALS tables, column spanning is done by specifying starting and ending colspec elements, or by specifying a spanspec element which specifies starting and ending colspec elements.
db2html.spanstr
Parameters
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- spanstr
The spanstr parameter used by the previous row
Description
db2html.spanstr.pop
Parameters
- colspecs
The colspec elements currently in scope
- spanspecs
The spanspec elements currently in scope
- colspan
The number of columns to pop
- spanstr
The string representation of the column spans
Description
6.28. DocBook to HTML - Titles and Subtitles
This stylesheet is going away
- db2html.title.block
Generates a labeled block title
- db2html.title.header
This template is going away
- db2html.title.block — Generates a labeled block title
- db2html.title.header — This template is going away
db2html.title.block
Parameters
- node
The element to generate a title for
- referent
The element that node is a title for
- lang
The locale of the text in node
- dir
The text direction, either ltr or rtl
Description
6.29. DocBook to HTML - Links and Cross References
- db2html.anchor
Generates an anchor point for an element
- db2html.link
Generates a hyperlink from a link element
- db2html.ulink
Generates a hyperlink from a ulink element
- db2html.xref
Generates a hyperlink from an xref element
- db2html.anchor — Generates an anchor point for an element
- db2html.link — Generates a hyperlink from a link element
- db2html.ulink — Generates a hyperlink from a ulink element
- db2html.xref — Generates a hyperlink from an xref element
db2html.anchor
Parameters
- node
The element to generate an anchor for
- name
The text to use for the name attribute
Description
db2html.link
Parameters
- linkend
The id of the element being linked to
- target
The element being linked to
Description
db2html.ulink
Parameters
- url
The URL to link to
- content
Optional content to use for the text of the link
Description
db2html.xref
Parameters
- linkend
The id of the element being linked to
- target
The element being linked to
- endterm
The id of an element whose contents will be used for the link text
- xrefstyle
The style of cross reference text to use
- content
Optional content to use for the text of the link
Description
6.30. DocBook to ScrollKeeper OMF
- db2omf.basename
The basename of the referenced document
- db2omf.format
The format of the referenced document
- db2omf.mime
The MIME type of the referenced document
- db2omf.dtd
The FPI of the DocBook version used
- db2omf.lang
The written language of the referenced document
- db2omf.omf_dir
The top-level ScrollKeeper OMF directory
- db2omf.help_dir
The top-level directory where documentation is installed
- db2omf.omf_in
Path to the OMF input file containing common fields
- db2omf.scrollkeeper_cl
The path to the installed scrollkeeper_cl.xml file
- db2omf.omf
Generates the top-level omf and all its children
- db2omf.omf.creator
Generates all the creator elements for an OMF file
- db2omf.omf.maintainer
Generates all the maintainer elements for an OMF file
- db2omf.omf.contributor
Generates all the contributor elements for an OMF file
- db2omf.omf.title
Generates the title element for an OMF file
- db2omf.omf.date
Generates the date element for an OMF file
- db2omf.omf.version
Generates the version element for an OMF file
- db2omf.omf.subject
Generates the subject element for an OMF file
- db2omf.omf.description
Generates the description element for an OMF file
- db2omf.omf.type
Generates the type element for an OMF file
- db2omf.omf.format
Generates the format element for an OMF file
- db2omf.omf.identifier
Generates the identifier element for an OMF file
- db2omf.omf.language
Generates the language element for an OMF file
- db2omf.omf.relation
Generates the relation element for an OMF file
- db2omf.omf.rights
Generates the rights element for an OMF file
- db2omf.basename — The basename of the referenced document
- db2omf.format — The format of the referenced document
- db2omf.mime — The MIME type of the referenced document
- db2omf.dtd — The FPI of the DocBook version used
- db2omf.lang — The written language of the referenced document
- db2omf.omf_dir — The top-level ScrollKeeper OMF directory
- db2omf.help_dir — The top-level directory where documentation is installed
- db2omf.omf_in — Path to the OMF input file containing common fields
- db2omf.scrollkeeper_cl — The path to the installed scrollkeeper_cl.xml file
- db2omf.omf — Generates the top-level omf and all its children
- db2omf.omf.creator — Generates all the creator elements for an OMF file
- db2omf.omf.maintainer — Generates all the maintainer elements for an OMF file
- db2omf.omf.contributor — Generates all the contributor elements for an OMF file
- db2omf.omf.title — Generates the title element for an OMF file
- db2omf.omf.date — Generates the date element for an OMF file
- db2omf.omf.version — Generates the version element for an OMF file
- db2omf.omf.subject — Generates the subject element for an OMF file
- db2omf.omf.description — Generates the description element for an OMF file
- db2omf.omf.type — Generates the type element for an OMF file
- db2omf.omf.format — Generates the format element for an OMF file
- db2omf.omf.identifier — Generates the identifier element for an OMF file
- db2omf.omf.language — Generates the language element for an OMF file
- db2omf.omf.relation — Generates the relation element for an OMF file
- db2omf.omf.rights — Generates the rights element for an OMF file
db2omf.help_dir
Description
db2omf.scrollkeeper_cl
Description
db2omf.omf
Parameters
- info
The info element containing metadata
Description
db2omf.omf.creator
Parameters
- info
The info element containing metadata
Description
db2omf.omf.maintainer
Parameters
- info
The info element containing metadata
Description
db2omf.omf.contributor
Parameters
- info
The info element containing metadata
Description
db2omf.omf.title
Parameters
- info
The info element containing metadata
Description
db2omf.omf.date
Parameters
- info
The info element containing metadata
Description
db2omf.omf.version
Parameters
- info
The info element containing metadata
Description
db2omf.omf.subject
Parameters
- info
The info element containing metadata
Description
db2omf.omf.description
Parameters
- info
The info element containing metadata
Description
db2omf.omf.type
Parameters
- info
The info element containing metadata
Description
db2omf.omf.format
Parameters
- info
The info element containing metadata
Description
db2omf.omf.identifier
Parameters
- info
The info element containing metadata
Description
db2omf.omf.language
Parameters
- info
The info element containing metadata
Description
db2omf.omf.relation
Parameters
- info
The info element containing metadata
Description
6.31. Themes
This module provides a common interface to specify custom colors and icons for transformations to presentation-oreinted formats. This allows similar output for different types of input documents. Theme information may either be passed in as XSLT parameters or specified in a theme file.
- theme.color.background
The background color
- theme.color.link
The color of links
- theme.color.link_visited
The color of visited links
- theme.color.text
The normal text color
- theme.color.text_light
The light text color
- theme.color.blue_background
The blue background color
- theme.color.blue_border
The blue border color
- theme.color.gray_background
The gray background color
- theme.color.gray_border
The gray border color
- theme.color.red_background
The red background color
- theme.color.red_border
The red border color
- theme.color.yellow_background
The yellow background color
- theme.color.yellow_border
The yellow border color
- theme.icon.admon.path
The default path to the admonition icons
- theme.icon.admon.size
The size of the admonition icons
- theme.icon.admon.bug
The path for the bug admonition icon
- theme.icon.admon.caution
The path for the caution admonition icon
- theme.icon.admon.important
The path for the important admonition icon
- theme.icon.admon.note
The path for the note admonition icon
- theme.icon.admon.tip
The path for the tip admonition icon
- theme.icon.admon.warning
The path for the warning admonition icon
- theme.watermark.path
The default path to the watermark graphics
- theme.watermark.blockquote
The path for the blockquote watermark graphic
- theme.watermark.code
The path for the code block watermark graphic
- theme.color.background — The background color
- theme.color.link — The color of links
- theme.color.link_visited — The color of visited links
- theme.color.text — The normal text color
- theme.color.text_light — The light text color
- theme.color.blue_background — The blue background color
- theme.color.blue_border — The blue border color
- theme.color.gray_background — The gray background color
- theme.color.gray_border — The gray border color
- theme.color.red_background — The red background color
- theme.color.red_border — The red border color
- theme.color.yellow_background — The yellow background color
- theme.color.yellow_border — The yellow border color
- theme.icon.admon.path — The default path to the admonition icons
- theme.icon.admon.size — The size of the admonition icons
- theme.icon.admon.bug — The path for the bug admonition icon
- theme.icon.admon.caution — The path for the caution admonition icon
- theme.icon.admon.important — The path for the important admonition icon
- theme.icon.admon.note — The path for the note admonition icon
- theme.icon.admon.tip — The path for the tip admonition icon
- theme.icon.admon.warning — The path for the warning admonition icon
- theme.watermark.path — The default path to the watermark graphics
- theme.watermark.blockquote — The path for the blockquote watermark graphic
- theme.watermark.code — The path for the code block watermark graphic
theme.color.background
Description
This parameter specifies the default background color.
theme.color.link
Description
If set, this parameter specifies the color for unvisited links.
theme.color.link_visited
Description
This parameter specifies the color for visited links.
theme.color.text
Description
This parameter specifies the default color for normal text.
theme.color.text_light
Description
This parameter specifies the color for light text. The light text color is used to make bold headings and certain parenthetical text less intense.
theme.color.blue_background
Description
This parameter specifies the blue background color. The blue background color may be used by certain types of block elements.
theme.color.blue_border
Description
This parameter specifies the blue border color. The blue border color may be used by certain types of block elements.
theme.color.gray_background
Description
This parameter specifies the gray background color. The gray background color may be used by certain types of block elements.
theme.color.gray_border
Description
This parameter specifies the gray border color. The gray border color may be used by certain types of block elements.
theme.color.red_background
Description
This parameter specifies the red background color. The red background color may be used by certain types of block elements.
theme.color.red_border
Description
This parameter specifies the red border color. The red border color may be used by certain types of block elements.
theme.color.yellow_background
Description
This parameter specifies the yellow background color. The yellow background color may be used by certain types of block elements.
theme.color.yellow_border
Description
This parameter specifies the yellow border color. The yellow border color may be used by certain types of block elements.
theme.icon.admon.path
Description
This parameter specifies a default path where admonition icons can be found. This is only a default path. It has no effect on admonition icons for which the corresponding parameter has been specified explicitly.
theme.icon.admon.size
Description
This parameter specifies the size of the icons given in theme.icon.admon.bug, theme.icon.admon.caution, theme.icon.admon.important, theme.icon.admon.note, theme.icon.admon.tip, and theme.icon.admon.warning. The value of this parameter should be a single integer specifying both the width and the height in pixels. Icon sizes are assumed to be square.
theme.icon.admon.bug
Description
This parameter specifies the icon used for bug admonitions.
theme.icon.admon.caution
Description
This parameter specifies the icon used for caution admonitions.
theme.icon.admon.important
Description
This parameter specifies the icon used for important admonitions.
theme.icon.admon.note
Description
This parameter specifies the icon used for note admonitions.
theme.icon.admon.tip
Description
This parameter specifies the icon used for tip admonitions.
theme.icon.admon.warning
Description
This parameter specifies the icon used for warning admonitions.
theme.watermark.path
Description
This parameter specifies a default path where watermark graphics can be found. This is only a default path. It has no effect on watermark graphics for which the corresponding parameter has been specified explicitly.
theme.watermark.blockquote
Description
This parameter specifies the graphic file used for blockquote watermarks. Note that the default graphic is translatable. If you set this parameter, you should ensure that your graphic uses a suitable quote character for the language your document is written in.
6.32. Common XSLT Utilities
- utils.strip_newlines
Strips leading or trailing newlines from a string
- utils.strip_newlines — Strips leading or trailing newlines from a string
utils.strip_newlines
Parameters
- string
The string to strip newlines from
- leading
Whether to strip leading newlines
- trailing
Whether to strip trailing newlines
Description
This template strips at most one leading and one trailing newline from string. This is useful for preformatted block elements where leading and trailing newlines are ignored to make source formatting easier for authors.
6.33. Localized Strings
- l10n.locale
The top-level locale of the document
- l10n.language
The language part of the top-level locale of the document
- l10n.region
The region part of the top-level locale of the document
- l10n.variant
The variant part of the top-level locale of the document
- l10n.charset
The charset part of the top-level locale of the document
- l10n.format.mode
FIXME
- l10n.gettext
Looks up the translation for a string
- l10n.plural.form
Extracts he plural form string for a given cardinality
- l10n.direction
Determines the text direction for the language of the document
- l10n.align.start
Determines the start alignment
- l10n.align.end
Determines the end alignment
- l10n.arrow.previous
FIXME
- l10n.arrow.next
FIXME
- l10n.language
Extracts the langauge portion of a locale
- l10n.region
Extracts the region portion of a locale
- l10n.variant
Extracts the variant portion of a locale
- l10n.charset
Extracts the charset portion of a locale
- l10n.locale — The top-level locale of the document
- l10n.language — The language part of the top-level locale of the document
- l10n.region — The region part of the top-level locale of the document
- l10n.variant — The variant part of the top-level locale of the document
- l10n.charset — The charset part of the top-level locale of the document
- l10n.format.mode — FIXME
- l10n.gettext — Looks up the translation for a string
- l10n.plural.form — Extracts he plural form string for a given cardinality
- l10n.direction — Determines the text direction for the language of the document
- l10n.align.start — Determines the start alignment
- l10n.align.end — Determines the end alignment
- l10n.arrow.previous — FIXME
- l10n.arrow.next — FIXME
- l10n.language — Extracts the langauge portion of a locale
- l10n.region — Extracts the region portion of a locale
- l10n.variant — Extracts the variant portion of a locale
- l10n.charset — Extracts the charset portion of a locale
l10n.format.mode
Parameters
- node
The node being processed in the original document
- string
String content to use for certain message format nodes
Description
l10n.gettext
Parameters
- msgid
The id of the string to look up, often the string in the C locale
- lang
The locale to use when looking up the translated string
- lang_language
The language portion of the lang
- lang_region
The region portion of lang
- lang_variant
The variant portion of lang
- lang_charset
The charset portion of lang
- number
The cardinality for plural-form lookups
- form
The form name for plural-form lookups
Description
l10n.plural.form
Parameters
- number
The cardinality of the plural form
- lang
The locale to use when looking up the translated string
- lang_language
The language portion of the lang
- lang_region
The region portion of lang
- lang_variant
The variant portion of lang
- lang_charset
The charset portion of lang
Description
l10n.direction
Parameters
- lang
The locale to use to determine the text direction
- lang_language
The language portion of the lang
- lang_region
The region portion of lang
- lang_variant
The variant portion of lang
- lang_charset
The charset portion of lang
Description
l10n.align.start
Parameters
- direction
The text direction
Description
l10n.align.end
Parameters
- direction
The text direction
Description
l10n.language
Parameters
- lang
The locale to extract the language from
Description
l10n.region
Parameters
- lang
The locale to extract the region from
Description
l10n.variant
Parameters
- lang
The locale to extract the variant from
Description
6.34. Localized Numbers
- l10n.number
Formats a number according to a localized numbering system
- l10n.number.alphabetic
Formats a number using an alphabetic numbering system
- l10n.number.numeric
Formats a number using a numeric numbering system with any radix
- l10n.number.cjk-ideographic
Formats a number using a CJK ideographic system
- l10n.number.ionic
Formats a number using the Ionic numeral system
- l10n.number — Formats a number according to a localized numbering system
- l10n.number.alphabetic — Formats a number using an alphabetic numbering system
- l10n.number.numeric — Formats a number using a numeric numbering system with any radix
- l10n.number.cjk-ideographic — Formats a number using a CJK ideographic system
- l10n.number.ionic — Formats a number using the Ionic numeral system
l10n.number
Parameters
- value
The numeric value of the number to format
- format
The numbering system to use
Description
l10n.number.alphabetic
Parameters
- value
The numeric value of the number to format
- alphabet
A string containing the characters of the alphabet to use
Description
l10n.number.numeric
Parameters
- value
The numeric value of the number to format
- digits
A string containing the digits to use, starting with zero
Description
l10n.number.cjk-ideographic
Parameters
- value
The numeric value of the number to format
- format
Which ideographic system to use
Description
Chunking refers to creating a separate output file for an element. For example, if there are three <sect1> elements within a document, (with no subsections) then there will be three files generated for each element. Incidentally, the name of the files will be the same as the element's id attribute.
