summaryrefslogtreecommitdiffstats
path: root/kdoctools/docbook/xsl/html
diff options
context:
space:
mode:
Diffstat (limited to 'kdoctools/docbook/xsl/html')
-rw-r--r--kdoctools/docbook/xsl/html/ChangeLog2221
-rw-r--r--kdoctools/docbook/xsl/html/admon.xsl130
-rw-r--r--kdoctools/docbook/xsl/html/autoidx-ng.xsl99
-rw-r--r--kdoctools/docbook/xsl/html/autoidx.xsl488
-rw-r--r--kdoctools/docbook/xsl/html/autotoc.xsl592
-rw-r--r--kdoctools/docbook/xsl/html/biblio.xsl1085
-rw-r--r--kdoctools/docbook/xsl/html/block.xsl426
-rw-r--r--kdoctools/docbook/xsl/html/callout.xsl197
-rw-r--r--kdoctools/docbook/xsl/html/changebars.xsl96
-rw-r--r--kdoctools/docbook/xsl/html/chunk-code.xsl1000
-rw-r--r--kdoctools/docbook/xsl/html/chunk-common.xsl1012
-rw-r--r--kdoctools/docbook/xsl/html/chunk.xsl40
-rw-r--r--kdoctools/docbook/xsl/html/chunker.xsl423
-rw-r--r--kdoctools/docbook/xsl/html/chunkfast.xsl71
-rw-r--r--kdoctools/docbook/xsl/html/chunktoc.xsl243
-rw-r--r--kdoctools/docbook/xsl/html/component.xsl423
-rw-r--r--kdoctools/docbook/xsl/html/division.xsl175
-rw-r--r--kdoctools/docbook/xsl/html/docbook.xsl419
-rw-r--r--kdoctools/docbook/xsl/html/docbookng.xsl7
-rw-r--r--kdoctools/docbook/xsl/html/ebnf.xsl327
-rw-r--r--kdoctools/docbook/xsl/html/footnote.xsl266
-rw-r--r--kdoctools/docbook/xsl/html/formal.xsl342
-rw-r--r--kdoctools/docbook/xsl/html/glossary.xsl369
-rw-r--r--kdoctools/docbook/xsl/html/graphics.xsl1185
-rw-r--r--kdoctools/docbook/xsl/html/html-rtf.xsl335
-rw-r--r--kdoctools/docbook/xsl/html/html.xsl90
-rw-r--r--kdoctools/docbook/xsl/html/htmltbl.xsl55
-rw-r--r--kdoctools/docbook/xsl/html/index.xsl196
-rw-r--r--kdoctools/docbook/xsl/html/info.xsl53
-rw-r--r--kdoctools/docbook/xsl/html/inline.xsl1151
-rw-r--r--kdoctools/docbook/xsl/html/keywords.xsl35
-rw-r--r--kdoctools/docbook/xsl/html/lists.xsl1087
-rw-r--r--kdoctools/docbook/xsl/html/maketoc.xsl83
-rw-r--r--kdoctools/docbook/xsl/html/manifest.xsl120
-rw-r--r--kdoctools/docbook/xsl/html/math.xsl262
-rw-r--r--kdoctools/docbook/xsl/html/oldchunker.xsl202
-rw-r--r--kdoctools/docbook/xsl/html/onechunk.xsl37
-rw-r--r--kdoctools/docbook/xsl/html/param.ent269
-rw-r--r--kdoctools/docbook/xsl/html/param.xml8273
-rw-r--r--kdoctools/docbook/xsl/html/param.xsl315
-rw-r--r--kdoctools/docbook/xsl/html/param.xweb697
-rw-r--r--kdoctools/docbook/xsl/html/pi.xsl207
-rw-r--r--kdoctools/docbook/xsl/html/profile-chunk-code.xsl732
-rw-r--r--kdoctools/docbook/xsl/html/profile-chunk.xsl40
-rw-r--r--kdoctools/docbook/xsl/html/profile-docbook.xsl390
-rw-r--r--kdoctools/docbook/xsl/html/profile-onechunk.xsl37
-rw-r--r--kdoctools/docbook/xsl/html/qandaset.xsl360
-rw-r--r--kdoctools/docbook/xsl/html/refentry.xsl258
-rw-r--r--kdoctools/docbook/xsl/html/sections.xsl551
-rw-r--r--kdoctools/docbook/xsl/html/synop.xsl1363
-rw-r--r--kdoctools/docbook/xsl/html/table.xsl1101
-rw-r--r--kdoctools/docbook/xsl/html/task.xsl69
-rw-r--r--kdoctools/docbook/xsl/html/titlepage.templates.xml659
-rw-r--r--kdoctools/docbook/xsl/html/titlepage.templates.xsl3284
-rw-r--r--kdoctools/docbook/xsl/html/titlepage.xsl807
-rw-r--r--kdoctools/docbook/xsl/html/toc.xsl173
-rw-r--r--kdoctools/docbook/xsl/html/verbatim.xsl371
-rw-r--r--kdoctools/docbook/xsl/html/xref.xsl1160
58 files changed, 36458 insertions, 0 deletions
diff --git a/kdoctools/docbook/xsl/html/ChangeLog b/kdoctools/docbook/xsl/html/ChangeLog
new file mode 100644
index 000000000..af56946bb
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/ChangeLog
@@ -0,0 +1,2221 @@
+2004-11-23 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * autotoc.xsl, param.ent, param.xweb: RFE #1069397 Add new parameter simplesect.in.toc
+
+ - default value of 0 causes simplesect to be omitted from TOCs
+ - to cause simplesect to be included in TOCs, you must set the
+ value of simplesect.in.toc to 1
+
+ note from Norm:
+
+ Simplesect elements aren't supposed to appear in the ToC at
+ all. Ugh. The Definitive Guide doesn't really explain that
+ very well.
+
+ The use case for simplesect is when, for example, every
+ chapter in a book ends with "Exercises" or "For More
+ Information" sections and you don't want those to appear in
+ the ToC.
+
+ * refentry.xsl: Patch #1057029 - Fix titleabbrev warnings in reference (patch from
+ anatoly techtonik)
+
+ * sections.xsl: Bug #1068455 (Invalid h7, h8, etc. generated for deeply nested sections)
+
+ ::CAUSE
+ Stylesheet HTML heading-generation didn't anticipate that some
+ jokers like to nest sections really, really deep. Not naming any
+ names...
+
+ ::FIX
+ Refined logic to safely handle documents produced by the "I can
+ nest sections deeper than you can" crowd
+
+2004-11-19 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * sections.xsl: Bug #1066753 -- subtitle is severely broken (reported by Sam Steingold)
+
+ ::PROBLEM
+ In (X)HTML output, subtitle for the simplesect element generates an
+ h2 head, no matter at what level in the sectioning hiearchy the
+ simplesect occurs; end up with cases where a simplesect is
+ output with (for example), an h4 title but a h2 subtitle
+
+ ::CAUSE and FIX
+ No template for simplesect/subtitle in the set of templates that
+ call the section.subtitle named template, so stylesheets fell
+ back to using the titlepage.mode template for subtitle
+
+ ::FIX
+ Added simplesect/subtitle to the set of templates that
+ call the section.subtitle named template.
+
+ ::AFFECTS
+ Only affects (X)HTML output of simplesect/subtitle; nothing else
+
+2004-11-17 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, autoidx.xsl, docbook.xsl, param.ent, param.xweb:
+ Added new parameter index.prefer.titleabbrev. When set to 1, index references will use titleabbrev instead of title when available.
+
+ * manifest.xsl: Removed reference to index HTML pages from manifest if the output format is HTML Help
+
+2004-11-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Fixed bugs in simplesect handling.
+
+2004-11-09 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * synop.xsl: Revert change for tracker #1008804 (command in cmdsynopsis is not indented)
+ Will re-implement (correctly) for next release.
+
+2004-11-08 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * inline.xsl: Replace <tt></tt> output with <code></code>
+
+2004-10-30 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * admon.xsl: Change admon.graphic.width template to a mode so that different
+ admonitions can have different graphical widths.
+
+2004-10-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * verbatim.xsl: Deprecated shade.verbatim
+
+2004-10-25 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * autotoc.xsl: Request #585543 (Quickref-style reference ToC)
+
+ Wrapped ToC refentrytitle/refname and refpurpose in
+ span with class values. This makes it possible to style
+ them using a CSS stylesheet containing something like below.
+
+ Implementing tablular look for FO output will have to wait...
+
+ div.toc {
+ padding-bottom: 20px;
+ }
+
+ div.toc dt, div.toc li {
+ clear: both;
+ }
+
+ div.toc span.refentrytitle {
+ float: left;
+ text-align: left;
+ }
+
+ div.toc span.refpurpose {
+ float: right;
+ width: 65%;
+ text-align: left;
+ }
+
+ hr {
+ clear: both;
+ }
+
+ * synop.xsl: Feature Request #1008804 (command in cmdsynopsis is not indented)
+
+ Added some CSS magic to enable the requested effect; this change:
+
+ - makes all cmdsynopses monospaced
+
+ - creates CSS floats that make a hanging indent (aka tabular
+ presentation) for cmdysnopsis; command name appears first
+ column, everything else (arg/group/synopfragment) goes to
+ second column
+
+ Probably should also add parameters to toggle behavior on/off...
+
+2004-10-24 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * glossary.xsl: Fixed bug #1031851. Target of link is computed by href.target template.
+
+ * inline.xsl: Fixed bug #977874. Remark/comment is rendered as a block/inline depending on its context.
+
+2004-10-23 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Patch #1037326: Don't generate up link when up=home in chunker
+
+ * inline.xsl: Patch #1027078: Support role=strong on emphasis; use strong/em instead of b/i
+
+2004-10-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Bug #1050205; scale component titles if the component is a child of a section
+
+2004-10-20 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param: Added new parameter hyphenate.verbatim that can be used to turn on "intelligent" wrapping of verbatim environments.
+
+2004-10-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Bug 992905: fixed ugly interaction between bibliography.collection and bibliography.number
+
+2004-10-14 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * chunk-code.xsl, chunk-common.xsl, manifest.xsl: Bug #1046371 - chunk children of Part
+
+ Problem:
+ Glossary, Bibliography, and Index were not getting chunked when
+ they occurred as children of Part. They should be, because other
+ components (Chapter, Article, Appendix, etc.) within Part are
+ chunked.
+
+ Fix:
+ Added code to have Part chunked in same manner as Book and
+ Article.
+
+ Areas affected:
+ Chunking (no effect on non-chunked output) + manifest
+
+ Notes:
+ Discovered a different bug when testing this (bug #1047151):
+ content of indexes within components sometimes end up being
+ identical to content of the master index for the whole division
+ they are a part of (e.g., the whole Book or Set)
+
+2004-09-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Support package element
+
+2004-09-19 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Added a class attribute to anchors for olink cross references.
+
+2004-09-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Fixed bug in olink resolution.
+
+2004-08-26 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * autoidx-ng.xsl: Sort language is taken from document not from system environment
+
+2004-08-26 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * param.ent, param.xweb: Added component.label.includes.part.label parameter.
+
+2004-08-19 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param: Numbering and formatting of normal and ulink footnotes has been unifyed.
+
+2004-08-15 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: Add support for @renderas to section and sect1 et al headings.
+
+2004-08-14 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Add call to anchor template for seglistitem so it can be linked to.
+
+ * lists.xsl: Added class attributes for segmentedlist elements for table presentation.
+
+ * lists.xsl: Fix bug #983042 to make segmentedlist HTML markup more semantic
+ and available to CSS styles.
+
+2004-08-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk-code.xsl: Fixed bug #967909 incorrect 'next' link for index in chapter.
+
+ * chunk-common.xsl: index is defined as chunk only if $generate.index != 0.
+
+ * chunk-common.xsl, docbook.xsl, graphics.xsl, titlepage.xsl:
+ Bug 955623: Added user.preroot placeholder template to permit xsl-stylesheet
+ and other PIs and comments to be output before the HTML root element.
+
+ * footnote.xsl: RFE 782817, added support for @label in footnote.
+
+ * titlepage.xsl: Non-chunked legalnotice now gets an <a name="id"> so it can be
+ referenced with xref or link.
+
+2004-08-12 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * graphics.xsl, param.ent, param.xweb: For RFE 790517, added parameter img.src.path as a prefix
+ to HTML img src attributes.
+
+2004-08-11 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * biblio.xsl, titlepage.xsl: Added support for 4.3 corpcredit element.
+
+ * chunk-common.xsl: Changed link rel="home" to rel="start", and
+ link rel="previous" to rel="prev", per W3C HTML 4.01 spec.
+
+ * graphics.xsl: Made file extension selection case insensitive.
+
+2004-08-09 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * docbook.xsl: Now includes common/olink.xsl after olink rewrite.
+
+ * param.ent, param.xweb, xref.xsl: Rewrote olink templates to support new features.
+
+2004-08-06 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * graphics.xsl: Fixed bug where ximg:getDepth was using $nominal.image.width instead of depth.
+
+ * table.xsl: Fixed Bug #840187 entrytbl needs width="100%" on the table element.
+
+2004-07-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Allow calloutlist to have block content before the first callout
+
+2004-07-18 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * titlepage.xsl: Added collabname in titlepage.mode.
+
+2004-06-26 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk-code.xsl, graphics.xsl: @fileref now resolves xml:base attributes.
+
+ * graphics.xsl: Changed @fileref processing to support xml:base.
+
+2004-06-20 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * param.ent, param.xweb: Added section.autolabel.max.depth parameter.
+
+2004-06-14 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, autoidx-ng.xsl: Updated i18n indexing method to support new type attribute and index.on.type parameter
+
+2004-06-14 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Added support for xrefstyle attrib in olinks.
+
+2004-06-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl: Removed extraneous 'see' template under teriary seealso processing.
+
+ * autoidx.xsl: Added support for index.on.type to support new type attribute
+ on indexterm an index.
+
+ * chunk-code.xsl: Fixed bug in generated filename for separate TOC chunk.
+
+ * param.ent, param.xweb: Added index.on.type parameter to support new 'type' attribute
+ on indexterms and index.
+
+2004-05-28 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl: Fix for bug #893438: only first seealso processed.
+
+ * xref.xsl: Remove spurious error messages during xref target collection for olinks.
+
+2004-05-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl: Move blockquote attributions over a bit
+
+2004-05-17 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl: Fixed bug in Symbols section when index.on.role value used.
+
+2004-05-16 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * autoidx-ng.xsl: Added support for index.on.role into internatinalized indexing
+
+2004-05-07 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Added 'index' to selected nodes for component.toc. Since it is
+ permitted by the DTD, it should be in the TOC.
+
+2004-04-26 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Fix for procedure not getting an anchor if it has a title.
+
+2004-04-21 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk-code.xsl: Add make.lot.chunk template to generate separate LoT files.
+
+2004-04-19 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk-code.xsl: Changed make.lots to support the new chunk.separate.lots parameter.
+
+ * param.ent, param.xweb: Added chunk.separate.lots parameter.
+
+ * xref.xsl: Now reports proper error if $current.docid parameter used
+ but the value is not found in target database.
+
+2004-04-18 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl: Add support for generating an index containing only
+ those terms with a matching role attribute.
+
+ * param.ent, param.xweb: Added index.on.role parameter.
+
+2004-04-11 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * admon.xsl: Fixed bug #872941 where admonition graphic 'alt' text was not translated.
+
+ * autotoc.xsl: Fixes bug #814589, so that refentry in an appendix is now
+ listed in the table of contents.
+
+ * formal.xsl: Fixed bug #881546 where an HTML table was not getting
+ a generated ID so the link to it from the TOC failed.
+
+ * formal.xsl: Added title parameter to formal.object.heading since the
+ match="abstract" template is trying to use it with such
+ a parameter.
+
+2004-03-25 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * graphics.xsl: Support default textdata encoding also on files included via imagedata and inlinegraphics.
+
+2004-03-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Fix typo in attribute quoting
+
+2004-03-24 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, graphics.xsl, param.ent, param.xweb:
+ Added Saxon support for encoding attribute on textdata. Added new parameter textdata.default.encoding which specifies encoding when encoding attribute on textdata is missing.
+
+2004-02-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * biblio.xsl, glossary.xsl, index.xsl: Removed obsolete component.title.mode templates.
+
+2004-01-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Use titleabbrev in ToC
+
+ * biblio.xsl: Support info in bibliography mode; support personblurb as an alternative to authorblurb
+
+ * component.xsl: Support 'info'
+
+ * docbook.xsl: Support DocBook NG by way of the following hack: if we find an NG document, do an identity transform to throw away the NG namespace and then process the result. Requires exsl:node-set().
+
+ * docbookng.xsl: New file.
+
+ * inline.xsl: Support 'tag' as a synonym for 'sgmltag'
+
+ * lists.xsl: Make simpara in callout magic; don't output a p inside the li. Sigh.
+
+ * table.xsl: Support bgcolor and class dbhtml PIs on table rows
+
+ * titlepage.xsl: Support personblurb as a synonym for authorblurb
+
+ * xref.xsl: Support xref to personblurb the same way as authorblurb
+
+2004-01-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Initial support for bibliolist
+
+ * table.xsl: Abort if there's no @cols
+
+2003-12-31 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * autoidx-ng.xsl: New file.
+
+2003-12-30 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * biblio.xsl, xref.xsl: Changed document($bibliography.collection)
+ to document($bibliography.collection,.) so it will
+ look in the current directory instead of
+ the stylesheet directory.
+
+ * graphics.xsl: Fixed test for graphic inside inlineequation.
+
+ * xref.xsl: Added refsection to mode="xref-to" to support xref to refsection.
+
+2003-12-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix ugly performance problem in footer.navigation (thanks again Guillaume du Bourguet)
+
+2003-12-12 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * inline.xsl: Fix bug [ 841586 ] id-attibute in firstterm prohibits link to glossary.
+
+2003-12-09 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Omit setindex from TOC if $generate.index = 0
+
+2003-12-05 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * table.xsl: Now colwidth="*" treated as colwidth="1*" for tablecolumns extension.
+
+2003-12-01 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Processing of listitems now processes and preserves order of comments and PIs.
+
+2003-11-30 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl, changebars.xsl, chunk-code.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunkfast.xsl, chunktoc.xsl, html-rtf.xsl, htmltbl.xsl, maketoc.xsl, manifest.xsl, oldchunker.xsl, onechunk.xsl, profile-chunk.xsl, profile-onechunk.xsl, task.xsl:
+ Added CVS $Id$ comments.
+
+2003-11-29 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added new HTML Help parameters from patches by W. Borgert
+
+2003-11-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Experimental fix for some xref linking issues in cases where dbhtml 'dir' is used.
+
+2003-11-24 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix ugly performance problem with chunking (thanks Guillaume du Bourguet)
+
+ * glossary.xsl: Fix bugs in formatting of glosslist
+
+2003-11-23 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Support code inline
+
+2003-11-02 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk-common.xsl: Moved call to user.head.content to just before </head>
+ to give the user the last word.
+
+2003-10-23 <uid50791@users.sourceforge.net>
+
+ * chunk-code.xsl: Remove index from Next and Previous when
+ $generate.index = 0.
+
+2003-10-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Support stepalternatives
+
+2003-09-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * index.xsl: Handle indexdiv/title properly
+
+ * lists.xsl: Bug #779655: fix PIs and comments in segmented lists
+
+2003-09-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl, qandaset.xsl: Bug #687783: attempt rudimentary support for blockinfo
+
+2003-09-23 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, html.xsl, manifest.xsl, param.ent, param.xweb:
+ Added new parameter manifest.in.base.dir which can be used to place manifest file and also project files for HTML Help and Eclipse Help into base.dir. This improvement also fixes bug (feature) #662955.
+
+2003-08-29 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Fixed bug in new toc.line template.
+
+ * chunker.xsl: No change, just new timestamp so html2xhtml.xsl will
+ update it when generate the xhtml version.
+
+2003-08-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Rudimentary support for @dir
+
+2003-08-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl, formal.xsl, htmltbl.xsl, table.xsl: Reorganize code for consistency with FO; check for obviously broken tables
+
+ * docbook.xsl, task.xsl: Support task
+
+ * formal.xsl, table.xsl: Support HTML tables
+
+ * inline.xsl: Support uri
+
+ * verbatim.xsl: Support startinglinenumber and continuation on verbatim environments
+
+2003-08-07 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * callout.xsl: Fixed callout numbering bug when <co> inside an inline.
+
+2003-08-04 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * qandaset.xsl: Fixed logic for turning on qandaset/qandadiv TOCs with
+ generate.toc param or dbhtml toc PI.
+
+2003-08-01 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * titlepage.xsl: Moved email in "author" template to appear after the
+ affiliation.
+
+2003-07-31 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.xweb: Added missing parameter
+
+2003-07-31 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * qandaset.xsl: Fixed extraneous dot when defaultlabel=qanda.
+
+ * qandaset.xsl: Removed extraneous dot from question in autotoc mode as well
+ when defaultlabel=qanda.
+
+2003-07-25 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * param.ent: Added insert.xref.page.number with value of zero to
+ ensure that xrefstyle attributes don't try to generate
+ a page number reference for HTML output. This parameter
+ does not show up in the HTML doc because it is not
+ to be changed.
+
+ * param.ent, param.xweb: Added xref.label-title.separator, xref.label-page.separator,
+ and xref.title-page.separator parameters to support the
+ xrefstyle select: feature.
+
+2003-07-22 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added support for Eclipse Help Platform
+
+ * html.xsl: Moving template to place where it can be reused
+
+2003-07-21 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Added a toc.line template to handle formatting of each
+ line in a TOC, similar to that in the FO side.
+ Makes customizing HTML toc easier.
+
+2003-07-17 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * graphics.xsl: Image depth calculation was using nominal.image.width
+ when it should have been using nominal.image.depth.
+
+2003-07-10 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Added no-op templates for list titleabbrev elements.
+
+2003-07-08 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * maketoc.xsl: Handle refentry with mode="toc" here since refentry mode="toc"
+ in autotoc.xsl does not use subtoc. This fixes bug #743612.
+
+2003-06-25 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * block.xsl: Process formalpara/title to variable so can test for last
+ char of any generated text.
+
+2003-06-23 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * refentry.xsl: Added param conditional="0" to call to 'anchor' template
+ for refsections, so those sections are
+ valid targets for indexterm links as expected by autoidx.xsl.
+
+2003-06-23 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * titlepage.xsl: DocBook 4.2 allows e-mail address inside author element and now is this feature supported also by stylesheets. Not sure whether this solution is the best, but it works.
+
+2003-06-22 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * docbook.xsl, param.ent, param.xweb: Added draft.mode parameter.
+
+ * graphics.xsl: Fix bug #733406: ignore.image.scaling misses contentwidth.
+
+2003-06-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xweb: Added fragment for draft.mode
+
+2003-06-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl: Make attribution a div not a span
+
+ * chunk-code.xsl: Test part/glossary for chunking
+
+ * html-rtf.xsl: Added remove-empty-div mode
+
+2003-06-19 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Fixed bug 743752 where generate.index=0 and empty index
+ left a dead Index link in the TOC.
+
+ * biblio.xsl: Removed duplicate templates for biblioid.
+
+ * onechunk.xsl, profile-onechunk.xsl: Reset suppress.navigation parameter to 1 to turn off useless nav headers.
+
+2003-05-28 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: Fixed bridgehead renderas levels to match section level.
+ This was missed when the section levels were corrected
+ a couple of releases back.
+
+2003-05-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore: Ignore profile-chunk-code.xsl
+
+2003-05-12 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile, Makefile.param, profile-chunk.xsl, profile-onechunk.xsl:
+ Fixed profiling to work with modified chunking code
+
+2003-05-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Support glossary, bibliography, and index in components
+
+ * block.xsl: Use a div for the attribution so that it can be styled better with CSS
+
+ * chunk-code.xsl, chunk.xsl: Refactored chunking code so that customization of chunk algorithm and chunk elements is more practical
+
+ * param.xweb: Added fragref for admon.textlabel
+
+2003-05-07 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * admon.xsl: admon.textlabel turned off still outputs a note's title child.
+
+ * admon.xsl: Added admon.textlabel parameter to enable turning off
+ the text label such as Note, Warning.
+
+ * param.ent, param.xweb: Fixed name bug in admon.textlabel.
+
+2003-04-14 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, docbook.xsl: Initial support for timestamp PI. From now you can use <?timestamp format="Y-m-d H:M:S"?> to get current datetime in your document. More features like localization and exctracting date from CVS tag will follow.
+
+2003-04-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: A few bug fixes for the colsep/rowsep code
+
+2003-04-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * callout.xsl: Support coref
+
+ * ebnf.xsl: Support ebnf.assignment and ebnf.statement.terminator
+
+ * graphics.xsl: Support textobject/phrase on inlinemediaobject
+
+ * inline.xsl: Support beginpage (does nothing; see TDG)
+
+ * lists.xsl: Support 'start' PI on ordered lists
+
+ * param.ent, param.xweb: Added ebnf.assignment and ebnf.statement.terminator
+
+ * table.xsl: Support bgcolor (instead of entry-bgcolor) PI in table cells; make sure rowsep and colsep don't have any effect on the last row or column
+
+2003-03-26 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * Makefile: wdocbook.xsl obsoleted by w2docbook.xsl, updated globally
+
+2003-03-25 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * Makefile: reverting wdocbook.xsl -> w2docbook.xsl changes
+
+2003-03-24 Michael Smith <xmldoc@users.sourceforge.net>
+
+ * Makefile: wrong filename '../../litprog/wdocbook.xsl' broke build, fixed
+
+2003-03-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl: Added } to background-image css
+
+2003-02-28 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * glossary.xsl: Added warning when $glossary.collection is not blank, but
+ it cannot open the specified file.
+
+2003-02-26 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * qandaset.xsl: Fixed test of $toc PI to turn on qandaset TOC.
+
+2003-02-21 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: Added process.chunk.footnotes to sect2 through 5
+ to fix bug of missing footnotes when chunk level
+ greater than 1.
+
+2003-02-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * sections.xsl: Support subtitle class on section headings (for subtitles, naturally)
+
+2003-02-08 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * glossary.xsl: Fixed bug in glossary.xsl where glosssee and glossseealso were
+ using mode="xref" instead of mode="xref-to".
+
+2003-02-07 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, autotoc.xsl, param.ent, param.xweb: Added paramater toc.max.depth which controls maximal depth of ToC as requested by PHP-DOC group.
+
+2003-02-04 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Added support for elements between variablelist and first
+ varlistentry since DocBook 4.2 supports that now.
+
+ * lists.xsl: Exempted titleabbrev from preamble processing in lists,
+ and fixed variablelist preamble code to use the same syntax
+ as the other lists.
+
+2003-01-30 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * qandaset.xsl: Corrected several references to parameter $qanda.defaultlabel
+ that were missing the "$".
+
+2003-01-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Check for glossterm.auto.link when linking firstterms; don't output gl. prefix on glossterm links
+
+2003-01-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Fix bugs in presentation of graphic width/height
+
+ * inline.xsl: Add class attributes to inline elements
+
+ * xref.xsl: Format chapter and appendix titles consistently in xrefs
+
+2003-01-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Bug #663331: add article to section entity
+
+ * biblio.xsl: Bug #640762: Support new biblioentry elements
+
+ * chunk-common.xsl: Bug #648473: don't output the html.ext when using dbhtml filenames
+
+ * footnote.xsl: Support {table.}footnote.number.{format,symbols}
+
+ * glossary.xsl: Support glossentry.show.acronym
+
+ * param.ent, param.xweb: Support xref.with.number.and.title
+
+ * param.ent, param.xweb: Added {table.}footnote.number.{format,symbols}, entry.propagates.style, and glossentry.show.acronym
+
+ * sections.xsl: Don't force a ToC for refentrys
+
+ * table.xsl: Support entry.propagates.style
+
+ * titlepage.templates.xml: SIGNIFICANT changes to the titlepage template setup. See RELEASE-NOTES.
+
+ * xref.xsl: Handle xref to glossentry
+
+2003-01-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Output ul list type only if css.decoration is non-zero
+
+ * xref.xsl: Remove duplicated IDs when endterm is used on xref
+
+2003-01-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Make sure that indexdivs are properly scoped. I've done this by adding a test to suppress the division if it contains no terms. It seems like there might be a better way, but I can't see it just at the moment
+
+2003-01-08 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: In olink, use document($target.database.document, /) so the
+ olink database location is relative to the document, not
+ the stylesheet.
+
+2003-01-06 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl, index.xsl: Removed unnecessary generate-index-from-terms template in
+ favor of generate-index with scope parameter.
+
+2003-01-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl, index.xsl: Rework indexing to avoid XSLT limitation/Saxon bug with context dependencies; finish porting Bob's changes from FO to HTML
+
+ * index.xsl, titlepage.templates.xml, titlepage.xsl: Support setindex (there were all sorts of things wrong with it)
+
+2003-01-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl, index.xsl: Make index elements always index the book that contains them (if there is one, otherwise the whole document); setindex always indexes the whole document
+
+ * autotoc.xsl: Support List of Procedures
+
+ * formal.xsl, xref.xsl: Use titleabbrev instead of title in xrefs
+
+ * graphics.xsl: Support ignore.image.scaling parameter; fix bug where 'center' is output for align on img
+
+ * param.ent, param.xweb: New parameters
+
+ * sections.xsl: Don't output section IDs twice when formatting subtitles
+
+2002-12-31 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * callout.xsl: Whitespace
+
+ * graphics.xsl: Support alt text on mediaobjectco
+
+ * inline.xsl: Make lineannotations italic
+
+2002-12-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * xref.xsl: Now that xrefstyle is official; make it take priority even when use.role.as.xrefstyle is non-zero.
+
+ * xref.xsl: Make endterm on xref higher priority than xreflabel on the target
+
+2002-12-18 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autoidx.xsl: Sorts were being done on primary entries, but without
+ folding upper and lower case together. Now it does the folding.
+
+ * graphics.xsl: Now uses select.mediaobject.index for selecting mediaobject.
+ Also puts align attribute value on <div> as the comment says
+ it should.
+
+2002-12-17 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param: Fixed build problems with new parameters.
+
+2002-12-17 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * math.xsl: Changed selection of mediaobject to be more consistent using
+ a separate select.mediaobject.index template. Also added
+ text-align to block containing external-graphic in fo output.
+
+2002-12-17 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.xweb: Fixed build problems with new parameters.
+
+2002-12-13 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * glossary.xsl: Handles missing otherterm targets in glosssee and glossseealso.
+
+2002-12-06 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * block.xsl: Fixed epigraph template to process all the permitted
+ children, not just para.
+
+ * graphics.xsl, param.ent, param.xweb: Enabled selection of imageobject based on role attribute.
+
+2002-12-04 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl, component.xsl, sections.xsl: Added component.toc.separator and section.toc.separator as
+ emtpy templates for customization of transition
+ from TOC to first content.
+
+2002-11-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Make opencircle=circle in itemizedlist marks
+
+2002-11-25 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: Made subtitles in sections scale to proper heading level.
+
+2002-11-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * admon.xsl: Align titles on graphical admonitions
+
+ * biblio.xsl, xref.xsl: Support bibliosource; improve numbered bibliography entries and cross-references to them
+
+2002-11-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Insignificant tweak
+
+2002-11-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Use xreflabel (if it's present) on bibliography entries
+
+ * component.xsl: Article appendix titles should be top-level titles
+
+ * refentry.xsl: Handle nested refsections
+
+ * table.xsl: Support entrytbl
+
+ * xref.xsl: Whitespace
+
+2002-11-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Output anchors for author/editor/othercredit names
+
+ * lists.xsl: Output anchors for simplelist members
+
+2002-10-31 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Support spanning index terms (endofrange/startref)
+
+2002-10-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Bug #619474: support errortext element
+
+2002-10-19 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl, component.xsl, division.xsl, refentry.xsl, sections.xsl:
+ Support output of language attribute
+
+ * inline.xsl: Support output of language attribute on foreignphrase and fix bug in glossterm linking
+
+2002-10-09 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Fixed bug in lookup of olink database document baseuri
+ attribute for case of no site map.
+
+2002-10-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * formal.xsl: Use table 'tabstyle' attribute for div class
+
+2002-10-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Simplify chunk-element-content; no semantic differences
+
+ * chunk.xsl: Reworked chunking for downstream customization; will break any existing customization layer that changes the chunking algorithm
+
+2002-10-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl, component.xsl, sections.xsl: Support optional titles on ToCs
+
+ * lists.xsl: Bug #615464: fix typo in compact list spacing
+
+ * param.ent, param.xweb, table.xsl: Made separate parameters for table frame and table cell border properties
+
+ * synop.xsl: Bug #617717: remove spurious hash in anchor name
+
+2002-10-04 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * titlepage.xsl: Fixed bug #618600. Address is now displayed verbatim also on titlepages.
+
+2002-10-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Support continuation of orderedlists and inherited numeration in FO
+
+2002-10-01 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: Changed section.level template to return a number that matches
+ the section level (sect1 = 1, etc.), and changed other
+ templates to compensate for the change, so the output
+ should be the same as before.
+
+2002-09-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Bug #496294: don't index endofrangeentries. They're no longer indexed, but they aren't handled quite right yet either, they don't generate ranges
+
+ * autotoc.xsl: Properly support bridgehead.in.toc parameter
+
+ * biblio.xsl: Related to bug #583282: don't duplicate footnotes in bibliographys either
+
+ * block.xsl, titlepage.xsl: Bug #582192: support revdescription and improve effectiveness of html-rtf by extending the number of places where its used
+
+ * component.xsl: Bug #596599: TOC for article/appendix in chunked HTML
+
+ * docbook.xsl: Make sure chunk always returns zero if we're not chunking
+
+ * formal.xsl: Bug #497603: fixed and added default.float.class
+
+ * glossary.xsl: Bug #583282: footnote duplicated in glossary footer
+
+ * graphics.xsl: Bug #516859: added default.image.width
+
+ * index.xsl: Related to bug #583282: don't duplicate footnotes in indexes either
+
+ * param.ent, param.xweb: Use new parameters
+
+ * synop.xsl: Total rework of funcsynopsis code; now supports a 'tabular' presentation style for 'wide' prototypes; see funcsynopsis.tabular.threshold
+
+2002-09-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * changebars.xsl: Address Bug #610660: use system.head.content instead of user.head.content; tone down the intensity of the colors a bit
+
+ * chunk-common.xsl: Call system.head.content in html.head
+
+ * docbook.xsl: Add context to error message about a missing template
+
+ * docbook.xsl: Address Bug #610660: Added system.head.content so that stylesheets can output things before the users css.stylesheet (for example). Also added a title parameter to head.content
+
+ * graphics.xsl: Call the *.head.content templates when writing out long description chunks
+
+ * synop.xsl: Bug #605150: process arg correctly even when it's in a group
+
+ * titlepage.xsl: Call the *.head.content templates when writing out legalnotice chunks
+
+ * titlepage.xsl: Bug #607725: make sure legalnoticelink is correct even when chunking to a different html.dir
+
+2002-09-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Use CSS to set viewport characteristics if css.decoration is non-zero, use div instead of p for making graphic a block element; make figure titles the default alt text for images in a figure
+
+ * html-rtf.xsl: Handle XHTML RTFs more completely
+
+2002-09-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl: Use local URIs for importing docbook.xsl and chunk-common.xsl
+
+ * qandaset.xsl: Added default table summary to qandaset tables
+
+2002-09-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl, chunkfast.xsl: Attempt to make chunking faster; chunkfast is still experimental
+
+2002-09-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Support indexing in webpages (website DTD). In the long run, this probably isn't a good strategy...
+
+2002-09-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * admon.xsl: Output table summary and img alt for graphical admonitions
+
+ * docbook.xsl: Whitespace changes
+
+ * param.ent, param.xweb: Use the new l10n.* parameters
+
+2002-09-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Ignore dbhtml dir if the section isn't a chunk
+
+ * chunk.xsl: Make sure chunked ToC/LoT goes in the right base.dir
+
+ * component.xsl: Allow generate.toc parameter to control ToC in article/appendixes
+
+ * graphics.xsl: Use the graphicsize.extension parameter
+
+2002-09-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * refentry.xsl: Do something reasonable with refsection; this still needs work
+
+ * table.xsl: Make sure row-level colsep and rowsep values are 'inherited' onto missing cells
+
+2002-08-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Make inherited attributes work for 'missing' table cells
+
+2002-08-26 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl, param.ent, param.xweb: Made chunk.tocs.and.lots a proper parameter
+
+2002-08-25 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * autoidx.xsl: Fixed bug #496281. Refentry is now recognized as target for links from index.
+
+2002-08-22 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param: Index can be alternatively created using HHK file from now. This allows see-also processing and index terms also points to their exact location.
+
+2002-08-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Format see/seealso entries correctly
+
+ * autotoc.xsl, chunk-common.xsl, chunk.xsl, component.xsl, division.xsl:
+ Rework(ing) ToC/LoT generation to support chunking the ToC/LoT; don't output empty rows in navigation tables
+
+2002-08-22 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.ent, param.xweb: Index can be alternatively created using HHK file from now. This allows see-also processing and index terms also points to their exact location.
+
+2002-07-29 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * lists.xsl: Added valign="top" attribute to the <col> element
+ for variablelist term column. I was getting vertically
+ centered alignment for the term.
+
+2002-07-19 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl, inline.xsl, param.ent, param.xweb: Support menuchoice.menu.separator, menuchoice.separator, and bibliography.numbered
+
+2002-07-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl, lists.xsl, param.ent, param.xweb: Added support for para.propagates.style
+
+ * lists.xsl: Use tr.attributes
+
+ * param.ent, param.xweb: Added html.cellpadding and html.cellspacing
+
+ * table.xsl: Added tr.attributes named template (for odd-row coloring and such) and html.cellpadding and html.cellspacing for table defaults
+
+2002-07-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: When emphasis propagates its role attribute as the HTML span class and a role is provided, don't use <em>
+
+2002-07-16 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Remove 'article' from the catch-all template match in mode=xref-to
+ because it is already covered in another xref-to template,
+ leading to an ambigious selection of template.
+
+2002-07-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunker.xsl: Repeat after me: you cannot use xsl:attribute on intruction elements, you cannot use...
+
+ * graphics.xsl: Refactor calls to getWidth() and getDepth() to work around XSLTC bugs
+
+2002-07-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Don't output square brackets if there's no biblioentry label
+
+ * synop.xsl: Bug #573726: fix cmdsynopsisref formatting
+
+2002-07-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Bug #574840: fix bug where some symbol index terms got lost
+
+ * autoidx.xsl: Bug #574841: trim leading and trailing whitespace from primary/secondary/tertiary index terms
+
+ * graphics.xsl: Work-around bug in xsltproc: explicitly cast scale to a number() before comparing it to 1.0
+
+ * html-rtf.xsl, verbatim.xsl: Bug #567130: make sure literallayout children don't get lost
+
+2002-07-08 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Moved the target.database parameter to be the first
+ child in the olink template.
+
+2002-07-07 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl, chunk.xsl: First tentative stab at getting ToCs and LoTs into separate chunks--does not work
+
+ * footnote.xsl: Fix footnotes in table titles
+
+ * lists.xsl: Fix ugly bug: make sure premables to orderedlist and itemizedlist elements are actually formatted
+
+2002-07-06 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * graphics.xsl: Bug fix for inlinegraphic not being inline.
+ The test for setting $viewport to 0 was
+ test="inlinegraphic
+ | ancestor::inlinemediaobject
+ | ancestor::inlineequation"
+ when it should be:
+ test="local-name(.) = 'inlinegraphic'
+ or ancestor::inlinemediaobject
+ or ancestor::inlineequation"
+ Now inlinegraphics are inline.
+
+ * xref.xsl: Added $verbose parameter to default xref-to template
+ so olink target collection can be quiet for elements
+ that don't have an xref-to.
+ Also fixed a line break in an olink error message.
+
+2002-07-05 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk.xsl: Modified for new stylesheet olink system.
+ Checks the collect.xref.targets parameter and
+ runs the target collection process if selected.
+ Default is to not run the collection process.
+
+ * docbook.xsl: Modified for the new stylesheet olink system.
+ Checks the collect.xref.targets parameter and runs
+ the target data collection process if selected.
+ Default is to not run the collection process.
+
+ * param.ent: Added seven new parameters for the new stylesheet olink system:
+ target.database.document
+ targets.filename
+ collect.xref.targets
+ olink.base.uri
+ use.local.olink.style
+ current.docid
+ olink.doctitle
+
+ * param.ent, param.xweb: Removed references to the chunk.datafile parameter,
+ because Norm removed that parameter due to
+ obsolescence.
+
+ * param.xweb: Added seven parameters for the new stylesheet olink system:
+ target.database.document
+ targets.filename
+ collect.xref.targets
+ olink.base.uri
+ use.local.olink.style
+ current.docid
+ olink.doctitle
+
+ * xref.xsl: Modified to use new stylesheet olinks.
+ Extended the olink template for the new targetdoc and
+ targetptr attributes.
+ Loads the target database into keys for quick lookups.
+
+2002-07-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * xref.xsl: Feature req #525507: support xref to para by using the nearest containing section as the generated text
+
+2002-07-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl, param.ent, param.xweb: Use header.rule and footer.rule parameters when building page navigation
+
+ * docbook.xsl: Feature Req #502932: added root.messages template for user defined messages
+
+2002-06-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * formal.xsl, lists.xsl: Make list/procedure titles use gentext and have consisten formatting
+
+2002-06-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix footnote context error (Felix Rabe)
+
+2002-06-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * footnote.xsl: Make sure function-available is used around the node-set extension function
+
+2002-06-27 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * footnote.xsl: Fixed typo
+
+2002-06-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Whitespace
+
+2002-06-26 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl, xref.xsl: Unwrap nested links
+
+ * table.xsl: Rework the CSS table-border properties so that all three don't have to be specified at once
+
+2002-06-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunker.xsl: Turn off omit-xml-declaration, for what it's worth, in text mode
+
+ * table.xsl: Added PI for cellspacing and cellpadding; also added currently useless Python extension hooks
+
+2002-06-13 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param: Added parameter for disabling HTML output when testing various HTML Help features.
+
+ * Makefile.param: New features. A lot of new features. For HTML Help.
+
+2002-06-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunker.xsl: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * chunker.xsl: Modified output attributes for text chunks as Saxon doesn't like empty values for them.
+
+2002-06-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * html-rtf.xsl: Renamed a template
+
+ * inline.xsl: Changed test condition for xlink: simple links
+
+ * manifest.xsl, math.xsl, param.ent: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.ent: Added parameter for disabling HTML output when testing various HTML Help features.
+
+ * param.ent: New features. A lot of new features. For HTML Help.
+
+2002-06-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xweb: Use the new chunking parameters: NOTE WELL: they are described in param.xweb but actually defined in chunker.xsl to make it independent
+
+2002-06-13 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.xweb: Added parameter for disabling HTML output when testing various HTML Help features.
+
+ * param.xweb: New features. A lot of new features. For HTML Help.
+
+2002-06-12 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * chunk-common.xsl, param.ent, param.xweb: Added new parameters suppress.{footer|header}.navigation for separate control over navigation bar in footer and header.
+
+2002-06-11 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * formal.xsl: Make sure formal objects have an anchor
+
+ * graphics.xsl: Don't put alt on object or embed
+
+ * graphics.xsl: Don't output viewport table if it isn't going to do anything useful
+
+ * graphics.xsl, param.ent, param.xweb: Made new parameters public
+
+ * html-rtf.xsl: Fix list of block elements and support xhtml
+
+ * html-rtf.xsl: When unwrapping; don't produce empty elements if there's no need
+
+ * xref.xsl: Experimental support for xrefstyle
+
+2002-06-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl: Feature req #565822: support multiple html.stylesheets
+
+ * docbook.xsl: Patch #565199: fix quotation marks in draft URL generation in CSS
+
+2002-06-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl: Add support for HTML META name=description from abstract
+
+ * param.ent, param.xweb: New parameters: generate.meata.abstract and use.role.as.xrefstyle
+
+2002-06-03 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile: Added dependencies for profiling stylesheets
+
+2002-05-23 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl, param.ent, param.xweb: Support for SVG in HTML
+
+ * html-rtf.xsl: Protect calls to extension functions behind function-available tests
+
+2002-05-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * qandaset.xsl: Fix anchors for references to QandAEntrys. Output '. ' in some contexts (this is a hack)
+
+2002-05-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * onechunk.xsl: Make TOC (and other internal references) all just fragment identifiers...we're making one chunk after all
+
+2002-05-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl, html.xsl: Moved href.target to html.xsl; added href.target.uri (which is functionally equivalent to href.target in the non-chunking case)
+
+2002-05-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl, onechunk.xsl: Fix bugs in onechunk---it wasn't working at all
+
+2002-05-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Bug #555809: make sure that a longdesc, if written, gets the correct relative URI
+
+2002-05-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix inherited directory naming problems when using dbhtml. Add context to site navigation link calls
+
+ * chunk-common.xsl, param.ent, param.xweb: Add extra LINK elements to the HTML HEAD of chunked output (for enhanced site navigation as per Mozilla 1.0)
+
+ * chunker.xsl: Work around relative filename bug in libxslt
+
+ * pi.xsl: Try to avoid x//y in inherited dbhtml dir settings
+
+2002-05-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl: Support title on blockquote
+
+ * chunk.xsl: Turn off refentry.separator by default when chunking
+
+ * chunk.xsl: Fix ugly prev/next bug introduced by my attempt to work around Xalan problems
+
+ * graphics.xsl: Reworked support for graphic attributes; now support DocBook 4.2CR1 attributes
+
+ * html.xsl: Remove reference to obsolete using.chunker parameter
+
+ * math.xsl: Support MathML by passing it through unchanged
+
+ * param.ent, param.xweb: Added points.per.em; removed obsolete using.chunker
+
+ * table.xsl: Improve support for table borders drawn with CSS (get the semantics right); add support for entry-bgcolor PI
+
+ * verbatim.xsl: Format literal layout elements correctly when linenumbering
+
+ * xref.xsl: Support xref to refnamediv and all elements with titles (at least when they have titles)
+
+2002-05-10 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * chunk.xsl: Added support for manifest file as requested by Nik in #552945
+
+2002-05-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Remove reference to obsolete using.chunker parameter
+
+2002-05-10 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * manifest.xsl, param.ent, param.xweb: Added support for manifest file as requested by Nik in #552945
+
+2002-05-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * pi.xsl: Remove reference to obsolete using.chunker parameter
+
+2002-05-07 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk.xsl: The call to write.chunk did not have the $chunk.quietly parameter set.
+ I think I failed to commit that change after testing it in Feb.
+
+ * xref.xsl: Added a template for article in mode="xref-to" that is similar
+ to the one for chapter. Now you can use <xref> with a linkend
+ pointing to an article.
+
+2002-05-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl, onechunk.xsl: Fix bug #551966 applying onechunk to book
+
+2002-04-30 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl: First attempt to workaround Xalan array-out-of-bounds bug
+
+2002-03-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl, chunk-common.xsl, pi.xsl: Handle links across dbhtml-specified relative directories correctly
+
+ * formal.xsl: Support longdesc on tables
+
+ * table.xsl: Use the textobject/phrase for the table summary attribute, if one is present
+
+2002-03-24 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Remove style from longdesc link; added support for textdata in textobject
+
+ * inline.xsl: Support personname
+
+ * xref.xsl: Handle xref to editor, othercredit, and personname
+
+2002-03-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl, titlepage.xsl: Support biblioid
+
+2002-03-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * Makefile, autotoc.xsl, component.xsl, division.xsl, param.ent, param.xweb, qandaset.xsl, refentry.xsl, sections.xsl:
+ Replace generate.*.toc and generate.*.lot with single generate.toc parameter.
+
+ * autotoc.xsl: Fix ToC section depth calculation
+
+2002-03-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * synop.xsl: Improve appearance of classsynopsis elements
+
+2002-03-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore: Ignore profiling stylesheets
+
+ * Makefile: Make profiling onechunk
+
+ * admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunktoc.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html-rtf.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, maketoc.xsl, math.xsl, oldchunker.xsl, onechunk.xsl, param.ent, param.xweb, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl:
+ Whitespace only: change CR/LF back to LF. Norm was a total moron.
+
+ * admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, chunktoc.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html-rtf.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, maketoc.xsl, math.xsl, oldchunker.xsl, onechunk.xsl, param.ent, param.xweb, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl:
+ Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr.
+
+ * block.xsl: Generate anchors before the formal.object.heading, not within it; support formal.title.placement
+
+ * formal.xsl, lists.xsl, param.ent, param.xweb: Support formal.title.placement
+
+ * lists.xsl, titlepage.xsl: Handle revisionflag a little better on copyrights
+
+ * titlepage.xsl: Generate anchors before the formal.object.heading, not within it
+
+2002-03-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * footnote.xsl: Fix debugging error
+
+ * footnote.xsl: Numerate footnotes and table footnotes correctly
+
+ * lists.xsl: Bug #516227: segmentedlist/titles
+
+ * refentry.xsl: Process refsynopsisdiv titles in their own template so they don't get default title processing
+
+ * table.xsl: Make tfoot come out before tbody; even in HTML it's supposed to be that way
+
+ * verbatim.xsl: Improve efficiency of make-verbatim; thanks to Paul Grosso, John Dreystadt, et. al.
+
+2002-03-12 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * callout.xsl: Modified match="co" template to use its linkends attribute
+ to form a hotlink to the callout element, forming the
+ two-ways links as described in
+ The Definitive Guide. At this time, only a single linkend
+ value is supported, since HTML doesn't handle multiply-targeted
+ links.
+
+2002-03-11 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * footnote.xsl: Fixed bug #520995. Removed duplicated footnote numbers.
+
+2002-03-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Support the new generate.id.attributes parameter to prevent generating both div ID and a NAME attributes; also suppress revhistory in bibliographies
+
+ * component.xsl, division.xsl, glossary.xsl, index.xsl, param.ent, param.xweb:
+ Support the new generate.id.attributes parameter to prevent generating both div ID and a NAME attributes
+
+ * inline.xsl: Use em instead of i for emphasis
+
+ * onechunk.xsl: Update onechunk to the new chunking scheme
+
+2002-03-07 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * autotoc.xsl: Modified refentry to use mode=title.markup rather than mode=title
+ so indexterms are not included in the TOC entries for refentry.
+
+2002-03-03 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added new stylesheet parameters for profiling.
+
+2002-03-01 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile, Makefile.param: First portion of new profiling code. New stylesheet parameters will come later.
+
+2002-03-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl: Move stylesheet.result.type out of param and put it explicitly in each stylesheet because it has to be different
+
+ * graphics.xsl: Handle the case where graphics in inlineequations are inline
+
+ * param.ent: Removed stylesheet.result.type reference
+
+ * param.xweb: Added fragref for chunk.quietly
+
+ * titlepage.xsl: Added DIV wrappers to author and authorgroup for CSS styling
+
+2002-02-25 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunker.xsl, chunktoc.xsl, graphics.xsl, param.ent, param.xweb, titlepage.xsl:
+ Added chunk.quietly parameter and altered the calls
+ to write.chunk to set the 'quiet' param to that value.
+
+2002-02-21 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, math.xsl, param.ent, param.xweb: Better control over delimiters for TeX equations. Added parameter tex.math.delims, when is set to 0, no delimiters (like $ and $$) are output. Same can be done for single equation by <?dbtex delims="no"?>.
+
+2002-02-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Fix toc-depth bug in recursive sections
+
+2002-02-10 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added parameter htmlhelp.default.topic for overriding default topic to display.
+
+2002-02-09 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added parameter which controls appearance of root element in HTML Help ToC.
+
+2002-02-07 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl, chunk-common.xsl, chunk.xsl, chunktoc.xsl, maketoc.xsl, param.ent, param.xweb:
+ Added experimental manual TOC processing for chunking and TOC generation
+
+ * calc-chunks.xsl, chunk-experimental.xsl, expchunk.xsl:
+ Deleting old experiments
+
+ * docbook.xsl: Tweaked rendering of 'draft' watermark
+
+2002-02-03 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, param.ent, param.xweb: Added parameter htmlhelp.title for manual control over HTML Help title. Improved code for automatic extraction of title from document.
+
+2002-01-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl, param.ent, param.xweb: Support 'draft' watermark
+
+2002-01-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl, block.xsl, docbook.xsl, footnote.xsl: Bug #503271: output biblioentry.item.separator after citetitle
+
+ * block.xsl, footnote.xsl, html-rtf.xsl, param.ent, param.xweb:
+ Added html.cleanup parameter; if non-zero, do some post-processing of RTFs to improve formatting
+
+2002-01-22 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.ent, param.xweb: Feature request #507087. Added parameter for controling appearance of icons in HTML Help ToC.
+
+2002-01-21 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * biblio.xsl: Fixed bug #505683. Changed <I> to <i> to make output compatible with XHTML.
+
+2002-01-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl, param.ent, param.xweb: Use the pixels.per.inch parameter
+
+2002-01-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Convert graphic widths/depths to pixels
+
+2002-01-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl: Make root.filename supercede use.id.as.filename
+
+ * titlepage.xsl: Added template for confsponsor
+
+2002-01-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * glossary.xsl, inline.xsl: Make glossary.collection (usually) work when chunking is used; allow the use of glossdivs to be toggled in the document
+
+ * glossary.xsl, inline.xsl, param.ent, param.xweb: First cut at supporting a glossary.collection file
+
+2002-01-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore, Makefile.param: Makefile.param is auto generated
+
+ * lists.xsl, param.ent, param.xweb: Use global parameter variablelist.as.table
+
+2002-01-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * changebars.xsl: Fix typo
+
+ * chunker.xsl: Use output.method parameter
+
+ * footnote.xsl: Number footnotes in refentrys individually; add priority to match on first para of a footnote
+
+ * lists.xsl: Improve list formatting
+
+ * param.ent, param.xweb: Added new parameters: make.valid.html, refentry.generate.title, and output.method; removed unused parameter callout.unicode.font
+
+ * refentry.xsl: Improve refentry formatting
+
+ * synop.xsl: Made several synopsis elements inline and reworked the formatting code accordingly
+
+ * titlepage.xsl: Fix formatting of copyright with multiple holders
+
+ * xref.xsl: Added target parameter to link
+
+2001-12-15 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * graphics.xsl, math.xsl: Improved support for TeX math inside equations.
+
+2001-12-06 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile.param, docbook.xsl, math.xsl, param.ent, param.xweb:
+ Added support for TeX math in alt element. When using PassiveTeX, TeX equations can be directly passed to TeX. When using HTML, TeX file with code necessary to produce image equivalents of equations is generated.
+
+ * chunk.xsl, chunker.xsl: Template write.text.chunk moved to common place.
+
+2001-12-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * Makefile, Makefile.param, chunk.xsl, param.ent, param.xweb:
+ Fix chunking parameter errors
+
+ * Makefile, Makefile.param, param.ent, param.xweb: Updated parameters and parameter consistency checking
+
+ * changebars.xsl: Feature #481981: support simpara and formalpara in changebars.xsl
+
+ * chunk-experimental.xsl: More hacking
+
+ * chunk.xsl: Feature #477348: support chunk.section.depth (lots and lots of changes here: danger will robinson)
+
+ * xref.xsl: Feature #481793: support xref to refentry
+
+2001-12-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Allow inlines and anchors in titles
+
+2001-12-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * changebars.xsl, table.xsl: Bug #472836: @revisionflag and table entries
+
+ * qandaset.xsl: Improve FAQ labeling
+
+2001-11-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Patch #478068: procedures with one step
+
+2001-11-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl, param.ent: Support formatting segmented lists as tables
+
+ * param.ent: Added punct.honorific parameter
+
+2001-11-28 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.ent: Added parameter htmlhelp.hhc.section.depth for controlling depth of sections in a TOC in a left pane of HTML Help viewer.
+
+ * param.ent, param.xweb: Added support for automatic generation of map and context files for HTML Help. Topic names and IDs are marked by special PI <?dbhh topicname="..." topicid="..."?>.
+
+2001-11-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xweb: Support formatting segmented lists as tables
+
+ * param.xweb: Added punct.honorific parameter
+
+2001-11-28 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.xweb: Added parameter htmlhelp.hhc.section.depth for controlling depth of sections in a TOC in a left pane of HTML Help viewer.
+
+2001-11-28 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * pi.xsl: Use common pi-attribute template
+
+2001-11-27 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Support tabular presentation of variablelists
+
+ * qandaset.xsl: Format QandASet as a table; there's just no other way to get the formatting right without resorting to absurd hackery
+
+ * refentry.xsl: Fixed typo in refentry separator test
+
+2001-11-18 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * Makefile, glossary.xsl, inline.xsl, param.ent, param.xweb:
+ Added parameter glossterm.auto.link. When set to 1 links from glossterm to glossentry are created automatically even if there is no linkend attribute on glossterm and id attribute on glossentry.
+
+ * inline.xsl: Baseform attribute is taken into account when autogenerating links for glossterms.
+
+2001-11-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * graphics.xsl: Only output a longdesc link if there's actually a longdesc
+
+ * inline.xsl: Support experimental XLink support
+
+2001-11-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-experimental.xsl, chunk.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, inline.xsl, lists.xsl, param.xweb, synop.xsl, toc.xsl, xref.xsl:
+ Support well-formed documents, use key() instead of id()
+
+ * param.xweb: Added fragref for navig.* params
+
+2001-11-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * titlepage.xsl: Fixed formatting of addresses in affiliations in author names
+
+2001-11-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xweb: Move the obvious ID value from the src:fragment to the refentry in parameter reference pages
+
+2001-11-06 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * chunk.xsl: Modified header and footer templates to support option
+ to use graphical icons for navigation.
+
+ * param.ent, param.xweb: Added new parameters supporting the option for graphical
+ icons in navigational headers and footers of chunked html.
+
+2001-11-05 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.ent: Parameters moved to params subdirectory.
+
+2001-11-05 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.ent: Added newline at eof
+
+2001-11-05 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.xweb: Parameters moved to params subdirectory.
+
+2001-11-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl, inline.xsl: Support pubwork=article on citetitle
+
+ * xref.xsl: Remove anchor name on anchor; it erroneously duplicates the html anchor template
+
+2001-10-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * Makefile, graphics.xsl, param.ent, param.xweb: Support HTML longdesc using textobject content
+
+ * table.xsl: Table support improvements
+
+2001-10-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Fix formatting of keycombo
+
+ * param.ent, param.xweb, table.xsl: Fix calculation of rowsep and colsep; added experimental support for table.borders.with.css in HTML; calculation of alignments needs to be added along the same lines
+
+2001-10-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Fixed a number of significant outstanding table problems; I think HTML and FO now format all combinations of spans and missing cells correctly. But the border drawing isn't perfect on FO tables yet.
+
+2001-10-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * biblio.xsl: Tweaked bibliography formatting to include the labels
+
+ * param.ent, param.xweb: Fixed some missing references
+
+ * xref.xsl: Tweaked cross reference stuff to prevent square brackets on biblio xrefs from being underlined (it just looks ugly)
+
+2001-10-11 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl, docbook.xsl: Moved autoidx.xsl (and chunker.xsl) directly into docbook.xsl
+
+ * chunk-common.xsl, chunk.xsl: Moved chunk-common into chunk; there's no need for a separate common file anymore
+
+ * chunker.xsl: Removed some out-of-date comments
+
+ * index.xsl: Removed empty generate-index function; we're now using autoidx all the time
+
+ * titlepage.xsl: Moved support for generate.legalnotice.link directly into titlepage.xsl
+
+2001-10-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xweb: Added fragrefs for new params
+
+2001-10-07 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore: Added param.html to ignore list
+
+ * .cvsignore, Makefile, param.ent, param.xsl, param.xweb:
+ Generate params from an xweb file
+
+ * autotoc.xsl, calc-chunks.xsl, chunk-common.xsl, chunk-experimental.xsl, chunker.xsl, ebnf.xsl:
+ Removed all top-level parameters; they're now all in param.xsl
+
+2001-10-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * callout.xsl: Use function-available to select callout extension function
+
+ * component.xsl: Make component ids unconditional
+
+ * graphics.xsl: Use function-available to select text-insert extension function
+
+ * inline.xsl: Make sure all the variants of sgmltag have a class attribute
+
+ * refentry.xsl: Make anchors unconditional, support a separator between refentrys
+
+ * table.xsl: Use function-available to select extension functions
+
+ * titlepage.templates.xml: Added refentry titlepages, but note that refentrys don't usually have one, they usually begin with the Name section
+
+ * titlepage.xsl: Added refentry.titlepage.{recto,verso}.style properties
+
+ * verbatim.xsl: Use function-available to select verbatim extension function
+
+ * xref.xsl: Added names to the link templates so that they can be called that way
+
+ * xtchunk.xsl, xtchunker.xsl: No point keeping the XT files now that I'm using function-available
+
+2001-09-26 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * admon.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, division.xsl, ebnf.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, inline.xsl, lists.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, verbatim.xsl, xref.xsl:
+ Bug #464487: use (new) anchor template to consistently generate HTML anchors (usually conditionally, in other words, only for elements that actually have an ID)
+
+2001-09-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix gentext.nav.* templates
+
+ * param.xsl, titlepage.xsl: Support automatic collation of year ranges in copyright
+
+2001-09-24 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * refentry.xsl, synop.xsl: Added some paras to improve spacing
+
+ * verbatim.xsl: Implemented changes suggested by Paul Winder, Sam Brow, and John Dreystadt of Arbortext to make 'make-verbatim' less memory intensive; also added paras to literallayout and address divs for better spacing in NS6
+
+2001-09-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * changebars.xsl: sgmltag is an inline
+
+ * chunk-common.xsl: Feature request #439053: support generate.legalnotice.link
+
+ * xref.xsl: Bug #463033: allow xref to list items (in orderedlists) and varlistentrys
+
+ * xref.xsl: Bug #462830: allow %p in templates
+
+2001-09-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * onechunk.xsl: New file.
+
+2001-08-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Fix orderedlist numerations
+
+2001-08-25 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * sections.xsl: Bug #451005: no id anchor for bridgehead
+
+2001-08-14 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * xref.xsl: Display the ID when gentext cannot be created
+
+2001-08-11 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * param.xsl: Removed the '?' from olink resolver parameter because
+ the olink template will add that (or not, depending on
+ how that template is customized).
+
+2001-08-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xsl, verbatim.xsl: Support shade.verbatim parameter
+
+2001-08-05 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xsl: Removed the FormatDingbatCallout classes, they were the same as the FormatUnicodeCallout classes but with a font wrapper. Added a callout.unicode.font parameter to wrap Unicode callouts
+
+2001-08-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Add '.' to the autotoc.label.separator; suppress the separator if there is no label
+
+ * chunker.xsl: Added a quiet parameter to suppress the Writing... message
+
+ * refentry.xsl: Don't output anchor for refsect*, the anchor is output as part of the title processing
+
+2001-08-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * sections.xsl: Allow anchors in section titles
+
+2001-08-02 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: Changed <link> to process its endterm if the element content
+ is empty.
+
+2001-08-01 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Don't calculate ids where they aren't used; don't put ids on divs because anchors will be output in the component title
+
+ * footnote.xsl: Process simpara in footnote; warn if something unexpected turns up in a footnote
+
+ * formal.xsl: Allow anchors in formal object titles
+
+ * graphics.xsl: Output anchors for images that have IDs
+
+ * lists.xsl: Output anchors for list elements with IDs
+
+ * param.xsl: Leave ../ out of graphics paths by default; that doesn't make sense anymore
+
+ * param.xsl, xref.xsl: First crude beginnings of olink support
+
+ * qandaset.xsl: Remove unnecessary spaces
+
+ * titlepage.templates.xml: Don't suppress othercredit on titlepages
+
+ * titlepage.xsl: Handle othercredits on title pages
+
+2001-07-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl, param.xsl: Fix title-end punctuation problems on formalparas
+
+2001-07-17 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * graphics.xsl: Fixed bug #442160. Parameter graphic.default.extension is now used also for <graphic> and <inlinegraphic> not only for <imagedata>.
+
+2001-07-17 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * xref.xsl: xref element with endterm attribute now uses normal templates
+ to process the children of the element pointed to by the endterm
+ ID. Formerly it just used the built-in template and rendered
+ just the text nodes.
+
+2001-07-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl, param.xsl: Added phrase.propagates.style and emphasis.propagates.style: if true, wrap a span around phrase and emphasis elements with the role attribute propagated to the class attribute
+
+2001-07-16 Robert Stayton <bobstayton@users.sourceforge.net>
+
+ * sections.xsl: added null templates for section titleabbrev in normal mode
+
+2001-07-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Wrap tbody around table footnotes (so that the HTML table model is not broken)
+
+2001-07-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xsl: Make generate.section.toc.level 0 by default
+
+2001-07-10 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk.xsl: Remove extension namespace declarations; they aren't actually used in this module
+
+ * chunker.xsl: Fix EXSLT namespace name for exsl:document element
+
+ * chunker.xsl: Make exsl:document the first choice
+
+ * chunker.xsl, oldchunker.xsl, param.xsl: Move declaration for default.encoding and saxon.character.representation from param.xsl to (old)chunker.xsl so that chunker.xsl can be used by any stylesheet (indepedent of docbook.xsl). Maybe this should get moved to lib...
+
+ * pi.xsl: Irrelevant encoding change
+
+2001-07-09 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Fixed typo in reference to annotate.toc variable
+
+2001-07-08 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * calc-chunks.xsl, chunk-experimental.xsl: Break chunk calculation and chunking into two tasks; *requires* every chunk to have an ID
+
+ * chunker.xsl: Use element-available function not vendor to find chunking elements
+
+ * exsltchunk.xsl, exsltchunker.xsl: These have been integrated into the regular chunker now that it's based on extension-available()
+
+ * keywords.xsl: Tweaked handling of keywords to avoid multiple templates
+
+ * oldchunker.xsl: New file.
+
+ * qandaset.xsl: Improve QandA formatting; make question bold if defaultlabel=none (FR #419315)
+
+ * xref.xsl: Support xref to bridgehead
+
+2001-07-07 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xsl: Added callout.dingbats parameter (for extension support; not really used in HTML)
+
+2001-07-06 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-experimental.xsl, expchunk.xsl: New file.
+
+2001-07-05 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * block.xsl: Whitespace
+
+ * block.xsl, lists.xsl: FR #422097, make a listitem containing a single simpara output an li with only inline content
+
+ * chunk-common.xsl: Patch #428987, use the id of the root element if use.id.as.filename is non-zero; also chunk a /section properly
+
+ * chunk-common.xsl: Patch #418401, add accesskey attributes to HTML navigation
+
+ * param.xsl, sections.xsl: Change semantics of generate.section.toc.level; 0 no longer means ignored it now means less than 1 :-)
+
+ * param.xsl, sections.xsl: SR #431040, added generate.section.toc.level parameter to control depth of sections which get a TOC
+
+ * titlepage.xsl: Patch #415865, output contrib for authors and othercontribs
+
+2001-07-04 <uid48421@users.sourceforge.net>
+
+ * autotoc.xsl: Support annotated TOCs
+
+ * biblio.xsl, param.xsl, xref.xsl: Support an external bibliography collection
+
+ * chunk-common.xsl, docbook.xsl, param.xsl: Bug #418968: replaced body.attrs attribute-set with body.attributes template
+
+ * component.xsl, sections.xsl: Remove internal references to *.titlepage.recto.mode and *.titlepage.verso.mode
+
+ * ebnf.xsl: Minor presentation bug fixes
+
+ * xref.xsl: Bug #429011, fix xref to qandset elements
+
+2001-06-22 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl, ebnf.xsl: Support EBNF
+
+ * param.xsl: Remove unused parameter: check.idref
+
+2001-06-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl, param.xsl, xref.xsl: Use common code to calculate step numbers; support xref to procedures and steps; added formal.procedures parameter
+
+2001-06-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * formal.xsl: Generate formal titles correctly
+
+ * graphics.xsl: Don't put span around inlinemediaobject in programlistings or screens (causes problems with line numbering and callouts)
+
+ * refentry.xsl: Bug 434102: fix refentry inside of chapter and fix refsynopsisdiv formatting in both FO and HTML
+
+ * xref.xsl: Support xref to authorgroup
+
+2001-06-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Reordered erroneous test: only link to top-level sections, even if the first one is a chunk
+
+2001-06-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * exsltchunk.xsl, exsltchunker.xsl: New file.
+
+2001-06-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Handle subtitle in articleinfo
+
+2001-06-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Make sure the root element gets processed correctly so that it generates the right titlepage
+
+ * component.xsl: Don't output ID attributes on DIVs with required titles since they conflict with the NAME attributes on the subsequently output A tags.
+
+ * docbook.xsl: Pass the current node to user.head.content
+
+ * index.xsl: Updated comment
+
+2001-06-07 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * lists.xsl: Things preceding steps in procedure are placed before OL list.
+
+2001-06-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Fixed typo in compact list support; backed out procedure step changes
+
+ * sections.xsl: Fixed CSS typo; clear: all should be clear: both
+
+2001-06-02 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * lists.xsl: Fixed bug #424926. Things preceding steps in procedure are not placed inside OL list.
+
+2001-05-23 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Reorganized templates for clarity
+
+ * graphics.xsl: Fix dup. template bug with is.graphic.*
+
+ * titlepage.xsl: Added template for publisher
+
+2001-05-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl: Make the TOC label/title separator a parameter
+
+ * callout.xsl, verbatim.xsl: Move calculation of linenumber.* parameters into the number.rtf.lines template
+
+ * changebars.xsl: Add link and member as inlines
+
+ * sections.xsl: Refactor the section title code
+
+ * titlepage.templates.xml: Reworked titlepage template processing to support use of more interesting
+ predicates.
+
+ Note: in previous versions, at most one title, subtitle, or titleabbrev
+ element would be processed for each title page. In the new design, if you
+ have multiple title, subtitle, or titleabbrev elements inside an info
+ wrapper (you shouldn't!), they will all be processed.
+
+2001-05-13 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * param.xsl: Fixed ID typo
+
+ * synop.xsl: Fixed synopfragmentref link (suggested by Philippe Martin)
+
+2001-05-12 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autotoc.xsl, param.xsl: Mostly failed attempt to add bridgeheads to the automatic TOC; this option is turned off by default and you should leave it that way.
+
+ * sections.xsl: Calculate the heading level for bridgeheads
+
+2001-05-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * lists.xsl: Output anchors for procedures and steps
+
+ * table.xsl: Process head/body/foot in the right order
+
+2001-04-29 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl, chunk.xsl, xtchunk.xsl: Automatically make an index when chunking with a processor other than XT
+
+2001-04-26 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * changebars.xsl: Support a few more elements
+
+ * inline.xsl: Make glossterms hot if they're links. And make them italic.
+
+ * lists.xsl: Improve procedure step/substep enumeration
+
+2001-04-24 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Fix chunking bug
+
+ * chunk-common.xsl: Feature request 416507: added chunk.sections and chunk.first.sections to provide greater chunking flexibility
+
+ * chunker.xsl: Output ID in message
+
+ * glossary.xsl: Fix bug that caused duplicated glossary entries
+
+ * qandaset.xsl: Bug #418100: fix qandaentry anchors; also fixed formatting bug in questions with indexterms
+
+2001-04-21 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * chunker.xsl: Added parameters for changing output encoding in chunked HTML
+
+2001-04-21 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Improve processing of trademarks
+
+2001-04-21 Jirka Kosek <kosek@users.sourceforge.net>
+
+ * param.xsl: Added parameters for changing output encoding in chunked HTML
+
+2001-04-20 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * inline.xsl: Restoring accidentally deleted citetitle template
+
+2001-04-18 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * autoidx.xsl: Fix bug: lowercase and uppercase need to be strings (not element names :-)
+
+ * inline.xsl, param.xsl: Bug #413982, easy support for man page CGI links on citerefentry
+
+2001-04-17 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * docbook.xsl, param.xsl: Move label.from.part parameter into param.xsl; default it to 0 so that chapters and appendixes are numbered monotonically throughout a book by default. Moved param.xsl up in the include list, just for good measure
+
+2001-04-16 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * component.xsl: Fix bug in processing of subtitle content on components
+
+ * glossary.xsl, titlepage.templates.xml: Fix formatting of glossarys--things were really broken
+
+ * xref.xsl: Patches Tracker #415439: support title attribute on HTML anchors associated with xrefs
+
+2001-04-15 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Process footnotes correctly when chunking; add summary attribute to navigation tables
+
+ * docbook.xsl: Support inheriting of *info keywords
+
+ * footnote.xsl, sections.xsl: Process footnotes correctly when chunking
+
+ * formal.xsl: Use gentext templates for formal object titles
+
+ * param.xsl: Added new parameters: inherit.keywords, process.source.toc, and process.empty.source.toc; changed the default for spacing.paras to 0
+
+ * table.xsl: Improve support for align attribute on tgroup
+
+ * toc.xsl: Support DocBook toc markup
+
+ * xref.xsl: Make a title attribute on HTML anchors for links to things with titles
+
+2001-04-05 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * table.xsl: Don't translate tgroup align into HTML table align--they don't mean the same thing
+
+ * titlepage.xsl: Suppress titleabbrev on the title page
+
+2001-04-04 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * chunk-common.xsl: Move xsl:message about chunks into the chunker modules
+
+ * chunker.xsl: Support indent and doctype public/system on chunks (for Saxon, anyway, Xalan's multiple-document extension doesn't seem to support this)
+
+ * xtchunker.xsl: Use xsl:choose to support xml, html, and text output methods
+
+2001-04-03 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * callout.xsl: Fix bug 412487, make XSL-generated callout marks honor callout mark parameters
+
+ * chunk-common.xsl: Remove unnecessary xmlns declarations
+
+ * chunker.xsl: Patch to make saxon not produce xml version=1.1 documents
+
+ * param.xsl: Documentation fixes
+
+ * qandaset.xsl: Apply patch 412510 by Jon Willeke, make xref to Question work correctly
+
+ * xref.xsl: Remove unnecessary parameter assignment
+
+2001-04-02 Norman Walsh <nwalsh@users.sourceforge.net>
+
+ * .cvsignore, Makefile, admon.xsl, autoidx.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, changebars.xsl, chunk-common.xsl, chunk.xsl, chunker.xsl, component.xsl, division.xsl, docbook.xsl, ebnf.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, html.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, param.xsl, pi.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.templates.xml, titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl, xtchunk.xsl, xtchunker.xsl:
+ New file.
+
+ * Makefile: Use the cvstools version of saxon
+
diff --git a/kdoctools/docbook/xsl/html/admon.xsl b/kdoctools/docbook/xsl/html/admon.xsl
new file mode 100644
index 000000000..1c83b9166
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/admon.xsl
@@ -0,0 +1,130 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match="*" mode="admon.graphic.width">
+ <xsl:param name="node" select="."/>
+ <xsl:text>25</xsl:text>
+</xsl:template>
+
+<xsl:template match="note|important|warning|caution|tip">
+ <xsl:choose>
+ <xsl:when test="$admon.graphics != 0">
+ <xsl:call-template name="graphical.admonition"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="nongraphical.admonition"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="admon.graphic">
+ <xsl:param name="node" select="."/>
+ <xsl:value-of select="$admon.graphics.path"/>
+ <xsl:choose>
+ <xsl:when test="local-name($node)='note'">note</xsl:when>
+ <xsl:when test="local-name($node)='warning'">warning</xsl:when>
+ <xsl:when test="local-name($node)='caution'">caution</xsl:when>
+ <xsl:when test="local-name($node)='tip'">tip</xsl:when>
+ <xsl:when test="local-name($node)='important'">important</xsl:when>
+ <xsl:otherwise>note</xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$admon.graphics.extension"/>
+</xsl:template>
+
+<xsl:template name="graphical.admonition">
+ <xsl:variable name="admon.type">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='note'">Note</xsl:when>
+ <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+ <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+ <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+ <xsl:when test="local-name(.)='important'">Important</xsl:when>
+ <xsl:otherwise>Note</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="alt">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="$admon.type"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:if test="$admon.style != ''">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$admon.style"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <table border="0">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$admon.type"/>
+ <xsl:if test="title">
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="title"/>
+ </xsl:if>
+ </xsl:attribute>
+ <tr>
+ <td rowspan="2" align="center" valign="top">
+ <xsl:attribute name="width">
+ <xsl:apply-templates select="." mode="admon.graphic.width"/>
+ </xsl:attribute>
+ <img alt="[{$alt}]">
+ <xsl:attribute name="src">
+ <xsl:call-template name="admon.graphic"/>
+ </xsl:attribute>
+ </img>
+ </td>
+ <th align="left">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="$admon.textlabel != 0 or title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:if>
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2" align="left" valign="top">
+ <xsl:apply-templates/>
+ </td>
+ </tr>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template name="nongraphical.admonition">
+ <div class="{name(.)}">
+ <xsl:if test="$admon.style">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$admon.style"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <h3 class="title">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="$admon.textlabel != 0 or title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:if>
+ </h3>
+
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="note/title"></xsl:template>
+<xsl:template match="important/title"></xsl:template>
+<xsl:template match="warning/title"></xsl:template>
+<xsl:template match="caution/title"></xsl:template>
+<xsl:template match="tip/title"></xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/autoidx-ng.xsl b/kdoctools/docbook/xsl/html/autoidx-ng.xsl
new file mode 100644
index 000000000..edcfc937a
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/autoidx-ng.xsl
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())
+ and ($role = @role or $type = @type or
+ (string-length($role) = 0 and string-length($type) = 0))'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version="1.0"
+ xmlns:func="http://exslt.org/functions"
+ exclude-result-prefixes="i"
+ xmlns:i="urn:cz-kosek:functions:index">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the DocBook XSL Stylesheet distribution.
+ See ../README or http://docbook.sf.net/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:include href="../common/autoidx-ng.xsl"/>
+
+<!-- Modified original code is using index group codes instead of just first letter
+ to gain better grouping -->
+<xsl:template name="generate-index">
+ <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+ <xsl:variable name="role">
+ <xsl:if test="$index.on.role != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="type">
+ <xsl:if test="$index.on.type != 0">
+ <xsl:value-of select="@type"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="terms"
+ select="//indexterm[count(.|key('group-code',
+ i:group-index(&primary;))[&scope;][1]) = 1
+ and not(@class = 'endofrange')]"/>
+
+ <div class="index">
+ <xsl:apply-templates select="$terms" mode="index-div">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="i:group-index(&primary;)" data-type="number"/>
+ </xsl:apply-templates>
+ </div>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key"
+ select="i:group-index(&primary;)"/>
+
+ <xsl:variable name="lang">
+ <xsl:call-template name="l10n.language"/>
+ </xsl:variable>
+
+ <xsl:if test="key('group-code', $key)[&scope;]
+ [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+ <div class="indexdiv">
+ <h3>
+ <xsl:value-of select="i:group-letter($key)"/>
+ </h3>
+ <dl>
+ <xsl:apply-templates select="key('group-code', $key)[&scope;]
+ [count(.|key('primary', &primary;)[&scope;][1])=1]"
+ mode="index-primary">
+ <xsl:sort select="&primary;" lang="{$lang}"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:apply-templates>
+ </dl>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/autoidx.xsl b/kdoctools/docbook/xsl/html/autoidx.xsl
new file mode 100644
index 000000000..b08be9ba6
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/autoidx.xsl
@@ -0,0 +1,488 @@
+<?xml version="1.0"?>
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
+<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
+
+<!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
+<!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
+<!ENTITY tertiary 'normalize-space(concat(tertiary/@sortas, tertiary[not(@sortas)]))'>
+
+<!ENTITY section '(ancestor-or-self::set
+ |ancestor-or-self::book
+ |ancestor-or-self::part
+ |ancestor-or-self::reference
+ |ancestor-or-self::partintro
+ |ancestor-or-self::chapter
+ |ancestor-or-self::appendix
+ |ancestor-or-self::preface
+ |ancestor-or-self::article
+ |ancestor-or-self::section
+ |ancestor-or-self::sect1
+ |ancestor-or-self::sect2
+ |ancestor-or-self::sect3
+ |ancestor-or-self::sect4
+ |ancestor-or-self::sect5
+ |ancestor-or-self::refentry
+ |ancestor-or-self::refsect1
+ |ancestor-or-self::refsect2
+ |ancestor-or-self::refsect3
+ |ancestor-or-self::simplesect
+ |ancestor-or-self::bibliography
+ |ancestor-or-self::glossary
+ |ancestor-or-self::index
+ |ancestor-or-self::webpage)[last()]'>
+
+<!ENTITY section.id 'generate-id(&section;)'>
+<!ENTITY sep '" "'>
+<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())
+ and ($role = @role or $type = @type or
+ (string-length($role) = 0 and string-length($type) = 0))'>
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- Jeni Tennison gets all the credit for what follows.
+ I think I understand it :-) Anyway, I've hacked it a bit, so the
+ bugs are mine. -->
+
+<xsl:key name="letter"
+ match="indexterm"
+ use="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+<xsl:key name="primary"
+ match="indexterm"
+ use="&primary;"/>
+
+<xsl:key name="secondary"
+ match="indexterm"
+ use="concat(&primary;, &sep;, &secondary;)"/>
+
+<xsl:key name="tertiary"
+ match="indexterm"
+ use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+
+<xsl:key name="endofrange"
+ match="indexterm[@class='endofrange']"
+ use="@startref"/>
+
+<xsl:key name="primary-section"
+ match="indexterm[not(secondary) and not(see)]"
+ use="concat(&primary;, &sep;, &section.id;)"/>
+
+<xsl:key name="secondary-section"
+ match="indexterm[not(tertiary) and not(see)]"
+ use="concat(&primary;, &sep;, &secondary;, &sep;, &section.id;)"/>
+
+<xsl:key name="tertiary-section"
+ match="indexterm[not(see)]"
+ use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, &section.id;)"/>
+
+<xsl:key name="see-also"
+ match="indexterm[seealso]"
+ use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/>
+
+<xsl:key name="see"
+ match="indexterm[see]"
+ use="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/>
+
+<xsl:key name="sections" match="*[@id]" use="@id"/>
+
+<xsl:template name="generate-index">
+ <xsl:param name="scope" select="(ancestor::book|/)[last()]"/>
+
+ <xsl:variable name="role">
+ <xsl:if test="$index.on.role != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="type">
+ <xsl:if test="$index.on.type != 0">
+ <xsl:value-of select="@type"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="terms"
+ select="//indexterm[count(.|key('letter',
+ translate(substring(&primary;, 1, 1),
+ &lowercase;,
+ &uppercase;))[&scope;][1]) = 1
+ and not(@class = 'endofrange')]"/>
+
+ <xsl:variable name="alphabetical"
+ select="$terms[contains(concat(&lowercase;, &uppercase;),
+ substring(&primary;, 1, 1))]"/>
+
+ <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
+ &uppercase;),
+ substring(&primary;, 1, 1)))]"/>
+ <div class="index">
+ <xsl:if test="$others">
+ <div class="indexdiv">
+ <h3>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'index symbols'"/>
+ </xsl:call-template>
+ </h3>
+ <dl>
+ <xsl:apply-templates select="$others[count(.|key('primary',
+ &primary;)[&scope;][1]) = 1]"
+ mode="index-symbol-div">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </dl>
+ </div>
+ </xsl:if>
+
+ <xsl:apply-templates select="$alphabetical[count(.|key('letter',
+ translate(substring(&primary;, 1, 1),
+ &lowercase;,&uppercase;))[&scope;][1]) = 1]"
+ mode="index-div">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </div>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-div">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key"
+ select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
+
+ <!-- Make sure that we don't generate a div if there are no terms in scope -->
+ <xsl:if test="key('letter', $key)[&scope;]
+ [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
+ <div class="indexdiv">
+ <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
+ <h3>
+ <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
+ </h3>
+ </xsl:if>
+ <dl>
+ <xsl:apply-templates select="key('letter', $key)[&scope;]
+ [count(.|key('primary', &primary;)[&scope;][1])=1]"
+ mode="index-primary">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </dl>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-symbol-div">
+ <xsl:param name="scope" select="/"/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),
+ &lowercase;,&uppercase;)"/>
+
+ <xsl:apply-templates select="key('letter', $key)
+ [&scope;][count(.|key('primary', &primary;)[1]) = 1]"
+ mode="index-primary">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-primary">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key" select="&primary;"/>
+ <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
+ <dt>
+ <xsl:value-of select="primary"/>
+ <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+ <xsl:apply-templates select="." mode="reference">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+
+ <xsl:if test="$refs[not(secondary)]/*[self::see]">
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
+ mode="index-see">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </dt>
+ <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
+ mode="index-seealso">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
+ mode="index-secondary">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </dl>
+ </dd>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-secondary">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
+ <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
+ <dt>
+ <xsl:value-of select="secondary"/>
+ <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+ <xsl:apply-templates select="." mode="reference">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+
+ <xsl:if test="$refs[not(tertiary)]/*[self::see]">
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
+ mode="index-see">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </dt>
+ <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
+ mode="index-seealso">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
+ mode="index-tertiary">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </dl>
+ </dd>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-tertiary">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
+ <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
+ <dt>
+ <xsl:value-of select="tertiary"/>
+ <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, &section.id;))[&scope;][1])]">
+ <xsl:apply-templates select="." mode="reference">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:apply-templates>
+ </xsl:for-each>
+
+ <xsl:if test="$refs/see">
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
+ mode="index-see">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </dt>
+ <xsl:if test="$refs/seealso">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
+ mode="index-seealso">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
+ </xsl:apply-templates>
+ </dl>
+ </dd>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="separator" select="', '"/>
+
+ <xsl:value-of select="$separator"/>
+ <xsl:choose>
+ <xsl:when test="@zone and string(@zone)">
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="normalize-space(@zone)"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="&section;/titleabbrev and $index.prefer.titleabbrev != 0">
+ <xsl:apply-templates select="&section;" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="&section;" mode="title.markup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="&section;"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:value-of select="$title"/> <!-- text only -->
+ </a>
+
+ <xsl:if test="key('endofrange', @id)[&scope;]">
+ <xsl:apply-templates select="key('endofrange', @id)[&scope;][last()]"
+ mode="reference">
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ <xsl:with-param name="separator" select="'-'"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="reference">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="zones"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($zones, ' ')">
+ <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
+ <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="reference">
+ <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
+ <xsl:with-param name="scope" select="$scope"/>
+ <xsl:with-param name="role" select="$role"/>
+ <xsl:with-param name="type" select="$type"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="zone" select="$zones"/>
+ <xsl:variable name="target" select="key('sections', $zone)[&scope;]"/>
+
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target[1]"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-see">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:text> (</xsl:text>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'see'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="see"/>
+ <xsl:text>)</xsl:text>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index-seealso">
+ <xsl:param name="scope" select="."/>
+ <xsl:param name="role" select="''"/>
+ <xsl:param name="type" select="''"/>
+
+ <xsl:for-each select="seealso">
+ <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
+ <dt>
+ <xsl:text>(</xsl:text>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'seealso'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>)</xsl:text>
+ </dt>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="*" mode="index-title-content">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="&section;" mode="title.markup"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/autotoc.xsl b/kdoctools/docbook/xsl/html/autotoc.xsl
new file mode 100644
index 000000000..91aaf8ea5
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/autotoc.xsl
@@ -0,0 +1,592 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:variable name="toc.listitem.type">
+ <xsl:choose>
+ <xsl:when test="$toc.list.type = 'dl'">dt</xsl:when>
+ <xsl:otherwise>li</xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
+<!-- this is just hack because dl and ul aren't completely isomorphic -->
+<xsl:variable name="toc.dd.type">
+ <xsl:choose>
+ <xsl:when test="$toc.list.type = 'dl'">dd</xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+</xsl:variable>
+
+<xsl:template name="make.toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="toc.title.p" select="true()"/>
+ <xsl:param name="nodes" select="/NOT-AN-ELEMENT"/>
+
+ <xsl:variable name="toc.title">
+ <xsl:if test="$toc.title.p">
+ <p>
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key">TableofContents</xsl:with-param>
+ </xsl:call-template>
+ </b>
+ </p>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$manual.toc != ''">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+ <xsl:variable name="toc" select="document($manual.toc, .)"/>
+ <xsl:variable name="tocentry" select="$toc//tocentry[@linkend=$id]"/>
+ <xsl:if test="$tocentry and $tocentry/*">
+ <div class="toc">
+ <xsl:copy-of select="$toc.title"/>
+ <xsl:element name="{$toc.list.type}">
+ <xsl:call-template name="manual-toc">
+ <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
+ </xsl:call-template>
+ </xsl:element>
+ </div>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$nodes">
+ <div class="toc">
+ <xsl:copy-of select="$toc.title"/>
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates select="$nodes" mode="toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:element>
+ </div>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make.lots">
+ <xsl:param name="toc.params" select="''"/>
+ <xsl:param name="toc"/>
+
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:copy-of select="$toc"/>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'figure')">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'figure'"/>
+ <xsl:with-param name="nodes" select=".//figure"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'table')">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'table'"/>
+ <xsl:with-param name="nodes" select=".//table"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'example')">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'example'"/>
+ <xsl:with-param name="nodes" select=".//example"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'equation')">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'equation'"/>
+ <xsl:with-param name="nodes" select=".//equation[title]"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'procedure')">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'procedure'"/>
+ <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="set.toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="make.toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="book|setindex"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="division.toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="make.toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="part|reference
+ |preface|chapter|appendix
+ |article
+ |bibliography|glossary|index
+ |refentry
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="component.toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="toc.title.p" select="true()"/>
+
+ <xsl:call-template name="make.toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
+ <xsl:with-param name="nodes" select="section|sect1
+ |simplesect[$simplesect.in.toc != 0]
+ |refentry
+ |article|bibliography|glossary
+ |appendix|index
+ |bridgehead[not(@renderas)
+ and $bridgehead.in.toc != 0]
+ |.//bridgehead[@renderas='sect1'
+ and $bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="component.toc.separator">
+ <!-- Customize to output something between
+ component.toc and first output -->
+</xsl:template>
+
+<xsl:template name="section.toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="toc.title.p" select="true()"/>
+
+ <xsl:call-template name="make.toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="toc.title.p" select="$toc.title.p"/>
+ <xsl:with-param name="nodes"
+ select="section|sect1|sect2|sect3|sect4|sect5|refentry
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="section.toc.separator">
+ <!-- Customize to output something between
+ section.toc and first output -->
+</xsl:template>
+<!-- ==================================================================== -->
+
+<xsl:template name="subtoc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+
+ <xsl:variable name="subtoc">
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates mode="toc" select="$nodes">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:element>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'section'">
+ <xsl:value-of select="count(ancestor::section) + 1"/>
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'sect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'sect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'sect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'sect4'">4</xsl:when>
+ <xsl:when test="local-name(.) = 'sect5'">5</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect1'">1</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect2'">2</xsl:when>
+ <xsl:when test="local-name(.) = 'refsect3'">3</xsl:when>
+ <xsl:when test="local-name(.) = 'simplesect'">
+ <!-- sigh... -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'section'">
+ <xsl:value-of select="count(ancestor::section)"/>
+ </xsl:when>
+ <xsl:when test="local-name(..) = 'sect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'sect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'sect3'">4</xsl:when>
+ <xsl:when test="local-name(..) = 'sect4'">5</xsl:when>
+ <xsl:when test="local-name(..) = 'sect5'">6</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect1'">2</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect2'">3</xsl:when>
+ <xsl:when test="local-name(..) = 'refsect3'">4</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="depth.from.context" select="count(ancestor::*)-count($toc-context/ancestor::*)"/>
+
+ <xsl:variable name="subtoc.list">
+ <xsl:choose>
+ <xsl:when test="$toc.dd.type = ''">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.dd.type}">
+ <xsl:copy-of select="$subtoc"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:element name="{$toc.listitem.type}">
+ <xsl:call-template name="toc.line">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ <xsl:if test="$toc.listitem.type = 'li'
+ and $toc.section.depth > $depth and count($nodes)&gt;0
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+ </xsl:element>
+ <xsl:if test="$toc.listitem.type != 'li'
+ and $toc.section.depth > $depth and count($nodes)&gt;0
+ and $toc.max.depth > $depth.from.context">
+ <xsl:copy-of select="$subtoc.list"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="toc.line">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="depth" select="1"/>
+ <xsl:param name="depth.from.context" select="8"/>
+
+ <span>
+ <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </a>
+ </span>
+</xsl:template>
+
+<xsl:template match="book" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="part|reference
+ |preface|chapter|appendix
+ |article
+ |bibliography|glossary|index
+ |refentry
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="setindex" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <!-- If the setindex tag is not empty, it should be it in the TOC -->
+ <xsl:if test="* or $generate.index != 0">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="appendix|chapter|article
+ |index|glossary|bibliography
+ |preface|reference|refentry
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface|chapter|appendix|article" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="section|sect1
+ |simplesect[$simplesect.in.toc != 0]
+ |refentry
+ |glossary|bibliography|index
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect2
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect2" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect3
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect3" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect4
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect4" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="sect5
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="sect5" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="simplesect" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="section" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes" select="section
+ |bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:if test="$bridgehead.in.toc != 0">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="bibliography|glossary" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="index" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <!-- If the index tag is not empty, it should be it in the TOC -->
+ <xsl:if test="* or $generate.index != 0">
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="refentry" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:variable name="refmeta" select=".//refmeta"/>
+ <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
+ <xsl:variable name="refnamediv" select=".//refnamediv"/>
+ <xsl:variable name="refname" select="$refnamediv//refname"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$refentrytitle">
+ <xsl:apply-templates select="$refentrytitle[1]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:when test="$refname">
+ <xsl:apply-templates select="$refname[1]" mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:element name="{$toc.listitem.type}">
+ <span class='refentrytitle'>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target"/>
+ </xsl:attribute>
+ <xsl:copy-of select="$title"/>
+ </a>
+ </span>
+ <span class='refpurpose'>
+ <xsl:if test="$annotate.toc != 0">
+ <xsl:text> - </xsl:text>
+ <xsl:value-of select="refnamediv/refpurpose"/>
+ </xsl:if>
+ </span>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="title" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+</xsl:template>
+
+<xsl:template name="manual-toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="tocentry"/>
+
+ <!-- be careful, we don't want to change the current document to the other tree! -->
+
+ <xsl:if test="$tocentry">
+ <xsl:variable name="node" select="key('id', $tocentry/@linkend)"/>
+
+ <xsl:element name="{$toc.listitem.type}">
+ <xsl:variable name="label">
+ <xsl:apply-templates select="$node" mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$node" mode="titleabbrev.markup"/>
+ </a>
+ </xsl:element>
+
+ <xsl:if test="$tocentry/*">
+ <xsl:element name="{$toc.list.type}">
+ <xsl:call-template name="manual-toc">
+ <xsl:with-param name="tocentry" select="$tocentry/*[1]"/>
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:if>
+
+ <xsl:if test="$tocentry/following-sibling::*">
+ <xsl:call-template name="manual-toc">
+ <xsl:with-param name="tocentry" select="$tocentry/following-sibling::*[1]"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="list.of.titles">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:param name="titles" select="'table'"/>
+ <xsl:param name="nodes" select=".//table"/>
+
+ <xsl:if test="$nodes">
+ <div class="list-of-{$titles}s">
+ <p>
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key">
+ <xsl:choose>
+ <xsl:when test="$titles='table'">ListofTables</xsl:when>
+ <xsl:when test="$titles='figure'">ListofFigures</xsl:when>
+ <xsl:when test="$titles='equation'">ListofEquations</xsl:when>
+ <xsl:when test="$titles='example'">ListofExamples</xsl:when>
+ <xsl:when test="$titles='procedure'">ListofProcedures</xsl:when>
+ <xsl:otherwise>ListofUnknown</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </b>
+ </p>
+
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates select="$nodes" mode="toc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:apply-templates>
+ </xsl:element>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="figure|table|example|equation|procedure" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:element name="{$toc.listitem.type}">
+ <xsl:variable name="label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$label"/>
+ <xsl:if test="$label != ''">
+ <xsl:value-of select="$autotoc.label.separator"/>
+ </xsl:if>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </a>
+ </xsl:element>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/biblio.xsl b/kdoctools/docbook/xsl/html/biblio.xsl
new file mode 100644
index 000000000..9ff9fa366
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/biblio.xsl
@@ -0,0 +1,1085 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliography">
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="bibliography.titlepage"/>
+
+ <xsl:apply-templates/>
+
+ <xsl:if test="not(parent::article)">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="bibliography/bibliographyinfo"></xsl:template>
+<xsl:template match="bibliography/title"></xsl:template>
+<xsl:template match="bibliography/subtitle"></xsl:template>
+<xsl:template match="bibliography/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliodiv">
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="bibliodiv/title">
+ <h3 class="{name(.)}">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bibliolist">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="blockinfo/title|title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+ <xsl:apply-templates select="*[not(self::blockinfo)
+ and not(self::title)
+ and not(self::titleabbrev)
+ and not(self::biblioentry)
+ and not(self::bibliomixed)]"/>
+ <dl>
+ <xsl:apply-templates select="biblioentry|bibliomixed"/>
+ </dl>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="biblioentry">
+ <xsl:param name="label">
+ <xsl:call-template name="biblioentry.label"/>
+ </xsl:param>
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string(.) = ''">
+ <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+ <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+ <xsl:choose>
+ <xsl:when test="$entry">
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:apply-templates select="$entry">
+ <xsl:with-param name="label" select="$label"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$entry"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </xsl:message>
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <p>
+ <xsl:copy-of select="$label"/>
+ <xsl:text>Error: no bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <p>
+ <xsl:copy-of select="$label"/>
+ <xsl:apply-templates mode="bibliography.mode"/>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="bibliomixed">
+ <xsl:param name="label">
+ <xsl:call-template name="biblioentry.label"/>
+ </xsl:param>
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string(.) = ''">
+ <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+ <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+ <xsl:choose>
+ <xsl:when test="$entry">
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:apply-templates select="$entry">
+ <xsl:with-param name="label" select="$label"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$entry"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </xsl:message>
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <p>
+ <xsl:copy-of select="$label"/>
+ <xsl:text>Error: no bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <p class="{name(.)}">
+ <xsl:copy-of select="$label"/>
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="biblioentry.label">
+ <xsl:param name="node" select="."/>
+
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:text>[</xsl:text>
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+ level="any" format="1"/>
+ <xsl:text>] </xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
+ <xsl:text>[</xsl:text>
+ <xsl:apply-templates select="$node/abbrev[1]"/>
+ <xsl:text>] </xsl:text>
+ </xsl:when>
+ <xsl:when test="$node/@xreflabel">
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="$node/@xreflabel"/>
+ <xsl:text>] </xsl:text>
+ </xsl:when>
+ <xsl:when test="$node/@id">
+ <xsl:text>[</xsl:text>
+ <xsl:value-of select="$node/@id"/>
+ <xsl:text>] </xsl:text>
+ </xsl:when>
+ <xsl:otherwise><!-- nop --></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliography.mode">
+ <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliography.mode">
+ <xsl:if test="preceding-sibling::*">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliography.mode">
+ <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="address" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="artheader|articleinfo|info" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:call-template name="person.name"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
+ <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:call-template name="person.name.list"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="biblioset/title|biblioset/citetitle"
+ mode="bibliography.mode">
+ <xsl:variable name="relation" select="../@relation"/>
+ <xsl:choose>
+ <xsl:when test="$relation='article' or @pubwork='article'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:apply-templates/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <i><xsl:apply-templates/></i>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bookbiblio" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:choose>
+ <xsl:when test="@pubwork = 'article'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="collab" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="collabname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confdates" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confnum" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confsponsor" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="copyright" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Copyright'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">copyright</xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="year" mode="bibliography.mode"/>
+ <xsl:if test="holder">
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="holder" mode="bibliography.mode"/>
+ </xsl:if>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="year" mode="bibliography.mode">
+ <xsl:apply-templates/><xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="year[position()=last()]" mode="bibliography.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="holder" mode="bibliography.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="corpauthor" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpcredit" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:call-template name="person.name"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliography.mode">
+ <!-- suppressed -->
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliography.mode">
+ <!-- suppressed; how could this be represented? -->
+</xsl:template>
+
+<xsl:template match="seriesinfo" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <i><xsl:apply-templates mode="bibliography.mode"/></i>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+ mode="bibliography.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliography.mode"/>
+ <xsl:value-of select="$biblioentry.item.separator"/>
+ </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="bibliomixed.mode">
+ <xsl:apply-templates select="."/><!-- try the default mode -->
+</xsl:template>
+
+<xsl:template match="abbrev" mode="bibliomixed.mode">
+ <xsl:if test="preceding-sibling::*">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="abstract" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="address" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="author" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="bibliomset" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliomset/title|bibliomset/citetitle"
+ mode="bibliomixed.mode">
+ <xsl:variable name="relation" select="../@relation"/>
+ <xsl:choose>
+ <xsl:when test="$relation='article' or @pubwork='article'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:apply-templates/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <i><xsl:apply-templates/></i>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ================================================== -->
+
+<xsl:template match="biblioset" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="citetitle" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:choose>
+ <xsl:when test="@pubwork = 'article'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+</xsl:template>
+
+
+<xsl:template match="collab" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contractnum" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="copyright" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpcredit" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpname" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="date" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="editor" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="firstname" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="honorific" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="lineage" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othername" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="productname" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="publisher" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="publishername" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="bibliomixed.mode">
+ <!-- suppressed; how could this be represented? -->
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="surname" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="title" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="volumenum" mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
+ mode="bibliomixed.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="bibliomixed.mode"/>
+ </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/block.xsl b/kdoctools/docbook/xsl/html/block.xsl
new file mode 100644
index 000000000..075fc350f
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/block.xsl
@@ -0,0 +1,426 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<!-- What should we do about styling blockinfo? -->
+
+<xsl:template match="blockinfo">
+ <!-- suppress -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="block.object">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="para">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class">
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <xsl:if test="position() = 1 and parent::listitem">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="parent::listitem"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="paragraph">
+ <xsl:param name="class" select="''"/>
+ <xsl:param name="content"/>
+
+ <xsl:variable name="p">
+ <p>
+ <xsl:if test="$class != ''">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </p>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$html.cleanup != 0">
+ <xsl:call-template name="unwrap.p">
+ <xsl:with-param name="p" select="$p"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$p"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="simpara">
+ <!-- see also listitem/simpara in lists.xsl -->
+ <p>
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="formalpara">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class">
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="formalpara/title">
+ <xsl:variable name="titleStr">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <xsl:variable name="lastChar">
+ <xsl:if test="$titleStr != ''">
+ <xsl:value-of select="substring($titleStr,string-length($titleStr),1)"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <b>
+ <xsl:copy-of select="$titleStr"/>
+ <xsl:if test="$lastChar != ''
+ and not(contains($runinhead.title.end.punct, $lastChar))">
+ <xsl:value-of select="$runinhead.default.title.end.punct"/>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </b>
+</xsl:template>
+
+<xsl:template match="formalpara/para">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="blockquote">
+ <div class="{local-name(.)}">
+ <xsl:if test="@lang or @xml:lang">
+ <xsl:call-template name="language.attribute"/>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="attribution">
+ <table border="0" width="100%"
+ cellspacing="0" cellpadding="0" class="blockquote"
+ summary="Block quote">
+ <tr>
+ <td width="10%" valign="top">&#160;</td>
+ <td width="80%" valign="top">
+ <xsl:apply-templates select="child::*[local-name(.)!='attribution']"/>
+ </td>
+ <td width="10%" valign="top">&#160;</td>
+ </tr>
+ <tr>
+ <td width="10%" valign="top">&#160;</td>
+ <td colspan="2" align="right" valign="top">
+ <xsl:text>--</xsl:text>
+ <xsl:apply-templates select="attribution"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <blockquote class="{local-name(.)}">
+ <xsl:apply-templates/>
+ </blockquote>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:template match="blockquote/title">
+ <div class="blockquote-title">
+ <p>
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </p>
+ </div>
+</xsl:template>
+
+<xsl:template match="epigraph">
+ <div class="{name(.)}">
+ <xsl:apply-templates select="para|simpara|formalpara|literallayout"/>
+ <xsl:if test="attribution">
+ <div class="attribution">
+ <span>--<xsl:apply-templates select="attribution"/></span>
+ </div>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="attribution">
+ <span class="{name(.)}"><xsl:apply-templates/></span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="sidebar">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sidebar/title">
+ <p class="title">
+ <b><xsl:apply-templates/></b>
+ </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="abstract">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="formal.object.heading">
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="title.markup">
+ <xsl:with-param name="allow-anchors" select="'1'"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="abstract/title">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="msgset">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgentry">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="simplemsgentry">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msg">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgmain">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgmain/title">
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgsub">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgsub/title">
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgrel">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msgrel/title">
+ <b><xsl:apply-templates/></b>
+</xsl:template>
+
+<xsl:template match="msgtext">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="msginfo">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msglevel">
+ <p>
+ <b>
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="'msgset'"/>
+ <xsl:with-param name="name" select="'MsgLevel'"/>
+ </xsl:call-template>
+ </b>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="msgorig">
+ <p>
+ <b>
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="'msgset'"/>
+ <xsl:with-param name="name" select="'MsgOrig'"/>
+ </xsl:call-template>
+ </b>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="msgaud">
+ <p>
+ <b>
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="'msgset'"/>
+ <xsl:with-param name="name" select="'MsgAud'"/>
+ </xsl:call-template>
+ </b>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="msgexplan">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<xsl:template match="msgexplan/title">
+ <p><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="revhistory">
+ <div class="{name(.)}">
+ <table border="0" width="100%" summary="Revision history">
+ <tr>
+ <th align="left" valign="top" colspan="3">
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RevHistory'"/>
+ </xsl:call-template>
+ </b>
+ </th>
+ </tr>
+ <xsl:apply-templates/>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template match="revhistory/revision">
+ <xsl:variable name="revnumber" select=".//revnumber"/>
+ <xsl:variable name="revdate" select=".//date"/>
+ <xsl:variable name="revauthor" select=".//authorinitials"/>
+ <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+ <tr>
+ <td align="left">
+ <xsl:if test="$revnumber">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Revision'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="$revnumber"/>
+ </xsl:if>
+ </td>
+ <td align="left">
+ <xsl:apply-templates select="$revdate"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="count($revauthor)=0">
+ <td align="left">
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">nbsp</xsl:with-param>
+ </xsl:call-template>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td align="left">
+ <xsl:apply-templates select="$revauthor"/>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ <xsl:if test="$revremark">
+ <tr>
+ <td align="left" colspan="3">
+ <xsl:apply-templates select="$revremark"/>
+ </td>
+ </tr>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/date">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials">
+ <xsl:text>, </xsl:text>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials[1]" priority="2">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revremark">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="ackno">
+ <p class="{name(.)}">
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="highlights">
+ <xsl:call-template name="block.object"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/callout.xsl b/kdoctools/docbook/xsl/html/callout.xsl
new file mode 100644
index 000000000..03f4dc4a0
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/callout.xsl
@@ -0,0 +1,197 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+ xmlns:xverb="com.nwalsh.xalan.Verbatim"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ exclude-result-prefixes="sverb xverb lxslt"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+ functions="insertCallouts"/>
+
+<xsl:template match="programlistingco|screenco">
+ <xsl:variable name="verbatim" select="programlisting|screen"/>
+
+ <xsl:choose>
+ <xsl:when test="$use.extensions != '0'
+ and $callouts.extension != '0'">
+ <xsl:variable name="rtf">
+ <xsl:apply-templates select="$verbatim">
+ <xsl:with-param name="suppress-numbers" select="'1'"/>
+ </xsl:apply-templates>
+ </xsl:variable>
+
+ <xsl:variable name="rtf-with-callouts">
+ <xsl:choose>
+ <xsl:when test="function-available('sverb:insertCallouts')">
+ <xsl:copy-of select="sverb:insertCallouts(areaspec,$rtf)"/>
+ </xsl:when>
+ <xsl:when test="function-available('xverb:insertCallouts')">
+ <xsl:copy-of select="xverb:insertCallouts(areaspec,$rtf)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No insertCallouts function is available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$verbatim/@linenumbering = 'numbered'
+ and $linenumbering.extension != '0'">
+ <div class="{name(.)}">
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf-with-callouts"/>
+ <xsl:with-param name="pi.context"
+ select="programlisting|screen"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="calloutlist"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <xsl:copy-of select="$rtf-with-callouts"/>
+ <xsl:apply-templates select="calloutlist"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="areaspec|areaset|area">
+</xsl:template>
+
+<xsl:template match="areaset" mode="conumber">
+ <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="area" mode="conumber">
+ <xsl:number count="area|areaset" format="1"/>
+</xsl:template>
+
+<xsl:template match="co" name="co">
+ <!-- Support a single linkend in HTML -->
+ <xsl:variable name="targets" select="key('id', @linkends)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:choose>
+ <xsl:when test="$target">
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="." mode="callout-bug"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="." mode="callout-bug"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="coref">
+ <!-- tricky; this relies on the fact that we can process the "co" that's -->
+ <!-- "over there" as if it were "right here" -->
+
+ <xsl:variable name="co" select="key('id', @linkend)"/>
+ <xsl:choose>
+ <xsl:when test="not($co)">
+ <xsl:message>
+ <xsl:text>Error: coref link is broken: </xsl:text>
+ <xsl:value-of select="@linkend"/>
+ </xsl:message>
+ </xsl:when>
+ <xsl:when test="local-name($co) != 'co'">
+ <xsl:message>
+ <xsl:text>Error: coref doesn't point to a co: </xsl:text>
+ <xsl:value-of select="@linkend"/>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$co"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="co" mode="callout-bug">
+ <xsl:call-template name="callout-bug">
+ <xsl:with-param name="conum">
+ <xsl:number count="co"
+ level="any"
+ from="programlisting|screen|literallayout|synopsis"
+ format="1"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="callout-bug">
+ <xsl:param name="conum" select='1'/>
+
+ <xsl:choose>
+ <xsl:when test="$callout.graphics != 0
+ and $conum &lt;= $callout.graphics.number.limit">
+ <img src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"
+ alt="{$conum}" border="0"/>
+ </xsl:when>
+ <xsl:when test="$callout.unicode != 0
+ and $conum &lt;= $callout.unicode.number.limit">
+ <xsl:choose>
+ <xsl:when test="$callout.unicode.start.character = 10102">
+ <xsl:choose>
+ <xsl:when test="$conum = 1">&#10102;</xsl:when>
+ <xsl:when test="$conum = 2">&#10103;</xsl:when>
+ <xsl:when test="$conum = 3">&#10104;</xsl:when>
+ <xsl:when test="$conum = 4">&#10105;</xsl:when>
+ <xsl:when test="$conum = 5">&#10106;</xsl:when>
+ <xsl:when test="$conum = 6">&#10107;</xsl:when>
+ <xsl:when test="$conum = 7">&#10108;</xsl:when>
+ <xsl:when test="$conum = 8">&#10109;</xsl:when>
+ <xsl:when test="$conum = 9">&#10110;</xsl:when>
+ <xsl:when test="$conum = 10">&#10111;</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Don't know how to generate Unicode callouts </xsl:text>
+ <xsl:text>when $callout.unicode.start.character is </xsl:text>
+ <xsl:value-of select="$callout.unicode.start.character"/>
+ </xsl:message>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$conum"/>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$conum"/>
+ <xsl:text>)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/changebars.xsl b/kdoctools/docbook/xsl/html/changebars.xsl
new file mode 100644
index 000000000..441b24c5a
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/changebars.xsl
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+<xsl:import href="docbook.xsl"/>
+
+<xsl:param name="show.revisionflag" select="'1'"/>
+
+<xsl:template name="system.head.content">
+<style type="text/css">
+<xsl:text>
+div.added { background-color: #ffff99; }
+div.deleted { text-decoration: line-through;
+ background-color: #FF7F7F; }
+div.changed { background-color: #99ff99; }
+div.off { }
+
+span.added { background-color: #ffff99; }
+span.deleted { text-decoration: line-through;
+ background-color: #FF7F7F; }
+span.changed { background-color: #99ff99; }
+span.off { }
+</xsl:text>
+</style>
+</xsl:template>
+
+<xsl:template match="*[@revisionflag]">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'para'
+ or local-name(.) = 'simpara'
+ or local-name(.) = 'formalpara'
+ or local-name(.) = 'section'
+ or local-name(.) = 'sect1'
+ or local-name(.) = 'sect2'
+ or local-name(.) = 'sect3'
+ or local-name(.) = 'sect4'
+ or local-name(.) = 'sect5'
+ or local-name(.) = 'chapter'
+ or local-name(.) = 'preface'
+ or local-name(.) = 'itemizedlist'
+ or local-name(.) = 'varlistentry'
+ or local-name(.) = 'glossary'
+ or local-name(.) = 'bibliography'
+ or local-name(.) = 'index'
+ or local-name(.) = 'appendix'">
+ <div class='{@revisionflag}'>
+ <xsl:apply-imports/>
+ </div>
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'phrase'
+ or local-name(.) = 'ulink'
+ or local-name(.) = 'link'
+ or local-name(.) = 'filename'
+ or local-name(.) = 'literal'
+ or local-name(.) = 'member'
+ or local-name(.) = 'glossterm'
+ or local-name(.) = 'sgmltag'
+ or local-name(.) = 'quote'
+ or local-name(.) = 'emphasis'
+ or local-name(.) = 'command'
+ or local-name(.) = 'xref'">
+ <span class='{@revisionflag}'>
+ <xsl:apply-imports/>
+ </span>
+ </xsl:when>
+ <xsl:when test="local-name(.) = 'listitem'
+ or local-name(.) = 'entry'
+ or local-name(.) = 'title'">
+ <!-- nop; these are handled directly in the stylesheet -->
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Revisionflag on unexpected element: </xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text> (Assuming block)</xsl:text>
+ </xsl:message>
+ <div class='{@revisionflag}'>
+ <xsl:apply-imports/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunk-code.xsl b/kdoctools/docbook/xsl/html/chunk-code.xsl
new file mode 100644
index 000000000..17213fcd5
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunk-code.xsl
@@ -0,0 +1,1000 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="onechunk" select="0"/>
+<xsl:param name="refentry.separator" select="0"/>
+<xsl:param name="chunk.fast" select="0"/>
+
+<xsl:key name="genid" match="*" use="generate-id()"/>
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="chunk.hierarchy">
+ <xsl:if test="$chunk.fast != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:message>Computing chunks...</xsl:message>
+ <xsl:apply-templates select="/*" mode="find.chunks"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Fast chunking requires exsl:node-set(). </xsl:text>
+ <xsl:text>Using "slow" chunking.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:variable>
+
+<xsl:template match="*" mode="find.chunks">
+ <xsl:variable name="chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$chunk != 0">
+ <div class="{local-name(.)}" id="{generate-id()}">
+ <xsl:apply-templates select="*" mode="find.chunks"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*" mode="find.chunks"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+ <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+ <xsl:variable name="genid" select="generate-id()"/>
+
+ <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+ <xsl:variable name="prevdiv"
+ select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+ <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+ <xsl:variable name="nextdiv"
+ select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+ <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and not(parent::*)">
+ <xsl:call-template name="chunk-all-sections">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$onechunk != 0">
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:when test="$chunk.first.sections = 0">
+ <xsl:call-template name="chunk-first-section-with-parent">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="chunk-all-sections">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process-chunk">
+ <xsl:param name="prev" select="."/>
+ <xsl:param name="next" select="."/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunkfn">
+ <xsl:if test="$ischunk='1'">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:message>
+ <xsl:text>Error </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text> is not a chunk!</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name" select="$chunkfn"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-first-section-with-parent">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <!-- These xpath expressions are really hairy. The trick is to pick sections -->
+ <!-- that are not first children and are not the children of first children -->
+
+ <!-- Break these variables into pieces to work around
+ http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
+
+ <xsl:variable name="prev-v1"
+ select="(ancestor::sect1[$chunk.section.depth &gt; 0
+ and preceding-sibling::sect1][1]
+
+ |ancestor::sect2[$chunk.section.depth &gt; 1
+ and preceding-sibling::sect2
+ and parent::sect1[preceding-sibling::sect1]][1]
+
+ |ancestor::sect3[$chunk.section.depth &gt; 2
+ and preceding-sibling::sect3
+ and parent::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |ancestor::sect4[$chunk.section.depth &gt; 3
+ and preceding-sibling::sect4
+ and parent::sect3[preceding-sibling::sect2]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |ancestor::sect5[$chunk.section.depth &gt; 4
+ and preceding-sibling::sect5
+ and parent::sect4[preceding-sibling::sect4]
+ and ancestor::sect3[preceding-sibling::sect3]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)
+ and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+ <xsl:variable name="prev-v2"
+ select="(preceding::sect1[$chunk.section.depth &gt; 0
+ and preceding-sibling::sect1][1]
+
+ |preceding::sect2[$chunk.section.depth &gt; 1
+ and preceding-sibling::sect2
+ and parent::sect1[preceding-sibling::sect1]][1]
+
+ |preceding::sect3[$chunk.section.depth &gt; 2
+ and preceding-sibling::sect3
+ and parent::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |preceding::sect4[$chunk.section.depth &gt; 3
+ and preceding-sibling::sect4
+ and parent::sect3[preceding-sibling::sect2]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |preceding::sect5[$chunk.section.depth &gt; 4
+ and preceding-sibling::sect5
+ and parent::sect4[preceding-sibling::sect4]
+ and ancestor::sect3[preceding-sibling::sect3]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |preceding::section[$chunk.section.depth &gt; count(ancestor::section)
+ and preceding-sibling::section
+ and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+ <xsl:variable name="prev"
+ select="(preceding::book[1]
+ |preceding::preface[1]
+ |preceding::chapter[1]
+ |preceding::appendix[1]
+ |preceding::part[1]
+ |preceding::reference[1]
+ |preceding::refentry[1]
+ |preceding::colophon[1]
+ |preceding::article[1]
+ |preceding::bibliography[parent::article or parent::book or parent::part][1]
+ |preceding::glossary[parent::article or parent::book or parent::part][1]
+ |preceding::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |preceding::setindex[$generate.index != 0][1]
+ |ancestor::set
+ |ancestor::book[1]
+ |ancestor::preface[1]
+ |ancestor::chapter[1]
+ |ancestor::appendix[1]
+ |ancestor::part[1]
+ |ancestor::reference[1]
+ |ancestor::article[1]
+ |$prev-v1
+ |$prev-v2)[last()]"/>
+
+ <xsl:variable name="next-v1"
+ select="(following::sect1[$chunk.section.depth &gt; 0
+ and preceding-sibling::sect1][1]
+
+ |following::sect2[$chunk.section.depth &gt; 1
+ and preceding-sibling::sect2
+ and parent::sect1[preceding-sibling::sect1]][1]
+
+ |following::sect3[$chunk.section.depth &gt; 2
+ and preceding-sibling::sect3
+ and parent::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |following::sect4[$chunk.section.depth &gt; 3
+ and preceding-sibling::sect4
+ and parent::sect3[preceding-sibling::sect2]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |following::sect5[$chunk.section.depth &gt; 4
+ and preceding-sibling::sect5
+ and parent::sect4[preceding-sibling::sect4]
+ and ancestor::sect3[preceding-sibling::sect3]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |following::section[$chunk.section.depth &gt; count(ancestor::section)
+ and preceding-sibling::section
+ and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
+
+ <xsl:variable name="next-v2"
+ select="(descendant::sect1[$chunk.section.depth &gt; 0
+ and preceding-sibling::sect1][1]
+
+ |descendant::sect2[$chunk.section.depth &gt; 1
+ and preceding-sibling::sect2
+ and parent::sect1[preceding-sibling::sect1]][1]
+
+ |descendant::sect3[$chunk.section.depth &gt; 2
+ and preceding-sibling::sect3
+ and parent::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |descendant::sect4[$chunk.section.depth &gt; 3
+ and preceding-sibling::sect4
+ and parent::sect3[preceding-sibling::sect2]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |descendant::sect5[$chunk.section.depth &gt; 4
+ and preceding-sibling::sect5
+ and parent::sect4[preceding-sibling::sect4]
+ and ancestor::sect3[preceding-sibling::sect3]
+ and ancestor::sect2[preceding-sibling::sect2]
+ and ancestor::sect1[preceding-sibling::sect1]][1]
+
+ |descendant::section[$chunk.section.depth &gt; count(ancestor::section)
+ and preceding-sibling::section
+ and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
+
+ <xsl:variable name="next"
+ select="(following::book[1]
+ |following::preface[1]
+ |following::chapter[1]
+ |following::appendix[1]
+ |following::part[1]
+ |following::reference[1]
+ |following::refentry[1]
+ |following::colophon[1]
+ |following::bibliography[parent::article or parent::book or parent::part][1]
+ |following::glossary[parent::article or parent::book or parent::part][1]
+ |following::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |following::article[1]
+ |following::setindex[$generate.index != 0][1]
+ |descendant::book[1]
+ |descendant::preface[1]
+ |descendant::chapter[1]
+ |descendant::appendix[1]
+ |descendant::article[1]
+ |descendant::bibliography[parent::article or parent::book or parent::part][1]
+ |descendant::glossary[parent::article or parent::book or parent::part][1]
+ |descendant::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |descendant::colophon[1]
+ |descendant::setindex[$generate.index != 0][1]
+ |descendant::part[1]
+ |descendant::reference[1]
+ |descendant::refentry[1]
+ |$next-v1
+ |$next-v2)[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:variable name="prev-v1"
+ select="(preceding::sect1[$chunk.section.depth &gt; 0][1]
+ |preceding::sect2[$chunk.section.depth &gt; 1][1]
+ |preceding::sect3[$chunk.section.depth &gt; 2][1]
+ |preceding::sect4[$chunk.section.depth &gt; 3][1]
+ |preceding::sect5[$chunk.section.depth &gt; 4][1]
+ |preceding::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+ <xsl:variable name="prev-v2"
+ select="(ancestor::sect1[$chunk.section.depth &gt; 0][1]
+ |ancestor::sect2[$chunk.section.depth &gt; 1][1]
+ |ancestor::sect3[$chunk.section.depth &gt; 2][1]
+ |ancestor::sect4[$chunk.section.depth &gt; 3][1]
+ |ancestor::sect5[$chunk.section.depth &gt; 4][1]
+ |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+ <xsl:variable name="prev"
+ select="(preceding::book[1]
+ |preceding::preface[1]
+ |preceding::chapter[1]
+ |preceding::appendix[1]
+ |preceding::part[1]
+ |preceding::reference[1]
+ |preceding::refentry[1]
+ |preceding::colophon[1]
+ |preceding::article[1]
+ |preceding::bibliography[parent::article or parent::book or parent::part][1]
+ |preceding::glossary[parent::article or parent::book or parent::part][1]
+ |preceding::index[$generate.index != 0]
+ [parent::article or parent::book or parent::part][1]
+ |preceding::setindex[$generate.index != 0][1]
+ |ancestor::set
+ |ancestor::book[1]
+ |ancestor::preface[1]
+ |ancestor::chapter[1]
+ |ancestor::appendix[1]
+ |ancestor::part[1]
+ |ancestor::reference[1]
+ |ancestor::article[1]
+ |$prev-v1
+ |$prev-v2)[last()]"/>
+
+ <xsl:variable name="next-v1"
+ select="(following::sect1[$chunk.section.depth &gt; 0][1]
+ |following::sect2[$chunk.section.depth &gt; 1][1]
+ |following::sect3[$chunk.section.depth &gt; 2][1]
+ |following::sect4[$chunk.section.depth &gt; 3][1]
+ |following::sect5[$chunk.section.depth &gt; 4][1]
+ |following::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
+
+ <xsl:variable name="next-v2"
+ select="(descendant::sect1[$chunk.section.depth &gt; 0][1]
+ |descendant::sect2[$chunk.section.depth &gt; 1][1]
+ |descendant::sect3[$chunk.section.depth &gt; 2][1]
+ |descendant::sect4[$chunk.section.depth &gt; 3][1]
+ |descendant::sect5[$chunk.section.depth &gt; 4][1]
+ |descendant::section[$chunk.section.depth
+ &gt; count(ancestor::section)][1])[1]"/>
+
+ <xsl:variable name="next"
+ select="(following::book[1]
+ |following::preface[1]
+ |following::chapter[1]
+ |following::appendix[1]
+ |following::part[1]
+ |following::reference[1]
+ |following::refentry[1]
+ |following::colophon[1]
+ |following::bibliography[parent::article or parent::book or parent::part][1]
+ |following::glossary[parent::article or parent::book or parent::part][1]
+ |following::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |following::article[1]
+ |following::setindex[$generate.index != 0][1]
+ |descendant::book[1]
+ |descendant::preface[1]
+ |descendant::chapter[1]
+ |descendant::appendix[1]
+ |descendant::article[1]
+ |descendant::bibliography[parent::article or parent::book][1]
+ |descendant::glossary[parent::article or parent::book or parent::part][1]
+ |descendant::index[$generate.index != 0]
+ [parent::article or parent::book][1]
+ |descendant::colophon[1]
+ |descendant::setindex[$generate.index != 0][1]
+ |descendant::part[1]
+ |descendant::reference[1]
+ |descendant::refentry[1]
+ |$next-v1
+ |$next-v2)[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="$rootid != ''">
+ <xsl:choose>
+ <xsl:when test="count(key('id',$rootid)) = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>ID '</xsl:text>
+ <xsl:value-of select="$rootid"/>
+ <xsl:text>' not found in document.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or
+ $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="key('id', $rootid)"
+ mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="key('id',$rootid)"
+ mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="key('id',$rootid)"
+ mode="collect.tex.math"/>
+ </xsl:if>
+ <xsl:if test="$generate.manifest != 0">
+ <xsl:call-template name="generate.manifest">
+ <xsl:with-param name="node" select="key('id',$rootid)"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or
+ $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="/" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="/" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="/" mode="collect.tex.math"/>
+ </xsl:if>
+ <xsl:if test="$generate.manifest != 0">
+ <xsl:call-template name="generate.manifest"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template match="set|book|part|preface|chapter|appendix
+ |article
+ |reference|refentry
+ |book/glossary|article/glossary|part/glossary
+ |book/bibliography|article/bibliography|part/bibliography
+ |colophon">
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="not(parent::*)">
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:when>
+ <xsl:when test="$ischunk = 0">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex
+ |book/index
+ |article/index
+ |part/index">
+ <!-- some implementations use completely empty index tags to indicate -->
+ <!-- where an automatically generated index should be inserted. so -->
+ <!-- if the index is completely empty, skip it. -->
+ <xsl:if test="count(*)>0 or $generate.index != '0'">
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make.lots">
+ <xsl:param name="toc.params" select="''"/>
+ <xsl:param name="toc"/>
+
+ <xsl:variable name="lots">
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:copy-of select="$toc"/>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'figure')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'figure'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'figure'"/>
+ <xsl:with-param name="nodes" select=".//figure"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'figure'"/>
+ <xsl:with-param name="nodes" select=".//figure"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'table')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'table'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'table'"/>
+ <xsl:with-param name="nodes" select=".//table"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'table'"/>
+ <xsl:with-param name="nodes" select=".//table"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'example')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'example'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'example'"/>
+ <xsl:with-param name="nodes" select=".//example"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'example'"/>
+ <xsl:with-param name="nodes" select=".//example"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'equation')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'equation'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'equation'"/>
+ <xsl:with-param name="nodes" select=".//equation"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'equation'"/>
+ <xsl:with-param name="nodes" select=".//equation"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'procedure')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'procedure'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'procedure'"/>
+ <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'procedure'"/>
+ <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:if test="string($lots) != ''">
+ <xsl:choose>
+ <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:apply-templates select="." mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="/foo"/>
+ <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="nav.context" select="'toc'"/>
+ <xsl:with-param name="content">
+ <h1>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </h1>
+ <xsl:copy-of select="$lots"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$lots"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="make.lot.chunk">
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="lot"/>
+
+ <xsl:if test="string($lot) != ''">
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:value-of select="$type"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:value-of select="$type"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="/foo"/>
+ <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="nav.context" select="'toc'"/>
+ <xsl:with-param name="content">
+ <xsl:copy-of select="$lot"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+ <!-- And output a link to this file -->
+ <div>
+ <xsl:attribute name="class">
+ <xsl:text>ListofTitles</xsl:text>
+ </xsl:attribute>
+ <a href="{$href}">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key">
+ <xsl:choose>
+ <xsl:when test="$type='table'">ListofTables</xsl:when>
+ <xsl:when test="$type='figure'">ListofFigures</xsl:when>
+ <xsl:when test="$type='equation'">ListofEquations</xsl:when>
+ <xsl:when test="$type='example'">ListofExamples</xsl:when>
+ <xsl:when test="$type='procedure'">ListofProcedures</xsl:when>
+ <xsl:otherwise>ListofUnknown</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="in.other.chunk">
+ <xsl:param name="chunk" select="."/>
+ <xsl:param name="node" select="."/>
+
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+<!--
+ <xsl:message>
+ <xsl:text>in.other.chunk: </xsl:text>
+ <xsl:value-of select="name($chunk)"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name($node)"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$chunk = $node"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$is.chunk"/>
+ </xsl:message>
+-->
+
+ <xsl:choose>
+ <xsl:when test="$chunk = $node">0</xsl:when>
+ <xsl:when test="$is.chunk = 1">1</xsl:when>
+ <xsl:when test="count($node) = 0">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$chunk"/>
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="count.footnotes.in.this.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnotes" select="$node//footnote"/>
+ <xsl:param name="count" select="0"/>
+
+<!--
+ <xsl:message>
+ <xsl:text>count.footnotes.in.this.chunk: </xsl:text>
+ <xsl:value-of select="name($node)"/>
+ </xsl:message>
+-->
+
+ <xsl:variable name="in.other.chunk">
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$node"/>
+ <xsl:with-param name="node" select="$footnotes[1]"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="count($footnotes) = 0">
+ <xsl:value-of select="$count"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$in.other.chunk != 0">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$footnotes[1]/ancestor::table
+ |$footnotes[1]/ancestor::informaltable">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes.in.this.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnotes" select="$node//footnote"/>
+
+<!--
+ <xsl:message>process.footnotes.in.this.chunk</xsl:message>
+-->
+
+ <xsl:variable name="in.other.chunk">
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$node"/>
+ <xsl:with-param name="node" select="$footnotes[1]"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="count($footnotes) = 0">
+ <!-- nop -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$in.other.chunk != 0">
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$footnotes[1]/ancestor::table
+ |$footnotes[1]/ancestor::informaltable">
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$footnotes[1]"
+ mode="process.footnote.mode"/>
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes"
+ select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes">
+ <xsl:variable name="footnotes" select=".//footnote"/>
+ <xsl:variable name="fcount">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="footnotes" select="$footnotes"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+<!--
+ <xsl:message>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text> fcount: </xsl:text>
+ <xsl:value-of select="$fcount"/>
+ </xsl:message>
+-->
+
+ <!-- Only bother to do this if there's at least one non-table footnote -->
+ <xsl:if test="$fcount &gt; 0">
+ <div class="footnotes">
+ <br/>
+ <hr width="100" align="left"/>
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="footnotes" select="$footnotes"/>
+ </xsl:call-template>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+ <xsl:if test="$is.chunk = 1">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<!-- Resolve xml:base attributes -->
+<xsl:template match="@fileref">
+ <!-- need a check for absolute urls -->
+ <xsl:choose>
+ <xsl:when test="contains(., ':')">
+ <!-- it has a uri scheme so it is an absolute uri -->
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- its a relative uri -->
+ <xsl:call-template name="relative-uri">
+ <xsl:with-param name="destdir">
+ <xsl:call-template name="dbhtml-dir">
+ <xsl:with-param name="context" select=".."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunk-common.xsl b/kdoctools/docbook/xsl/html/chunk-common.xsl
new file mode 100644
index 000000000..8447c91ee
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunk-common.xsl
@@ -0,0 +1,1012 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+ <xsl:param name="node" select="."/>
+ <!-- returns 1 if $node is a chunk -->
+
+ <!-- ==================================================================== -->
+ <!-- What's a chunk?
+
+ The root element
+ appendix
+ article
+ bibliography in article or part or book
+ book
+ chapter
+ colophon
+ glossary in article or part or book
+ index in article or part or book
+ part
+ preface
+ refentry
+ reference
+ sect{1,2,3,4,5} if position()>1 && depth < chunk.section.depth
+ section if position()>1 && depth < chunk.section.depth
+ set
+ setindex
+ -->
+ <!-- ==================================================================== -->
+
+<!--
+ <xsl:message>
+ <xsl:text>chunk: </xsl:text>
+ <xsl:value-of select="name($node)"/>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$node/@id"/>
+ <xsl:text>)</xsl:text>
+ <xsl:text> csd: </xsl:text>
+ <xsl:value-of select="$chunk.section.depth"/>
+ <xsl:text> cfs: </xsl:text>
+ <xsl:value-of select="$chunk.first.sections"/>
+ <xsl:text> ps: </xsl:text>
+ <xsl:value-of select="count($node/parent::section)"/>
+ <xsl:text> prs: </xsl:text>
+ <xsl:value-of select="count($node/preceding-sibling::section)"/>
+ </xsl:message>
+-->
+
+ <xsl:choose>
+ <xsl:when test="not($node/parent::*)">1</xsl:when>
+
+ <xsl:when test="local-name($node) = 'sect1'
+ and $chunk.section.depth &gt;= 1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect1) &gt; 0)">
+ <xsl:text>1</xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect2'
+ and $chunk.section.depth &gt;= 2
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect2) &gt; 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect3'
+ and $chunk.section.depth &gt;= 3
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect3) &gt; 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect4'
+ and $chunk.section.depth &gt;= 4
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect4) &gt; 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'sect5'
+ and $chunk.section.depth &gt;= 5
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::sect5) &gt; 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($node) = 'section'
+ and $chunk.section.depth &gt;= count($node/ancestor::section)+1
+ and ($chunk.first.sections != 0
+ or count($node/preceding-sibling::section) &gt; 0)">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="name($node)='preface'">1</xsl:when>
+ <xsl:when test="name($node)='chapter'">1</xsl:when>
+ <xsl:when test="name($node)='appendix'">1</xsl:when>
+ <xsl:when test="name($node)='article'">1</xsl:when>
+ <xsl:when test="name($node)='part'">1</xsl:when>
+ <xsl:when test="name($node)='reference'">1</xsl:when>
+ <xsl:when test="name($node)='refentry'">1</xsl:when>
+ <xsl:when test="name($node)='index' and $generate.index != 0
+ and (name($node/parent::*) = 'article'
+ or name($node/parent::*) = 'book'
+ or name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="name($node)='bibliography'
+ and (name($node/parent::*) = 'article'
+ or name($node/parent::*) = 'book'
+ or name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="name($node)='glossary'
+ and (name($node/parent::*) = 'article'
+ or name($node/parent::*) = 'book'
+ or name($node/parent::*) = 'part'
+ )">1</xsl:when>
+ <xsl:when test="name($node)='colophon'">1</xsl:when>
+ <xsl:when test="name($node)='book'">1</xsl:when>
+ <xsl:when test="name($node)='set'">1</xsl:when>
+ <xsl:when test="name($node)='setindex'">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="chunk-filename">
+ <!-- returns the filename of a chunk -->
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:variable name="fn">
+ <xsl:apply-templates select="." mode="recursive-chunk-filename"/>
+ </xsl:variable>
+
+ <!--
+ <xsl:message>
+ <xsl:value-of select="$ischunk"/>
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text>) </xsl:text>
+ <xsl:value-of select="$fn"/>
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="dbhtml-dir"/>
+ </xsl:message>
+ -->
+
+ <!-- 2003-11-25 by ndw:
+ The following test used to read test="$ischunk != 0 and $fn != ''"
+ I've removed the ischunk part of the test so that href.to.uri and
+ href.from.uri will be fully qualified even if the source or target
+ isn't a chunk. I *think* that if $fn != '' then it's appropriate
+ to put the directory on the front, even if the element isn't a
+ chunk. I could be wrong. -->
+
+ <xsl:if test="$fn != ''">
+ <xsl:call-template name="dbhtml-dir"/>
+ </xsl:if>
+
+ <xsl:value-of select="$fn"/>
+ <!-- You can't add the html.ext here because dbhtml filename= may already -->
+ <!-- have added it. It really does have to be handled in the recursive template -->
+</xsl:template>
+
+<xsl:template match="*" mode="recursive-chunk-filename">
+ <xsl:param name="recursive" select="false()"/>
+
+ <!-- returns the filename of a chunk -->
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:variable name="dbhtml-filename">
+ <xsl:call-template name="dbhtml-filename"/>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="$dbhtml-filename != ''">
+ <xsl:value-of select="$dbhtml-filename"/>
+ </xsl:when>
+ <!-- if this is the root element, use the root.filename -->
+ <xsl:when test="not(parent::*) and $root.filename != ''">
+ <xsl:value-of select="$root.filename"/>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:when>
+ <!-- if there's no dbhtml filename, and if we're to use IDs as -->
+ <!-- filenames, then use the ID to generate the filename. -->
+ <xsl:when test="@id and $use.id.as.filename != 0">
+ <xsl:value-of select="@id"/>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$ischunk='0'">
+ <!-- if called on something that isn't a chunk, walk up... -->
+ <xsl:choose>
+ <xsl:when test="count(parent::*)>0">
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="$recursive"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <!-- unless there is no up, in which case return "" -->
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="not($recursive) and $filename != ''">
+ <!-- if this chunk has an explicit name, use it -->
+ <xsl:value-of select="$filename"/>
+ </xsl:when>
+
+ <xsl:when test="self::set">
+ <xsl:value-of select="$root.filename"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::book">
+ <xsl:text>bk</xsl:text>
+ <xsl:number level="any" format="01"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::article">
+ <xsl:if test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <xsl:text>ar</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::preface">
+ <xsl:if test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <xsl:text>pr</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::chapter">
+ <xsl:if test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <xsl:text>ch</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::appendix">
+ <xsl:if test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:if>
+
+ <xsl:text>ap</xsl:text>
+ <xsl:number level="any" format="a" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::part">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>pt</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::reference">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>rn</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::refentry">
+ <xsl:choose>
+ <xsl:when test="parent::reference">
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>re</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::colophon">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>co</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::sect1
+ or self::sect2
+ or self::sect3
+ or self::sect4
+ or self::sect5
+ or self::section">
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>s</xsl:text>
+ <xsl:number format="01"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::bibliography">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>bi</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::glossary">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>go</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::index">
+ <xsl:choose>
+ <xsl:when test="/set">
+ <!-- in a set, make sure we inherit the right book info... -->
+ <xsl:apply-templates mode="recursive-chunk-filename" select="parent::*">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:text>ix</xsl:text>
+ <xsl:number level="any" format="01" from="book"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="self::setindex">
+ <xsl:text>si</xsl:text>
+ <xsl:number level="any" format="01" from="set"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:text>chunk-filename-error-</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:number level="any" format="01" from="set"/>
+ <xsl:if test="not($recursive)">
+ <xsl:value-of select="$html.ext"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="href.target.uri">
+ <xsl:param name="object" select="."/>
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$object"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates mode="chunk-filename" select="$object"/>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="href.target">
+ <xsl:param name="context" select="."/>
+ <xsl:param name="object" select="."/>
+
+ <xsl:variable name="href.to.uri">
+ <xsl:call-template name="href.target.uri">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href.from.uri">
+ <xsl:call-template name="href.target.uri">
+ <xsl:with-param name="object" select="$context"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!--
+ <xsl:message>href.to.uri: <xsl:value-of select="$href.to.uri"/></xsl:message>
+ <xsl:message>href.from.uri: <xsl:value-of select="$href.from.uri"/></xsl:message>
+ -->
+
+ <xsl:variable name="href.to">
+ <xsl:call-template name="trim.common.uri.paths">
+ <xsl:with-param name="uriA" select="$href.to.uri"/>
+ <xsl:with-param name="uriB" select="$href.from.uri"/>
+ <xsl:with-param name="return" select="'A'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href.from">
+ <xsl:call-template name="trim.common.uri.paths">
+ <xsl:with-param name="uriA" select="$href.to.uri"/>
+ <xsl:with-param name="uriB" select="$href.from.uri"/>
+ <xsl:with-param name="return" select="'B'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:call-template name="count.uri.path.depth">
+ <xsl:with-param name="filename" select="$href.from"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href">
+ <xsl:call-template name="copy-string">
+ <xsl:with-param name="string" select="'../'"/>
+ <xsl:with-param name="count" select="$depth"/>
+ </xsl:call-template>
+ <xsl:value-of select="$href.to"/>
+ </xsl:variable>
+
+ <!--
+ <xsl:message>
+ <xsl:text>In </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text> (</xsl:text>
+ <xsl:value-of select="$href.from"/>
+ <xsl:text>,</xsl:text>
+ <xsl:value-of select="$depth"/>
+ <xsl:text>) </xsl:text>
+ <xsl:value-of select="name($object)"/>
+ <xsl:text> href=</xsl:text>
+ <xsl:value-of select="$href"/>
+ </xsl:message>
+ -->
+
+ <xsl:value-of select="$href"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="html.head">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:variable name="this" select="."/>
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+
+ <xsl:if test="$home">
+ <link rel="start">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$home"
+ mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$up">
+ <link rel="up">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$up" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$prev">
+ <link rel="prev">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$next">
+ <link rel="next">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:if>
+
+ <xsl:if test="$html.extra.head.links != 0">
+ <xsl:for-each select="//part
+ |//reference
+ |//preface
+ |//chapter
+ |//article
+ |//refentry
+ |//appendix[not(parent::article)]|appendix
+ |//glossary[not(parent::article)]|glossary
+ |//index[not(parent::article)]|index">
+ <link rel="{local-name(.)}">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="section|sect1|refsection|refsect1">
+ <link>
+ <xsl:attribute name="rel">
+ <xsl:choose>
+ <xsl:when test="local-name($this) = 'section'
+ or local-name($this) = 'refsection'">
+ <xsl:value-of select="'subsection'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'section'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+
+ <xsl:for-each select="sect2|sect3|sect4|sect5|refsect2|refsect3">
+ <link rel="subsection">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="context" select="$this"/>
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="." mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </link>
+ </xsl:for-each>
+ </xsl:if>
+
+ <xsl:call-template name="user.head.content"/>
+ </head>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="$navig.showtitles != 0"/>
+ <xsl:variable name="row2" select="count($prev) &gt; 0
+ or (count($up) &gt; 0
+ and generate-id($up) != generate-id($home)
+ and $navig.showtitles != 0)
+ or count($next) &gt; 0"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
+ <div class="navheader">
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation header">
+ <xsl:if test="$row1">
+ <tr>
+ <th colspan="3" align="center">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </th>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="20%" align="left">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <th width="60%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up) > 0
+ and generate-id($up) != generate-id($home)
+ and $navig.showtitles != 0">
+ <xsl:apply-templates select="$up" mode="object.title.markup"/>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ </th>
+ <td width="20%" align="right">
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ <xsl:if test="$header.rule != 0">
+ <hr/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="footer.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="count($prev) &gt; 0
+ or count($up) &gt; 0
+ or count($next) &gt; 0"/>
+
+ <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
+ or (generate-id($home) != generate-id(.)
+ or $nav.context = 'toc')
+ or ($chunk.tocs.and.lots != 0
+ and $nav.context != 'toc')
+ or ($next and $navig.showtitles != 0)"/>
+
+ <xsl:if test="$suppress.navigation = '0' and $suppress.footer.navigation = '0'">
+ <div class="navfooter">
+ <xsl:if test="$footer.rule != 0">
+ <hr/>
+ </xsl:if>
+
+ <xsl:if test="$row1 or $row2">
+ <table width="100%" summary="Navigation footer">
+ <xsl:if test="$row1">
+ <tr>
+ <td width="40%" align="left">
+ <xsl:if test="count($prev)>0">
+ <a accesskey="p">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="count($up)&gt;0
+ and generate-id($up) != generate-id($home)">
+ <a accesskey="u">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td width="40%" align="right">
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="count($next)>0">
+ <a accesskey="n">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+
+ <xsl:if test="$row2">
+ <tr>
+ <td width="40%" align="left" valign="top">
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td width="20%" align="center">
+ <xsl:choose>
+ <xsl:when test="$home != . or $nav.context = 'toc'">
+ <a accesskey="h">
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
+ </a>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text>&#160;|&#160;</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <a accesskey="t">
+ <xsl:attribute name="href">
+ <xsl:apply-templates select="/*[1]"
+ mode="recursive-chunk-filename"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'nav-toc'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td>
+ <td width="40%" align="right" valign="top">
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$next" mode="object.title.markup"/>
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="navig.content">
+ <xsl:param name="direction" select="next"/>
+ <xsl:variable name="navtext">
+ <xsl:choose>
+ <xsl:when test="$direction = 'prev'">
+ <xsl:call-template name="gentext.nav.prev"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'next'">
+ <xsl:call-template name="gentext.nav.next"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'up'">
+ <xsl:call-template name="gentext.nav.up"/>
+ </xsl:when>
+ <xsl:when test="$direction = 'home'">
+ <xsl:call-template name="gentext.nav.home"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>xxx</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$navig.graphics != 0">
+ <img>
+ <xsl:attribute name="src">
+ <xsl:value-of select="$navig.graphics.path"/>
+ <xsl:value-of select="$direction"/>
+ <xsl:value-of select="$navig.graphics.extension"/>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:value-of select="$navtext"/>
+ </xsl:attribute>
+ </img>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$navtext"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="processing-instruction('dbhtml')">
+ <!-- nop -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk-element-content">
+ <xsl:param name="prev"/>
+ <xsl:param name="next"/>
+ <xsl:param name="nav.context"/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:call-template name="user.preroot"/>
+
+ <html>
+ <xsl:call-template name="html.head">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <xsl:call-template name="user.header.navigation"/>
+
+ <xsl:call-template name="header.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.header.content"/>
+
+ <xsl:copy-of select="$content"/>
+
+ <xsl:call-template name="user.footer.content"/>
+
+ <xsl:call-template name="footer.navigation">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="user.footer.navigation"/>
+ </body>
+ </html>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunk.xsl b/kdoctools/docbook/xsl/html/chunk.xsl
new file mode 100644
index 000000000..fb592332f
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunk.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+<xsl:include href="manifest.xsl"/>
+
+<!-- Why is chunk-code now xsl:included?
+
+Suppose you want to customize *both* the chunking algorithm used *and* the
+presentation of some elements that may be chunks. In order to do that, you
+must get the order of imports "just right". The answer is to make your own
+copy of this file, where you replace the initial import of "docbook.xsl"
+with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+Put the templates for changing the presentation of elements in your base.xsl.
+
+Put the templates that control chunking after the include of chunk-code.xsl.
+
+Voila! (Man I hope we can do this better in XSLT 2.0)
+
+-->
+
+<xsl:include href="chunk-code.xsl"/>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunker.xsl b/kdoctools/docbook/xsl/html/chunker.xsl
new file mode 100644
index 000000000..a4efc1855
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunker.xsl
@@ -0,0 +1,423 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:saxon="http://icl.com/saxon"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.1"
+ exclude-result-prefixes="doc"
+ extension-element-prefixes="saxon xalanredirect lxslt exsl">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This stylesheet works with XSLT implementations that support -->
+<!-- exsl:document, saxon:output, or xalanredirect:write -->
+<!-- Note: Only Saxon 6.4.2 or later is supported. -->
+
+<xsl:param name="chunker.output.method" select="'html'"/>
+<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
+<xsl:param name="chunker.output.indent" select="'no'"/>
+<xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/>
+<xsl:param name="chunker.output.standalone" select="'no'"/>
+<xsl:param name="chunker.output.doctype-public" select="''"/>
+<xsl:param name="chunker.output.doctype-system" select="''"/>
+<xsl:param name="chunker.output.media-type" select="''"/>
+<xsl:param name="chunker.output.cdata-section-elements" select="''"/>
+
+<xsl:param name="saxon.character.representation" select="'entity;decimal'"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make-relative-filename">
+ <xsl:param name="base.dir" select="'./'"/>
+ <xsl:param name="base.name" select="''"/>
+
+ <xsl:choose>
+ <!-- put Saxon first to work around a bug in libxslt -->
+ <xsl:when test="element-available('saxon:output')">
+ <!-- Saxon doesn't make the chunks relative -->
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
+ </xsl:when>
+ <xsl:when test="element-available('exsl:document')">
+ <!-- EXSL document does make the chunks relative, I think -->
+ <xsl:choose>
+ <xsl:when test="count(parent::*) = 0">
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$base.name"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="element-available('xalanredirect:write')">
+ <!-- Xalan doesn't make the chunks relative -->
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>Don't know how to chunk with </xsl:text>
+ <xsl:value-of select="system-property('xsl:vendor')"/>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk">
+ <xsl:param name="filename" select="''"/>
+ <xsl:param name="quiet" select="0"/>
+
+ <xsl:param name="method" select="$chunker.output.method"/>
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
+ <xsl:param name="indent" select="$chunker.output.indent"/>
+ <xsl:param name="omit-xml-declaration"
+ select="$chunker.output.omit-xml-declaration"/>
+ <xsl:param name="standalone" select="$chunker.output.standalone"/>
+ <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
+ <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
+ <xsl:param name="cdata-section-elements"
+ select="$chunker.output.cdata-section-elements"/>
+
+ <xsl:param name="content"/>
+
+ <xsl:if test="$quiet = 0">
+ <xsl:message>
+ <xsl:text>Writing </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:if test="name(.) != ''">
+ <xsl:text> for </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@id">
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="element-available('exsl:document')">
+ <xsl:choose>
+ <!-- Handle the permutations ... -->
+ <xsl:when test="$media-type != ''">
+ <xsl:choose>
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-public="{$doctype-public}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-public="{$doctype-public}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:when>
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+ <exsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </exsl:document>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="element-available('saxon:output')">
+ <xsl:choose>
+ <!-- Handle the permutations ... -->
+ <xsl:when test="$media-type != ''">
+ <xsl:choose>
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-public="{$doctype-public}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ media-type="{$media-type}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$doctype-public != '' and $doctype-system != ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="$doctype-public != '' and $doctype-system = ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-public="{$doctype-public}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="$doctype-public = '' and $doctype-system != ''">
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ doctype-system="{$doctype-system}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:otherwise><!-- $doctype-public = '' and $doctype-system = ''"> -->
+ <saxon:output saxon:character-representation="{$saxon.character.representation}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ omit-xml-declaration="{$omit-xml-declaration}"
+ cdata-section-elements="{$cdata-section-elements}"
+ standalone="{$standalone}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="element-available('xalanredirect:write')">
+ <!-- Xalan uses xalanredirect -->
+ <xalanredirect:write file="{$filename}">
+ <xsl:copy-of select="$content"/>
+ </xalanredirect:write>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <!-- it doesn't matter since we won't be making chunks... -->
+ <xsl:message terminate="yes">
+ <xsl:text>Can't make chunks with </xsl:text>
+ <xsl:value-of select="system-property('xsl:vendor')"/>
+ <xsl:text>'s processor.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk.with.doctype">
+ <xsl:param name="filename" select="''"/>
+ <xsl:param name="quiet" select="0"/>
+
+ <xsl:param name="method" select="$chunker.output.method"/>
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
+ <xsl:param name="indent" select="$chunker.output.indent"/>
+ <xsl:param name="omit-xml-declaration"
+ select="$chunker.output.omit-xml-declaration"/>
+ <xsl:param name="standalone" select="$chunker.output.standalone"/>
+ <xsl:param name="doctype-public" select="$chunker.output.doctype-public"/>
+ <xsl:param name="doctype-system" select="$chunker.output.doctype-system"/>
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
+ <xsl:param name="cdata-section-elements"
+ select="$chunker.output.cdata-section-elements"/>
+
+ <xsl:param name="content"/>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$quiet"/>
+ <xsl:with-param name="method" select="$method"/>
+ <xsl:with-param name="encoding" select="$encoding"/>
+ <xsl:with-param name="indent" select="$indent"/>
+ <xsl:with-param name="omit-xml-declaration" select="$omit-xml-declaration"/>
+ <xsl:with-param name="standalone" select="$standalone"/>
+ <xsl:with-param name="doctype-public" select="$doctype-public"/>
+ <xsl:with-param name="doctype-system" select="$doctype-system"/>
+ <xsl:with-param name="media-type" select="$media-type"/>
+ <xsl:with-param name="cdata-section-elements" select="$cdata-section-elements"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="write.text.chunk">
+ <xsl:param name="filename" select="''"/>
+ <xsl:param name="quiet" select="0"/>
+ <xsl:param name="method" select="'text'"/>
+ <xsl:param name="encoding" select="$chunker.output.encoding"/>
+ <xsl:param name="media-type" select="$chunker.output.media-type"/>
+ <xsl:param name="content"/>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$quiet"/>
+ <xsl:with-param name="method" select="$method"/>
+ <xsl:with-param name="encoding" select="$encoding"/>
+ <xsl:with-param name="indent" select="'no'"/>
+ <xsl:with-param name="omit-xml-declaration" select="'no'"/>
+ <xsl:with-param name="standalone" select="'no'"/>
+ <xsl:with-param name="doctype-public"/>
+ <xsl:with-param name="doctype-system"/>
+ <xsl:with-param name="media-type" select="$media-type"/>
+ <xsl:with-param name="cdata-section-elements"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunkfast.xsl b/kdoctools/docbook/xsl/html/chunkfast.xsl
new file mode 100644
index 000000000..bd49ac843
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunkfast.xsl
@@ -0,0 +1,71 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="chunk.xsl"/>
+<xsl:param name="chunk.fast" select="1"/>
+
+<xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+ <xsl:choose>
+ <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+ <xsl:variable name="genid" select="generate-id()"/>
+
+ <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+ <xsl:variable name="prevdiv"
+ select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+ <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+ <xsl:variable name="nextdiv"
+ select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+ <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and not(parent::*)">
+ <xsl:call-template name="chunk-all-sections"/>
+ </xsl:when>
+ <xsl:when test="$onechunk != 0">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:when test="$chunk.first.sections = 0">
+ <xsl:call-template name="chunk-first-section-with-parent"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="chunk-all-sections"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/chunktoc.xsl b/kdoctools/docbook/xsl/html/chunktoc.xsl
new file mode 100644
index 000000000..d75cd03bc
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/chunktoc.xsl
@@ -0,0 +1,243 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+
+<xsl:template name="chunk">
+ <xsl:param name="node" select="."/>
+ <!-- returns 1 if $node is a chunk -->
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="chunks" select="document($chunk.toc,$node)"/>
+
+ <xsl:choose>
+ <xsl:when test="$chunks//tocentry[@linkend=$id]">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="chunk-filename">
+ <!-- returns the filename of a chunk -->
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunks" select="document($chunk.toc,.)"/>
+
+ <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+ <xsl:variable name="filename">
+ <xsl:call-template name="dbhtml-filename">
+ <xsl:with-param name="pis" select="$chunk/processing-instruction('dbhtml')"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$chunk">
+ <xsl:value-of select="$filename"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="parent::*" mode="chunk-filename"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk">
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunks" select="document($chunk.toc,.)"/>
+
+ <xsl:variable name="chunk" select="$chunks//tocentry[@linkend=$id]"/>
+ <xsl:variable name="prev-id"
+ select="($chunk/preceding::tocentry
+ |$chunk/ancestor::tocentry)[last()]/@linkend"/>
+ <xsl:variable name="next-id"
+ select="($chunk/following::tocentry
+ |$chunk/child::tocentry)[1]/@linkend"/>
+
+ <xsl:variable name="prev" select="key('id',$prev-id)"/>
+ <xsl:variable name="next" select="key('id',$next-id)"/>
+
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunkfn">
+ <xsl:if test="$ischunk='1'">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name" select="$chunkfn"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$ischunk = 0">
+ <xsl:apply-imports/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/appendix">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/glossary">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="book/bibliography">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="dedication" mode="dedication">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="preface|chapter">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="part|reference">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="refentry">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="colophon">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/appendix">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/glossary">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="article/bibliography">
+ <xsl:call-template name="process-chunk"/>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$ischunk != 0">
+ <xsl:call-template name="process-chunk"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-imports/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex
+ |book/index
+ |article/index">
+ <!-- some implementations use completely empty index tags to indicate -->
+ <!-- where an automatically generated index should be inserted. so -->
+ <!-- if the index is completely empty, skip it. -->
+ <xsl:if test="count(*)>0 or $generate.index != '0'">
+ <xsl:call-template name="process-chunk"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="$chunk.toc = ''">
+ <xsl:message terminate="yes">
+ <xsl:text>The chunk.toc file is not set.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+
+ <xsl:when test="$rootid != ''">
+ <xsl:choose>
+ <xsl:when test="count(key('id',$rootid)) = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>ID '</xsl:text>
+ <xsl:value-of select="$rootid"/>
+ <xsl:text>' not found in document.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="key('id',$rootid)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates select="/" mode="process.root"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/component.xsl b/kdoctools/docbook/xsl/html/component.xsl
new file mode 100644
index 000000000..1941ab3ef
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/component.xsl
@@ -0,0 +1,423 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="component.title">
+ <xsl:param name="node" select="."/>
+
+ <xsl:variable name="level">
+ <xsl:choose>
+ <xsl:when test="ancestor::section">
+ <xsl:value-of select="count(ancestor::section)+1"/>
+ </xsl:when>
+ <xsl:when test="ancestor::sect5">6</xsl:when>
+ <xsl:when test="ancestor::sect4">5</xsl:when>
+ <xsl:when test="ancestor::sect3">4</xsl:when>
+ <xsl:when test="ancestor::sect2">3</xsl:when>
+ <xsl:when test="ancestor::sect1">2</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Let's handle the case where a component (bibliography, for example)
+ occurs inside a section; will we need parameters for this? -->
+
+ <xsl:element name="h{$level+1}">
+ <xsl:attribute name="class">title</xsl:attribute>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="$node" mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template name="component.subtitle">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="subtitle"
+ select="($node/docinfo/subtitle
+ |$node/info/subtitle
+ |$node/prefaceinfo/subtitle
+ |$node/chapterinfo/subtitle
+ |$node/appendixinfo/subtitle
+ |$node/articleinfo/subtitle
+ |$node/artheader/subtitle
+ |$node/subtitle)[1]"/>
+
+ <xsl:if test="$subtitle">
+ <h3 class="subtitle">
+ <i>
+ <xsl:apply-templates select="$node" mode="object.subtitle.markup"/>
+ </i>
+ </h3>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="component.separator">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="dedication" mode="dedication">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:call-template name="dedication.titlepage"/>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="dedication/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="dedication/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.subtitle">
+ <xsl:with-param name="node" select="ancestor::dedication[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
+<xsl:template match="dedication/title"></xsl:template>
+<xsl:template match="dedication/subtitle"></xsl:template>
+<xsl:template match="dedication/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="colophon">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="component.title"/>
+ <xsl:call-template name="component.subtitle"/>
+
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="colophon/title"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="preface">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="preface.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="preface/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::preface[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface/subtitle
+ |preface/prefaceinfo/subtitle
+ |preface/info/subtitle
+ |preface/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.subtitle">
+ <xsl:with-param name="node" select="ancestor::preface[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="preface/docinfo|prefaceinfo"></xsl:template>
+<xsl:template match="preface/title"></xsl:template>
+<xsl:template match="preface/titleabbrev"></xsl:template>
+<xsl:template match="preface/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="chapter">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="chapter.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="chapter/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="chapter/subtitle
+ |chapter/chapterinfo/subtitle
+ |chapter/info/subtitle
+ |chapter/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.subtitle">
+ <xsl:with-param name="node" select="ancestor::chapter[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="chapter/docinfo|chapterinfo"></xsl:template>
+<xsl:template match="chapter/title"></xsl:template>
+<xsl:template match="chapter/titleabbrev"></xsl:template>
+<xsl:template match="chapter/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="appendix">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="parent::article and $ischunk = 0">
+ <xsl:call-template name="section.heading">
+ <xsl:with-param name="level" select="1"/>
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="component.separator"/>
+ <xsl:call-template name="appendix.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="component.toc.separator"/>
+ </xsl:if>
+
+ <xsl:apply-templates/>
+
+ <xsl:if test="not(parent::article) or $ischunk != 0">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="appendix/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="appendix/subtitle
+ |appendix/appendixinfo/subtitle
+ |appendix/info/subtitle
+ |appendix/docinfo/subtitle"
+ mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.subtitle">
+ <xsl:with-param name="node" select="ancestor::appendix[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="appendix/docinfo|appendixinfo"></xsl:template>
+<xsl:template match="appendix/title"></xsl:template>
+<xsl:template match="appendix/titleabbrev"></xsl:template>
+<xsl:template match="appendix/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="dedication" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="preface" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="chapter" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ <xsl:text>.</xsl:text>
+ <xsl:if test="$add.space">
+ <xsl:call-template name="gentext.space"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$chapter.autolabel">
+ <xsl:number from="book" count="chapter" format="1."/>
+ <xsl:if test="$add.space">
+ <xsl:call-template name="gentext.space"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ <xsl:text>.</xsl:text>
+ <xsl:if test="$add.space">
+ <xsl:call-template name="gentext.space"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$chapter.autolabel">
+ <xsl:number from="book" count="appendix" format="A."/>
+ <xsl:if test="$add.space">
+ <xsl:call-template name="gentext.space"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="article" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="glossary" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<xsl:template match="index" mode="component.number">
+ <xsl:param name="add.space" select="false()"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="article">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="article.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="make.lots">
+ <xsl:with-param name="toc.params" select="$toc.params"/>
+ <xsl:with-param name="toc">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="article/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.title">
+ <xsl:with-param name="node" select="ancestor::article[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="article/subtitle
+ |article/articleinfo/subtitle
+ |article/info/subtitle
+ |article/artheader/subtitle"
+ mode="titlepage.mode" priority="2">
+ <xsl:call-template name="component.subtitle">
+ <xsl:with-param name="node" select="ancestor::article[1]"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="article/artheader|article/articleinfo"></xsl:template>
+<xsl:template match="article/title"></xsl:template>
+<xsl:template match="article/titleabbrev"></xsl:template>
+<xsl:template match="article/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/division.xsl b/kdoctools/docbook/xsl/html/division.xsl
new file mode 100644
index 000000000..a61363ff1
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/division.xsl
@@ -0,0 +1,175 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="set">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="set.titlepage"/>
+
+ <xsl:call-template name="make.lots">
+ <xsl:with-param name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="toc">
+ <xsl:call-template name="set.toc"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="set/setinfo"></xsl:template>
+<xsl:template match="set/title"></xsl:template>
+<xsl:template match="set/titleabbrev"></xsl:template>
+<xsl:template match="set/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="book.titlepage"/>
+
+ <xsl:apply-templates select="dedication" mode="dedication"/>
+
+ <xsl:call-template name="make.lots">
+ <xsl:with-param name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="toc">
+ <xsl:call-template name="division.toc"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="book/bookinfo"></xsl:template>
+<xsl:template match="book/title"></xsl:template>
+<xsl:template match="book/titleabbrev"></xsl:template>
+<xsl:template match="book/subtitle"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="part">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="part.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+ <xsl:call-template name="division.toc"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="part" mode="make.part.toc">
+ <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="reference" mode="make.part.toc">
+ <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="part/docinfo"></xsl:template>
+<xsl:template match="part/partinfo"></xsl:template>
+<xsl:template match="part/title"></xsl:template>
+<xsl:template match="part/titleabbrev"></xsl:template>
+<xsl:template match="part/subtitle"></xsl:template>
+
+<xsl:template match="partintro">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="partintro.titlepage"/>
+ <xsl:apply-templates/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="node" select="parent::*"/>
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="contains($toc.params, 'toc')">
+ <!-- not ancestor::part because partintro appears in reference -->
+ <xsl:apply-templates select="parent::*" mode="make.part.toc"/>
+ </xsl:if>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="partintro/title"></xsl:template>
+<xsl:template match="partintro/titleabbrev"></xsl:template>
+<xsl:template match="partintro/subtitle"></xsl:template>
+
+<xsl:template match="partintro/title" mode="partintro.title.mode">
+ <h2>
+ <xsl:apply-templates/>
+ </h2>
+</xsl:template>
+
+<xsl:template match="partintro/subtitle" mode="partintro.title.mode">
+ <h3>
+ <i><xsl:apply-templates/></i>
+ </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="book" mode="division.number">
+ <xsl:number from="set" count="book" format="1."/>
+</xsl:template>
+
+<xsl:template match="part" mode="division.number">
+ <xsl:number from="book" count="part" format="I."/>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/docbook.xsl b/kdoctools/docbook/xsl/html/docbook.xsl
new file mode 100644
index 000000000..29a14dbf5
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/docbook.xsl
@@ -0,0 +1,419 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="exsl"
+ version='1.0'>
+
+<xsl:output method="html"
+ encoding="ISO-8859-1"
+ indent="no"/>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/targets.xsl"/>
+<xsl:include href="../common/olink.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="chunker.xsl"/>
+<xsl:include href="html-rtf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'html'"/>
+<xsl:param name="htmlhelp.output" select="0"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+ <xsl:message>
+ <xsl:text>No template matches </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="parent::*">
+ <xsl:text> in </xsl:text>
+ <xsl:value-of select="name(parent::*)"/>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ </xsl:message>
+
+ <font color="red">
+ <xsl:text>&lt;</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>&gt;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&lt;/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>&gt;</xsl:text>
+ </font>
+</xsl:template>
+
+<xsl:template match="text()">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template name="body.attributes">
+ <xsl:attribute name="bgcolor">white</xsl:attribute>
+ <xsl:attribute name="text">black</xsl:attribute>
+ <xsl:attribute name="link">#0000FF</xsl:attribute>
+ <xsl:attribute name="vlink">#840084</xsl:attribute>
+ <xsl:attribute name="alink">#0000FF</xsl:attribute>
+</xsl:template>
+
+<xsl:template name="head.content">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+ </xsl:param>
+
+ <title>
+ <xsl:copy-of select="$title"/>
+ </title>
+
+ <xsl:if test="$html.stylesheet != ''">
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="$link.mailto.url != ''">
+ <link rev="made"
+ href="{$link.mailto.url}"/>
+ </xsl:if>
+
+ <xsl:if test="$html.base != ''">
+ <base href="{$html.base}"/>
+ </xsl:if>
+
+ <meta name="generator" content="DocBook XSL Stylesheets V{$VERSION}"/>
+
+ <xsl:if test="$generate.meta.abstract != 0">
+ <xsl:variable name="info" select="(articleinfo
+ |bookinfo
+ |prefaceinfo
+ |chapterinfo
+ |appendixinfo
+ |sectioninfo
+ |sect1info
+ |sect2info
+ |sect3info
+ |sect4info
+ |sect5info
+ |referenceinfo
+ |refentryinfo
+ |partinfo
+ |info
+ |docinfo)[1]"/>
+ <xsl:if test="$info and $info/abstract">
+ <meta name="description">
+ <xsl:attribute name="content">
+ <xsl:for-each select="$info/abstract[1]/*">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() &lt; last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </meta>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="($draft.mode = 'yes' or
+ ($draft.mode = 'maybe' and
+ ancestor-or-self::*[@status][1]/@status = 'draft'))
+ and $draft.watermark.image != ''">
+ <style type="text/css"><xsl:text>
+body { background-image: url('</xsl:text>
+<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
+ background-repeat: no-repeat;
+ background-position: top left;
+ /* The following properties make the watermark "fixed" on the page. */
+ /* I think that's just a bit too distracting for the reader... */
+ /* background-attachment: fixed; */
+ /* background-position: center center; */
+ }</xsl:text>
+ </style>
+ </xsl:if>
+ <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template name="output.html.stylesheets">
+ <xsl:param name="stylesheets" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($stylesheets, ' ')">
+ <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$stylesheets != ''">
+ <link rel="stylesheet" href="{$stylesheets}">
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="head.keywords.content">
+ <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+
+ <xsl:if test="$inherit.keywords != 0
+ and parent::*">
+ <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="system.head.content">
+ <xsl:param name="node" select="."/>
+
+ <!-- system.head.content is like user.head.content, except that
+ it is called before head.content. This is important because it
+ means, for example, that <style> elements output by system.head.content
+ have a lower CSS precedence than the users stylesheet. -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="user.preroot">
+ <!-- Pre-root output, can be used to output comments and PIs. -->
+ <!-- This must not output any element content! -->
+</xsl:template>
+
+<xsl:template name="user.head.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.navigation">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.navigation">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')
+ and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+ <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+ <!-- and continue. Someday we may reverse this logic and add the namespace -->
+ <!-- to documents that don't have one. But not before the whole stylesheet -->
+ <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+ <xsl:variable name="nons">
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:variable>
+ <xsl:apply-templates select="exsl:node-set($nons)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$rootid != ''">
+ <xsl:choose>
+ <xsl:when test="count(key('id',$rootid)) = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>ID '</xsl:text>
+ <xsl:value-of select="$rootid"/>
+ <xsl:text>' not found in document.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or
+ $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="key('id', $rootid)"
+ mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="key('id',$rootid)"
+ mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="key('id',$rootid)"
+ mode="collect.tex.math"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or
+ $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="/" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="/" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="/" mode="collect.tex.math"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+ <xsl:variable name="doc" select="self::*"/>
+
+ <xsl:call-template name="user.preroot"/>
+ <xsl:call-template name="root.messages"/>
+
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:call-template name="head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:call-template name="user.head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <xsl:call-template name="user.header.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="."/>
+ <xsl:call-template name="user.footer.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="root.messages">
+ <!-- redefine this any way you'd like to output messages -->
+ <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+ <xsl:param name="node" select="."/>
+
+ <!-- The default is that we are not chunking... -->
+ <xsl:text>0</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+ <xsl:choose>
+ <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+ <xsl:element name="{local-name(.)}">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+ <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/docbookng.xsl b/kdoctools/docbook/xsl/html/docbookng.xsl
new file mode 100644
index 000000000..4f8e7a6f5
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/docbookng.xsl
@@ -0,0 +1,7 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template match="info"/>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/ebnf.xsl b/kdoctools/docbook/xsl/html/ebnf.xsl
new file mode 100644
index 000000000..e0175cc61
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/ebnf.xsl
@@ -0,0 +1,327 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="doc"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<doc:reference xmlns="">
+<referenceinfo>
+<releaseinfo role="meta">
+$Id$
+</releaseinfo>
+<author><surname>Walsh</surname>
+<firstname>Norman</firstname></author>
+<copyright><year>1999</year><year>2000</year>
+<holder>Norman Walsh</holder>
+</copyright>
+</referenceinfo>
+<title>HTML EBNF Reference</title>
+
+<partintro>
+<section><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes the templates and parameters relevant
+to formatting EBNF markup.</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</section>
+</partintro>
+</doc:reference>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productionset">
+ <table width="100%" cellpadding="5">
+ <xsl:if test="$ebnf.table.bgcolor != ''">
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="$ebnf.table.bgcolor"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$ebnf.table.border != 0">
+ <xsl:attribute name="border">1</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:attribute name="summary">
+ <xsl:text>EBNF</xsl:text>
+ <xsl:if test="title">
+ <xsl:text> for </xsl:text>
+ <xsl:value-of select="title"/>
+ </xsl:if>
+ </xsl:attribute>
+
+ <xsl:if test="title">
+ <tr>
+ <th align="left" valign="top" class="{name(.)}">
+ <xsl:apply-templates select="title"/>
+ </th>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td>
+ <table border="0" width="99%" cellpadding="0">
+ <xsl:if test="$ebnf.table.bgcolor != ''">
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="$ebnf.table.bgcolor"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:attribute name="summary">EBNF productions</xsl:attribute>
+ <xsl:apply-templates select="production|productionrecap"/>
+ </table>
+ </td>
+ </tr>
+ </table>
+</xsl:template>
+
+<xsl:template match="productionset/title">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="production">
+ <xsl:param name="recap" select="false()"/>
+ <tr>
+ <td align="left" valign="top" width="3%">
+ <xsl:text>[</xsl:text>
+ <xsl:number count="production" level="any"/>
+ <xsl:text>]</xsl:text>
+ </td>
+ <td align="right" valign="top" width="10%">
+ <xsl:choose>
+ <xsl:when test="$recap">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="lhs"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="lhs"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td valign="top" width="5%" align="center">
+ <xsl:copy-of select="$ebnf.assignment"/>
+ </td>
+ <td valign="top" width="52%">
+ <xsl:apply-templates select="rhs"/>
+ <xsl:copy-of select="$ebnf.statement.terminator"/>
+ </td>
+ <td align="left" valign="top" width="30%">
+ <xsl:choose>
+ <xsl:when test="rhs/lineannotation|constraint">
+ <xsl:apply-templates select="rhs/lineannotation" mode="rhslo"/>
+ <xsl:apply-templates select="constraint"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#160;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="productionrecap">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:if test="count($targets)=0">
+ <xsl:message>
+ <xsl:text>Error: no ID for productionrecap linkend: </xsl:text>
+ <xsl:value-of select="@linkend"/>
+ <xsl:text>.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:if test="count($targets)>1">
+ <xsl:message>
+ <xsl:text>Warning: multiple "IDs" for productionrecap linkend: </xsl:text>
+ <xsl:value-of select="@linkend"/>
+ <xsl:text>.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:apply-templates select="$target">
+ <xsl:with-param name="recap" select="true()"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="lhs">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="rhs">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::rhs">
+ <xsl:text> |</xsl:text>
+ <br/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="nonterminal">
+ <xsl:variable name="linkend">
+ <xsl:call-template name="xpointer.idref">
+ <xsl:with-param name="xpointer" select="@def"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="$linkend"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="check.idref.targets">
+ <xsl:with-param name="linkend" select="$linkend"/>
+ <xsl:with-param name="element-list">production</xsl:with-param>
+ </xsl:call-template>
+
+ <!-- If you don't provide content, you can't point outside this doc. -->
+ <xsl:choose>
+ <xsl:when test="*|text()"><!--nop--></xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$linkend = ''">
+ <xsl:message>
+ <xsl:text>Non-terminals with no content must point to </xsl:text>
+ <xsl:text>production elements in the current document.</xsl:text>
+ </xsl:message>
+ <xsl:message>
+ <xsl:text>Invalid xpointer for empty nt: </xsl:text>
+ <xsl:value-of select="@def"/>
+ </xsl:message>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="href">
+ <xsl:choose>
+ <xsl:when test="$linkend != ''">
+ <xsl:variable name="targets" select="key('id',$linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@def"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <a href="{$href}">
+ <xsl:choose>
+ <xsl:when test="*|text()">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$linkend != ''">
+ <xsl:variable name="targets" select="key('id',$linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:apply-templates select="$target/lhs"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="rhs/lineannotation" mode="rhslo">
+ <xsl:text>/*&#160;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&#160;*/</xsl:text>
+ <br/>
+</xsl:template>
+
+<xsl:template match="constraint">
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="check.idref.targets">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ <xsl:with-param name="element-list">constraintdef</xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:variable name="href">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:text>[&#160;</xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="@role">
+ <xsl:value-of select="@role"/>
+ <xsl:text>: </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:if test="$target/@role">
+ <xsl:value-of select="$target/@role"/>
+ <xsl:text>: </xsl:text>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <a href="{$href}">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:apply-templates select="$target" mode="title.markup"/>
+ </a>
+ <xsl:text>&#160;]</xsl:text>
+ <xsl:if test="following-sibling::constraint">
+ <br/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="constraintdef">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="constraintdef/title">
+ <p><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/footnote.xsl b/kdoctools/docbook/xsl/html/footnote.xsl
new file mode 100644
index 000000000..45bede4b2
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/footnote.xsl
@@ -0,0 +1,266 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="exsl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match="footnote">
+ <xsl:variable name="name">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+ <xsl:variable name="href">
+ <xsl:text>#ftn.</xsl:text>
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="ancestor::tgroup">
+ <sup>
+ <xsl:text>[</xsl:text>
+ <a name="{$name}" href="{$href}">
+ <xsl:apply-templates select="." mode="footnote.number"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </sup>
+ </xsl:when>
+ <xsl:otherwise>
+ <sup>
+ <xsl:text>[</xsl:text>
+ <a name="{$name}" href="{$href}">
+ <xsl:apply-templates select="." mode="footnote.number"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </sup>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="footnoteref">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="footnote" select="$targets[1]"/>
+ <xsl:variable name="href">
+ <xsl:text>#ftn.</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <sup>
+ <xsl:text>[</xsl:text>
+ <a href="{$href}">
+ <xsl:apply-templates select="$footnote" mode="footnote.number"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </sup>
+</xsl:template>
+
+<xsl:template match="footnote" mode="footnote.number">
+ <xsl:choose>
+ <xsl:when test="string-length(@label) != 0">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:when test="ancestor::tgroup">
+ <xsl:variable name="tfnum">
+ <xsl:number level="any" from="table|informaltable" format="1"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="string-length($table.footnote.number.symbols) &gt;= $tfnum">
+ <xsl:value-of select="substring($table.footnote.number.symbols, $tfnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number level="any" from="tgroup"
+ format="{$table.footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="pfoot" select="preceding::footnote[not(@label)]"/>
+ <xsl:variable name="ptfoot" select="preceding::tgroup//footnote"/>
+ <xsl:variable name="fnum" select="count($pfoot) - count($ptfoot) + 1"/>
+
+ <xsl:choose>
+ <xsl:when test="string-length($footnote.number.symbols) &gt;= $fnum">
+ <xsl:value-of select="substring($footnote.number.symbols, $fnum, 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:number value="$fnum" format="{$footnote.number.format}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2">
+ <!-- this only works if the first thing in a footnote is a para, -->
+ <!-- which is ok, because it usually is. -->
+ <xsl:variable name="name">
+ <xsl:text>ftn.</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <p>
+ <sup>
+ <xsl:text>[</xsl:text>
+ <a name="{$name}" href="{$href}">
+ <xsl:apply-templates select="ancestor::footnote"
+ mode="footnote.number"/>
+ </a>
+ <xsl:text>] </xsl:text>
+ </sup>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="footnote.body.number">
+ <xsl:variable name="name">
+ <xsl:text>ftn.</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="ancestor::footnote"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="footnote.mark">
+ <sup>
+ <xsl:text>[</xsl:text>
+ <a name="{$name}" href="{$href}">
+ <xsl:apply-templates select="ancestor::footnote"
+ mode="footnote.number"/>
+ </a>
+ <xsl:text>] </xsl:text>
+ </sup>
+ </xsl:variable>
+
+ <xsl:variable name="html">
+ <xsl:apply-templates select="."/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:variable name="html-nodes" select="exsl:node-set($html)"/>
+ <xsl:choose>
+ <xsl:when test="$html-nodes//p">
+ <xsl:apply-templates select="$html-nodes" mode="insert.html.p">
+ <xsl:with-param name="mark" select="$footnote.mark"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$html-nodes" mode="insert.html.text">
+ <xsl:with-param name="mark" select="$footnote.mark"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$html"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!--
+<xsl:template name="count-element-from">
+ <xsl:param name="from" select=".."/>
+ <xsl:param name="to" select="."/>
+ <xsl:param name="count" select="0"/>
+ <xsl:param name="list" select="$from/following::*[name(.)=name($to)]
+ |$from/descendant-or-self::*[name(.)=name($to)]"/>
+
+ <xsl:choose>
+ <xsl:when test="not($list)">
+ <xsl:text>-1</xsl:text>
+ </xsl:when>
+ <xsl:when test="$list[1] = $to">
+ <xsl:value-of select="$count + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+-->
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.footnotes">
+ <xsl:variable name="footnotes" select=".//footnote"/>
+ <xsl:variable name="table.footnotes"
+ select=".//tgroup//footnote"/>
+
+ <!-- Only bother to do this if there's at least one non-table footnote -->
+ <xsl:if test="count($footnotes)>count($table.footnotes)">
+ <div class="footnotes">
+ <br/>
+ <hr width="100" align="left"/>
+ <xsl:apply-templates select="$footnotes" mode="process.footnote.mode"/>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="footnote" name="process.footnote" mode="process.footnote.mode">
+ <xsl:choose>
+ <xsl:when test="local-name(*[1]) = 'para' or local-name(*[1]) = 'simpara'">
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:when>
+
+ <xsl:when test="$html.cleanup != 0 and function-available('exsl:node-set')">
+ <div class="{name(.)}">
+ <xsl:apply-templates select="*[1]" mode="footnote.body.number"/>
+ <xsl:apply-templates select="*[position() &gt; 1]"/>
+ </div>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Warning: footnote number may not be generated </xsl:text>
+ <xsl:text>correctly; </xsl:text>
+ <xsl:value-of select="local-name(*[1])"/>
+ <xsl:text> unexpected as first child of footnote.</xsl:text>
+ </xsl:message>
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tgroup//footnote"
+ mode="process.footnote.mode">
+</xsl:template>
+
+<xsl:template match="footnote" mode="table.footnote.mode">
+ <xsl:call-template name="process.footnote"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/formal.xsl b/kdoctools/docbook/xsl/html/formal.xsl
new file mode 100644
index 000000000..deed85446
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/formal.xsl
@@ -0,0 +1,342 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template name="formal.object">
+ <xsl:param name="placement" select="'before'"/>
+ <xsl:param name="class" select="local-name(.)"/>
+
+ <div class="{$class}">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="$placement = 'before'">
+ <xsl:call-template name="formal.object.heading"/>
+ <xsl:apply-templates/>
+
+ <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+ <!-- the table template, but I want the link to be inside the DIV, so... -->
+ <xsl:if test="local-name(.) = 'table'">
+ <xsl:call-template name="table.longdesc"/>
+ </xsl:if>
+
+ <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+ <xsl:apply-templates/>
+
+ <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+ <!-- the table template, but I want the link to be inside the DIV, so... -->
+ <xsl:if test="local-name(.) = 'table'">
+ <xsl:call-template name="table.longdesc"/>
+ </xsl:if>
+
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:template name="formal.object.heading">
+ <xsl:param name="object" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$object" mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+ </xsl:param>
+
+ <p class="title">
+ <b>
+ <xsl:copy-of select="$title"/>
+ </b>
+ </p>
+</xsl:template>
+
+<xsl:template name="informal.object">
+ <xsl:param name="class" select="local-name(.)"/>
+
+ <div class="{$class}">
+ <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+
+ <!-- HACK: This doesn't belong inside formal.object; it should be done by -->
+ <!-- the table template, but I want the link to be inside the DIV, so... -->
+ <xsl:if test="local-name(.) = 'informaltable'">
+ <xsl:call-template name="table.longdesc"/>
+ </xsl:if>
+
+ <xsl:if test="$spacing.paras != 0"><p/></xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template name="semiformal.object">
+ <xsl:param name="placement" select="'before'"/>
+ <xsl:param name="class" select="local-name(.)"/>
+
+ <xsl:choose>
+ <xsl:when test="title">
+ <xsl:call-template name="formal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="informal.object">
+ <xsl:with-param name="class" select="$class"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="figure">
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="@float and @float != 0">
+ <xsl:variable name="float">
+ <xsl:choose>
+ <xsl:when test="@float = 1">
+ <xsl:value-of select="$default.float.class"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@float"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="figure-float">
+ <xsl:if test="$float = 'left' or $float = 'right'">
+ <xsl:attribute name="style">
+ <xsl:text>float: </xsl:text>
+ <xsl:value-of select="$float"/>
+ <xsl:text>;</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="formal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ </xsl:call-template>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="formal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="table">
+ <xsl:choose>
+ <xsl:when test="tgroup|mediaobject|graphic">
+ <xsl:call-template name="calsTable"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:if test="not(@id)">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="htmlTable"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="calsTable">
+ <xsl:if test="tgroup/tbody/tr
+ |tgroup/thead/tr
+ |tgroup/tfoot/tr">
+ <xsl:message terminate="yes">Broken table: tr descendent of CALS Table.</xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="formal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ <xsl:with-param name="class">
+ <xsl:choose>
+ <xsl:when test="@tabstyle">
+ <!-- hack, this will only ever occur on table, not example -->
+ <xsl:value-of select="@tabstyle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="htmlTable">
+ <xsl:if test="tgroup/tbody/row
+ |tgroup/thead/row
+ |tgroup/tfoot/row">
+ <xsl:message terminate="yes">Broken table: row descendent of HTML table.</xsl:message>
+ </xsl:if>
+
+ <xsl:apply-templates mode="htmlTable"/>
+</xsl:template>
+
+<xsl:template match="example">
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="formal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ <xsl:with-param name="class" select="local-name(.)"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="equation">
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="semiformal.object">
+ <xsl:with-param name="placement" select="$placement"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="figure/title"></xsl:template>
+<xsl:template match="figure/titleabbrev"></xsl:template>
+<xsl:template match="table/title"></xsl:template>
+<xsl:template match="table/titleabbrev"></xsl:template>
+<xsl:template match="table/textobject"></xsl:template>
+<xsl:template match="example/title"></xsl:template>
+<xsl:template match="example/titleabbrev"></xsl:template>
+<xsl:template match="equation/title"></xsl:template>
+<xsl:template match="equation/titleabbrev"></xsl:template>
+
+<xsl:template match="informalfigure">
+ <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informalexample">
+ <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="informaltable">
+ <xsl:choose>
+ <xsl:when test="tgroup|mediaobject|graphic">
+ <xsl:call-template name="informal.object">
+ <xsl:with-param name="class">
+ <xsl:choose>
+ <xsl:when test="@tabstyle">
+ <xsl:value-of select="@tabstyle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <table>
+ <xsl:copy-of select="@*"/>
+ <xsl:call-template name="htmlTable"/>
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="informaltable/textobject"></xsl:template>
+
+<xsl:template name="table.longdesc">
+ <!-- HACK: This doesn't belong inside formal.objectt; it should be done by -->
+ <!-- the table template, but I want the link to be inside the DIV, so... -->
+ <xsl:variable name="longdesc.uri">
+ <xsl:call-template name="longdesc.uri">
+ <xsl:with-param name="mediaobject" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="irrelevant">
+ <!-- write.longdesc returns the filename ... -->
+ <xsl:call-template name="write.longdesc">
+ <xsl:with-param name="mediaobject" select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
+ and textobject[not(phrase)]">
+ <xsl:call-template name="longdesc.link">
+ <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="informalequation">
+ <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/glossary.xsl b/kdoctools/docbook/xsl/html/glossary.xsl
new file mode 100644
index 000000000..c196805ba
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/glossary.xsl
@@ -0,0 +1,369 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glossary">
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="glossary.titlepage"/>
+
+ <xsl:choose>
+ <xsl:when test="glossdiv">
+ <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="glossdiv">
+ <xsl:apply-templates select="glossdiv"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <dl>
+ <xsl:apply-templates select="glossentry"/>
+ </dl>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="not(parent::article)">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="glossary/glossaryinfo"></xsl:template>
+<xsl:template match="glossary/title"></xsl:template>
+<xsl:template match="glossary/subtitle"></xsl:template>
+<xsl:template match="glossary/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glosslist">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="blockinfo/title|title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+ <dl>
+ <xsl:apply-templates select="glossentry"/>
+ </dl>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="glossdiv">
+ <div class="{name(.)}">
+ <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+
+ <dl>
+ <xsl:apply-templates select="glossentry"/>
+ </dl>
+ </div>
+</xsl:template>
+
+<xsl:template match="glossdiv/title">
+ <h3 class="{name(.)}">
+ <xsl:apply-templates/>
+ </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!--
+GlossEntry ::=
+ GlossTerm, Acronym?, Abbrev?,
+ (IndexTerm)*,
+ RevHistory?,
+ (GlossSee | GlossDef+)
+-->
+
+<xsl:template match="glossentry">
+ <xsl:choose>
+ <xsl:when test="$glossentry.show.acronym = 'primary'">
+ <dt>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional">
+ <xsl:choose>
+ <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="acronym|abbrev">
+ <xsl:apply-templates select="acronym|abbrev"/>
+ <xsl:text> (</xsl:text>
+ <xsl:apply-templates select="glossterm"/>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="glossterm"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </dt>
+ </xsl:when>
+ <xsl:when test="$glossentry.show.acronym = 'yes'">
+ <dt>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional">
+ <xsl:choose>
+ <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="glossterm"/>
+
+ <xsl:if test="acronym|abbrev">
+ <xsl:text> (</xsl:text>
+ <xsl:apply-templates select="acronym|abbrev"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </dt>
+ </xsl:when>
+ <xsl:otherwise>
+ <dt>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional">
+ <xsl:choose>
+ <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:apply-templates select="glossterm"/>
+ </dt>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
+</xsl:template>
+
+<xsl:template match="glossentry/glossterm">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::glossterm">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/acronym">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/abbrev">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
+</xsl:template>
+
+<xsl:template match="glossentry/revhistory">
+</xsl:template>
+
+<xsl:template match="glossentry/glosssee">
+ <xsl:variable name="otherterm" select="@otherterm"/>
+ <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <dd>
+ <p>
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="'glossary'"/>
+ <xsl:with-param name="name" select="'see'"/>
+ </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="$target">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target" mode="xref-to"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="$otherterm != '' and not($target)">
+ <xsl:message>
+ <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
+ <xsl:value-of select="$otherterm"/>
+ </xsl:message>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>.</xsl:text>
+ </p>
+ </dd>
+</xsl:template>
+
+<xsl:template match="glossentry/glossdef">
+ <dd>
+ <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
+ <xsl:if test="glossseealso">
+ <p>
+ <xsl:call-template name="gentext.template">
+ <xsl:with-param name="context" select="'glossary'"/>
+ <xsl:with-param name="name" select="'seealso'"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="glossseealso"/>
+ </p>
+ </xsl:if>
+ </dd>
+</xsl:template>
+
+<xsl:template match="glossseealso">
+ <xsl:variable name="otherterm" select="@otherterm"/>
+ <xsl:variable name="targets" select="//node()[@id=$otherterm]"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:choose>
+ <xsl:when test="$target">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target" mode="xref-to"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="$otherterm != '' and not($target)">
+ <xsl:message>
+ <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
+ <xsl:value-of select="$otherterm"/>
+ </xsl:message>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="position() = last()">
+ <xsl:text>.</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>, </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- Glossary collection -->
+
+<xsl:template match="glossary[@role='auto']" priority="2">
+ <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
+ <xsl:variable name="collection" select="document($glossary.collection, .)"/>
+
+ <xsl:if test="$glossary.collection = ''">
+ <xsl:message>
+ <xsl:text>Warning: processing automatic glossary </xsl:text>
+ <xsl:text>without a glossary.collection file.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:if test="not($collection) and $glossary.collection != ''">
+ <xsl:message>
+ <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
+ <xsl:text>open glossary.collection file '</xsl:text>
+ <xsl:value-of select="$glossary.collection"/>
+ <xsl:text>'</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="glossary.titlepage"/>
+
+ <xsl:choose>
+ <xsl:when test="glossdiv and $collection//glossdiv">
+ <xsl:for-each select="$collection//glossdiv">
+ <!-- first see if there are any in this div -->
+ <xsl:variable name="exist.test">
+ <xsl:for-each select="glossentry">
+ <xsl:variable name="cterm" select="glossterm"/>
+ <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+ <xsl:value-of select="glossterm"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+
+ <xsl:if test="$exist.test != ''">
+ <xsl:apply-templates select="." mode="auto-glossary">
+ <xsl:with-param name="terms" select="$terms"/>
+ </xsl:apply-templates>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <dl>
+ <xsl:for-each select="$collection//glossentry">
+ <xsl:variable name="cterm" select="glossterm"/>
+ <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+ <xsl:apply-templates select="." mode="auto-glossary"/>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="not(parent::article)">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="auto-glossary">
+ <!-- pop back out to the default mode for most elements -->
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="glossdiv" mode="auto-glossary">
+ <xsl:param name="terms" select="."/>
+
+ <div class="{name(.)}">
+ <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
+
+ <dl>
+ <xsl:for-each select="glossentry">
+ <xsl:variable name="cterm" select="glossterm"/>
+ <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
+ <xsl:apply-templates select="." mode="auto-glossary"/>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/graphics.xsl b/kdoctools/docbook/xsl/html/graphics.xsl
new file mode 100644
index 000000000..ab09ed17f
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/graphics.xsl
@@ -0,0 +1,1185 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory"
+ xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics"
+ xmlns:ximg="xaln://com.nwalsh.xalan.ImageIntrinsics"
+ xmlns:xtext="com.nwalsh.xalan.Text"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ exclude-result-prefixes="xlink stext xtext lxslt simg ximg"
+ extension-element-prefixes="stext xtext"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ Contributors:
+ Colin Paul Adams, <colin@colina.demon.co.uk>
+
+ ******************************************************************** -->
+
+<lxslt:component prefix="xtext" elements="insertfile"/>
+<lxslt:component prefix="ximg" functions="new getWidth getDepth"/>
+
+<!-- ==================================================================== -->
+<!-- Graphic format tests for the HTML backend -->
+
+<xsl:template name="is.graphic.format">
+ <xsl:param name="format"></xsl:param>
+ <xsl:if test="$format = 'SVG'
+ or $format = 'PNG'
+ or $format = 'JPG'
+ or $format = 'JPEG'
+ or $format = 'linespecific'
+ or $format = 'GIF'
+ or $format = 'GIF87a'
+ or $format = 'GIF89a'
+ or $format = 'BMP'">1</xsl:if>
+</xsl:template>
+
+<xsl:template name="is.graphic.extension">
+ <xsl:param name="ext"></xsl:param>
+ <xsl:variable name="lcext" select="translate($ext,
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
+ 'abcdefghijklmnopqrstuvwxyz')"/>
+ <xsl:if test="$lcext = 'svg'
+ or $lcext = 'png'
+ or $lcext = 'jpeg'
+ or $lcext = 'jpg'
+ or $lcext = 'avi'
+ or $lcext = 'mpg'
+ or $lcext = 'mpeg'
+ or $lcext = 'qt'
+ or $lcext = 'gif'
+ or $lcext = 'bmp'">1</xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="screenshot">
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="screeninfo">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.image">
+ <!-- When this template is called, the current node should be -->
+ <!-- a graphic, inlinegraphic, imagedata, or videodata. All -->
+ <!-- those elements have the same set of attributes, so we can -->
+ <!-- handle them all in one place. -->
+ <xsl:param name="tag" select="'img'"/>
+ <xsl:param name="alt"/>
+ <xsl:param name="longdesc"/>
+
+ <!-- The HTML img element only supports the notion of content-area
+ scaling; it doesn't support the distinction between a
+ content-area and a viewport-area, so we have to make some
+ compromises.
+
+ 1. If only the content-area is specified, everything is fine.
+ (If you ask for a three inch image, that's what you'll get.)
+
+ 2. If only the viewport-area is provided:
+ - If scalefit=1, treat it as both the content-area and
+ the viewport-area. (If you ask for an image in a five inch
+ area, we'll make the image five inches to fill that area.)
+ - If scalefit=0, ignore the viewport-area specification.
+
+ Note: this is not quite the right semantic and has the additional
+ problem that it can result in anamorphic scaling, which scalefit
+ should never cause.
+
+ 3. If both the content-area and the viewport-area is specified
+ on a graphic element, ignore the viewport-area.
+ (If you ask for a three inch image in a five inch area, we'll assume
+ it's better to give you a three inch image in an unspecified area
+ than a five inch image in a five inch area.
+
+ Relative units also cause problems. As a general rule, the stylesheets
+ are operating too early and too loosely coupled with the rendering engine
+ to know things like the current font size or the actual dimensions of
+ an image. Therefore:
+
+ 1. We use a fixed size for pixels, $pixels.per.inch
+
+ 2. We use a fixed size for "em"s, $points.per.em
+
+ Percentages are problematic. In the following discussion, we speak
+ of width and contentwidth, but the same issues apply to depth and
+ contentdepth
+
+ 1. A width of 50% means "half of the available space for the image."
+ That's fine. But note that in HTML, this is a dynamic property and
+ the image size will vary if the browser window is resized.
+
+ 2. A contentwidth of 50% means "half of the actual image width". But
+ the stylesheets have no way to assess the image's actual size. Treating
+ this as a width of 50% is one possibility, but it produces behavior
+ (dynamic scaling) that seems entirely out of character with the
+ meaning.
+
+ Instead, the stylesheets define a $nominal.image.width
+ and convert percentages to actual values based on that nominal size.
+
+ Scale can be problematic. Scale applies to the contentwidth, so
+ a scale of 50 when a contentwidth is not specified is analagous to a
+ width of 50%. (If a contentwidth is specified, the scaling factor can
+ be applied to that value and no problem exists.)
+
+ If scale is specified but contentwidth is not supplied, the
+ nominal.image.width is used to calculate a base size
+ for scaling.
+
+ Warning: as a consequence of these decisions, unless the aspect ratio
+ of your image happens to be exactly the same as (nominal width / nominal height),
+ specifying contentwidth="50%" and contentdepth="50%" is NOT going to
+ scale the way you expect (or really, the way it should).
+
+ Don't do that. In fact, a percentage value is not recommended for content
+ size at all. Use scale instead.
+
+ Finally, align and valign are troublesome. Horizontal alignment is now
+ supported by wrapping the image in a <div align="{@align}"> (in block
+ contexts!). I can't think of anything (practical) to do about vertical
+ alignment.
+ -->
+
+ <xsl:variable name="width-units">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="@width">
+ <xsl:call-template name="length-units">
+ <xsl:with-param name="length" select="@width"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not(@depth) and $default.image.width != ''">
+ <xsl:call-template name="length-units">
+ <xsl:with-param name="length" select="$default.image.width"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="width">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="@width">
+ <xsl:choose>
+ <xsl:when test="$width-units = '%'">
+ <xsl:value-of select="@width"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="length-spec">
+ <xsl:with-param name="length" select="@width"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="not(@depth) and $default.image.width != ''">
+ <xsl:value-of select="$default.image.width"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="scalefit">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+ <xsl:when test="@contentwidth or @contentdepth">0</xsl:when>
+ <xsl:when test="@scale">0</xsl:when>
+ <xsl:when test="@scalefit"><xsl:value-of select="@scalefit"/></xsl:when>
+ <xsl:when test="$width != '' or @depth">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="scale">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0">1.0</xsl:when>
+ <xsl:when test="@contentwidth or @contentdepth">1.0</xsl:when>
+ <xsl:when test="@scale">
+ <xsl:value-of select="@scale div 100.0"/>
+ </xsl:when>
+ <xsl:otherwise>1.0</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="local-name(.) = 'graphic'
+ or local-name(.) = 'inlinegraphic'">
+ <!-- handle legacy graphic and inlinegraphic by new template -->
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select="."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- imagedata, videodata, audiodata -->
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="intrinsicwidth">
+ <!-- This funny compound test works around a bug in XSLTC -->
+ <xsl:choose>
+ <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('simg:getWidth')">
+ <xsl:value-of select="simg:getWidth(simg:new($filename),
+ $nominal.image.width)"/>
+ </xsl:when>
+ <xsl:when test="function-available('ximg:getWidth')">
+ <xsl:value-of select="ximg:getWidth(ximg:new($filename),
+ $nominal.image.width)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$nominal.image.width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$nominal.image.width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="intrinsicdepth">
+ <!-- This funny compound test works around a bug in XSLTC -->
+ <xsl:choose>
+ <xsl:when test="$use.extensions != 0 and $graphicsize.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('simg:getDepth')">
+ <xsl:value-of select="simg:getDepth(simg:new($filename),
+ $nominal.image.depth)"/>
+ </xsl:when>
+ <xsl:when test="function-available('ximg:getDepth')">
+ <xsl:value-of select="ximg:getDepth(ximg:new($filename),
+ $nominal.image.depth)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$nominal.image.depth"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$nominal.image.depth"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="contentwidth">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="@contentwidth">
+ <xsl:variable name="units">
+ <xsl:call-template name="length-units">
+ <xsl:with-param name="length" select="@contentwidth"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$units = '%'">
+ <xsl:variable name="cmagnitude">
+ <xsl:call-template name="length-magnitude">
+ <xsl:with-param name="length" select="@contentwidth"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$intrinsicwidth * $cmagnitude div 100.0"/>
+ <xsl:text>px</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="length-spec">
+ <xsl:with-param name="length" select="@contentwidth"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$intrinsicwidth"/>
+ <xsl:text>px</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="scaled.contentwidth">
+ <xsl:if test="$contentwidth != ''">
+ <xsl:variable name="cwidth.in.points">
+ <xsl:call-template name="length-in-points">
+ <xsl:with-param name="length" select="$contentwidth"/>
+ <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+ <xsl:with-param name="em.size" select="$points.per.em"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$cwidth.in.points div 72.0 * $pixels.per.inch * $scale"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="html.width">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="$width-units = '%'">
+ <xsl:value-of select="$width"/>
+ </xsl:when>
+ <xsl:when test="$width != ''">
+ <xsl:variable name="width.in.points">
+ <xsl:call-template name="length-in-points">
+ <xsl:with-param name="length" select="$width"/>
+ <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+ <xsl:with-param name="em.size" select="$points.per.em"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="round($width.in.points div 72.0 * $pixels.per.inch)"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="contentdepth">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="@contentdepth">
+ <xsl:variable name="units">
+ <xsl:call-template name="length-units">
+ <xsl:with-param name="length" select="@contentdepth"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$units = '%'">
+ <xsl:variable name="cmagnitude">
+ <xsl:call-template name="length-magnitude">
+ <xsl:with-param name="length" select="@contentdepth"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$intrinsicdepth * $cmagnitude div 100.0"/>
+ <xsl:text>px</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="length-spec">
+ <xsl:with-param name="length" select="@contentdepth"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$intrinsicdepth"/>
+ <xsl:text>px</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="scaled.contentdepth">
+ <xsl:if test="$contentdepth != ''">
+ <xsl:variable name="cdepth.in.points">
+ <xsl:call-template name="length-in-points">
+ <xsl:with-param name="length" select="$contentdepth"/>
+ <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+ <xsl:with-param name="em.size" select="$points.per.em"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$cdepth.in.points div 72.0 * $pixels.per.inch * $scale"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="depth-units">
+ <xsl:if test="@depth">
+ <xsl:call-template name="length-units">
+ <xsl:with-param name="length" select="@depth"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="depth">
+ <xsl:if test="@depth">
+ <xsl:choose>
+ <xsl:when test="$depth-units = '%'">
+ <xsl:value-of select="@depth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="length-spec">
+ <xsl:with-param name="length" select="@depth"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="html.depth">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0"></xsl:when>
+ <xsl:when test="$depth-units = '%'">
+ <xsl:value-of select="$depth"/>
+ </xsl:when>
+ <xsl:when test="@depth and @depth != ''">
+ <xsl:variable name="depth.in.points">
+ <xsl:call-template name="length-in-points">
+ <xsl:with-param name="length" select="$depth"/>
+ <xsl:with-param name="pixels.per.inch" select="$pixels.per.inch"/>
+ <xsl:with-param name="em.size" select="$points.per.em"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="round($depth.in.points div 72.0 * $pixels.per.inch)"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="viewport">
+ <xsl:choose>
+ <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
+ <xsl:when test="local-name(.) = 'inlinegraphic'
+ or ancestor::inlinemediaobject
+ or ancestor::inlineequation">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$make.graphic.viewport"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+<!--
+ <xsl:message>=====================================
+scale: <xsl:value-of select="$scale"/>, <xsl:value-of select="$scalefit"/>
+@contentwidth <xsl:value-of select="@contentwidth"/>
+$contentwidth <xsl:value-of select="$contentwidth"/>
+scaled.contentwidth: <xsl:value-of select="$scaled.contentwidth"/>
+@width: <xsl:value-of select="@width"/>
+width: <xsl:value-of select="$width"/>
+html.width: <xsl:value-of select="$html.width"/>
+@contentdepth <xsl:value-of select="@contentdepth"/>
+$contentdepth <xsl:value-of select="$contentdepth"/>
+scaled.contentdepth: <xsl:value-of select="$scaled.contentdepth"/>
+@depth: <xsl:value-of select="@depth"/>
+depth: <xsl:value-of select="$depth"/>
+html.depth: <xsl:value-of select="$html.depth"/>
+align: <xsl:value-of select="@align"/>
+valign: <xsl:value-of select="@valign"/></xsl:message>
+-->
+
+ <xsl:variable name="img">
+ <xsl:choose>
+ <xsl:when test="@format = 'SVG'">
+ <object data="{$filename}" type="image/svg+xml">
+ <xsl:call-template name="process.image.attributes">
+ <!--xsl:with-param name="alt" select="$alt"/ there's no alt here-->
+ <xsl:with-param name="html.depth" select="$html.depth"/>
+ <xsl:with-param name="html.width" select="$html.width"/>
+ <xsl:with-param name="longdesc" select="$longdesc"/>
+ <xsl:with-param name="scale" select="$scale"/>
+ <xsl:with-param name="scalefit" select="$scalefit"/>
+ <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+ <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+ <xsl:with-param name="viewport" select="$viewport"/>
+ </xsl:call-template>
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:choose>
+ <xsl:when test="@align = 'center'">middle</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@align"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$use.embed.for.svg != 0">
+ <embed src="{$filename}" type="image/svg+xml">
+ <xsl:call-template name="process.image.attributes">
+ <!--xsl:with-param name="alt" select="$alt"/ there's no alt here -->
+ <xsl:with-param name="html.depth" select="$html.depth"/>
+ <xsl:with-param name="html.width" select="$html.width"/>
+ <xsl:with-param name="longdesc" select="$longdesc"/>
+ <xsl:with-param name="scale" select="$scale"/>
+ <xsl:with-param name="scalefit" select="$scalefit"/>
+ <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+ <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+ <xsl:with-param name="viewport" select="$viewport"/>
+ </xsl:call-template>
+ </embed>
+ </xsl:if>
+ </object>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$tag}">
+ <xsl:attribute name="src">
+ <xsl:choose>
+ <xsl:when test="$img.src.path != '' and
+ $tag = 'img' and
+ not(starts-with($filename, '/')) and
+ not(contains($filename, '://'))">
+ <xsl:value-of select="$img.src.path"/>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:value-of select="$filename"/>
+ </xsl:attribute>
+
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:choose>
+ <xsl:when test="@align = 'center'">middle</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@align"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="process.image.attributes">
+ <xsl:with-param name="alt">
+ <xsl:choose>
+ <xsl:when test="$alt != ''">
+ <xsl:copy-of select="$alt"/>
+ </xsl:when>
+ <xsl:when test="ancestor::figure">
+ <xsl:value-of select="normalize-space(ancestor::figure/title)"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="html.depth" select="$html.depth"/>
+ <xsl:with-param name="html.width" select="$html.width"/>
+ <xsl:with-param name="longdesc" select="$longdesc"/>
+ <xsl:with-param name="scale" select="$scale"/>
+ <xsl:with-param name="scalefit" select="$scalefit"/>
+ <xsl:with-param name="scaled.contentdepth" select="$scaled.contentdepth"/>
+ <xsl:with-param name="scaled.contentwidth" select="$scaled.contentwidth"/>
+ <xsl:with-param name="viewport" select="$viewport"/>
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+
+ <xsl:variable name="bgcolor">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="../processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'background-color'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="use.viewport"
+ select="$viewport != 0
+ and ($html.width != ''
+ or ($html.depth != '' and $depth-units != '%')
+ or $bgcolor != ''
+ or @valign)"/>
+
+ <xsl:choose>
+ <xsl:when test="$use.viewport">
+ <table border="0" summary="manufactured viewport for HTML img"
+ cellspacing="0" cellpadding="0">
+ <xsl:if test="$html.width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$html.width"/>
+ </xsl:attribute>
+ </xsl:if>
+ <tr>
+ <xsl:if test="$html.depth != '' and $depth-units != '%'">
+ <!-- don't do this for percentages because browsers get confused -->
+ <xsl:choose>
+ <xsl:when test="$css.decoration != 0">
+ <xsl:attribute name="style">
+ <xsl:text>height: </xsl:text>
+ <xsl:value-of select="$html.depth"/>
+ <xsl:text>px</xsl:text>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="height">
+ <xsl:value-of select="$html.depth"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <td>
+ <xsl:if test="$bgcolor != ''">
+ <xsl:choose>
+ <xsl:when test="$css.decoration != 0">
+ <xsl:attribute name="style">
+ <xsl:text>background-color: </xsl:text>
+ <xsl:value-of select="$bgcolor"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="$bgcolor"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="@align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@valign">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="@valign"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$img"/>
+ </td>
+ </tr>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$img"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.image.attributes">
+ <xsl:param name="alt"/>
+ <xsl:param name="html.width"/>
+ <xsl:param name="html.depth"/>
+ <xsl:param name="longdesc"/>
+ <xsl:param name="scale"/>
+ <xsl:param name="scalefit"/>
+ <xsl:param name="scaled.contentdepth"/>
+ <xsl:param name="scaled.contentwidth"/>
+ <xsl:param name="viewport"/>
+
+ <xsl:choose>
+ <xsl:when test="@contentwidth or @contentdepth">
+ <!-- ignore @width/@depth, @scale, and @scalefit if specified -->
+ <xsl:if test="@contentwidth">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$scaled.contentwidth"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@contentdepth">
+ <xsl:attribute name="height">
+ <xsl:value-of select="$scaled.contentdepth"/>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:when test="number($scale) != 1.0">
+ <!-- scaling is always uniform, so we only have to specify one dimension -->
+ <!-- ignore @scalefit if specified -->
+ <xsl:attribute name="width">
+ <xsl:value-of select="$scaled.contentwidth"/>
+ </xsl:attribute>
+ </xsl:when>
+
+ <xsl:when test="$scalefit != 0">
+ <xsl:choose>
+ <xsl:when test="contains($html.width, '%')">
+ <xsl:choose>
+ <xsl:when test="$viewport != 0">
+ <!-- The *viewport* will be scaled, so use 100% here! -->
+ <xsl:attribute name="width">
+ <xsl:value-of select="'100%'"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="width">
+ <xsl:value-of select="$html.width"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="contains($html.depth, '%')">
+ <!-- HTML doesn't deal with this case very well...do nothing -->
+ </xsl:when>
+
+ <xsl:when test="$scaled.contentwidth != '' and $html.width != ''
+ and $scaled.contentdepth != '' and $html.depth != ''">
+ <!-- scalefit should not be anamorphic; figure out which direction -->
+ <!-- has the limiting scale factor and scale in that direction -->
+ <xsl:choose>
+ <xsl:when test="$html.width div $scaled.contentwidth &gt;
+ $html.depth div $scaled.contentdepth">
+ <xsl:attribute name="height">
+ <xsl:value-of select="$html.depth"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="width">
+ <xsl:value-of select="$html.width"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="$scaled.contentwidth != '' and $html.width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$html.width"/>
+ </xsl:attribute>
+ </xsl:when>
+
+ <xsl:when test="$scaled.contentdepth != '' and $html.depth != ''">
+ <xsl:attribute name="height">
+ <xsl:value-of select="$html.depth"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:if test="$alt != ''">
+ <xsl:attribute name="alt">
+ <xsl:value-of select="$alt"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$longdesc != ''">
+ <xsl:attribute name="longdesc">
+ <xsl:value-of select="$longdesc"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="@align and $viewport = 0">
+ <xsl:attribute name="align">
+ <xsl:choose>
+ <xsl:when test="@align = 'center'">middle</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@align"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="graphic">
+ <xsl:choose>
+ <xsl:when test="parent::inlineequation">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="process.image"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <div>
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="@align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="process.image"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="inlinegraphic">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="@entityref">
+ <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@fileref"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="@id">
+ <a name="{@id}"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="@format='linespecific'">
+ <xsl:choose>
+ <xsl:when test="$use.extensions != '0'
+ and $textinsert.extension != '0'">
+ <xsl:choose>
+ <xsl:when test="element-available('stext:insertfile')">
+ <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
+ </xsl:when>
+ <xsl:when test="element-available('xtext:insertfile')">
+ <xtext:insertfile href="{$filename}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No insertfile extension available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+ href="{$filename}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process.image"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="mediaobject|mediaobjectco">
+
+ <xsl:variable name="olist" select="imageobject|imageobjectco
+ |videoobject|audioobject
+ |textobject"/>
+
+ <xsl:variable name="object.index">
+ <xsl:call-template name="select.mediaobject.index">
+ <xsl:with-param name="olist" select="$olist"/>
+ <xsl:with-param name="count" select="1"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="object" select="$olist[position() = $object.index]"/>
+
+ <xsl:variable name="align">
+ <xsl:value-of select="$object/imagedata[@align][1]/@align"/>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:if test="$align != '' ">
+ <xsl:attribute name="align">
+ <xsl:value-of select="$align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@id">
+ <a name="{@id}"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="$object"/>
+ <xsl:apply-templates select="caption"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="inlinemediaobject">
+ <span class="{name(.)}">
+ <xsl:if test="@id">
+ <a name="{@id}"/>
+ </xsl:if>
+ <xsl:call-template name="select.mediaobject"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="programlisting/inlinemediaobject
+ |screen/inlinemediaobject" priority="2">
+ <!-- the additional span causes problems in some cases -->
+ <xsl:call-template name="select.mediaobject"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="imageobjectco">
+ <xsl:if test="@id">
+ <a name="{@id}"/>
+ </xsl:if>
+ <xsl:apply-templates select="imageobject"/>
+ <xsl:apply-templates select="calloutlist"/>
+</xsl:template>
+
+<xsl:template match="imageobject">
+ <xsl:choose>
+ <xsl:when xmlns:svg="http://www.w3.org/2000/svg"
+ test="svg:*">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="imagedata"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="imagedata">
+ <xsl:variable name="filename">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="@format='linespecific'">
+ <xsl:choose>
+ <xsl:when test="$use.extensions != '0'
+ and $textinsert.extension != '0'">
+ <xsl:choose>
+ <xsl:when test="element-available('stext:insertfile')">
+ <stext:insertfile href="{$filename}" encoding="{$textdata.default.encoding}"/>
+ </xsl:when>
+ <xsl:when test="element-available('xtext:insertfile')">
+ <xtext:insertfile href="{$filename}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No insertfile extension available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+ href="{$filename}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="longdesc.uri">
+ <xsl:call-template name="longdesc.uri">
+ <xsl:with-param name="mediaobject"
+ select="ancestor::imageobject/parent::*"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="phrases"
+ select="ancestor::mediaobject/textobject[phrase]
+ |ancestor::inlinemediaobject/textobject[phrase]
+ |ancestor::mediaobjectco/textobject[phrase]"/>
+
+ <xsl:call-template name="process.image">
+ <xsl:with-param name="alt">
+ <xsl:apply-templates select="$phrases[not(@role) or @role!='tex'][1]"/>
+ </xsl:with-param>
+ <xsl:with-param name="longdesc">
+ <xsl:call-template name="write.longdesc">
+ <xsl:with-param name="mediaobject"
+ select="ancestor::imageobject/parent::*"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:if test="$html.longdesc != 0 and $html.longdesc.link != 0
+ and ancestor::imageobject/parent::*/textobject[not(phrase)]">
+ <xsl:call-template name="longdesc.link">
+ <xsl:with-param name="longdesc.uri" select="$longdesc.uri"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="longdesc.uri">
+ <xsl:param name="mediaobject" select="."/>
+
+ <xsl:if test="$html.longdesc">
+ <xsl:if test="$mediaobject/textobject[not(phrase)]">
+ <xsl:variable name="image-id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$mediaobject"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="dbhtml.dir">
+ <xsl:call-template name="dbhtml-dir"/>
+ </xsl:variable>
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir">
+ <xsl:choose>
+ <xsl:when test="$dbhtml.dir != ''">
+ <xsl:value-of select="$dbhtml.dir"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$base.dir"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="base.name"
+ select="concat('ld-',$image-id,$html.ext)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$filename"/>
+ </xsl:if>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="write.longdesc">
+ <xsl:param name="mediaobject" select="."/>
+ <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+ <xsl:variable name="filename">
+ <xsl:call-template name="longdesc.uri">
+ <xsl:with-param name="mediaobject" select="$mediaobject"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:value-of select="$filename"/>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="user.preroot"/>
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content">
+ <xsl:with-param name="title" select="'Long Description'"/>
+ </xsl:call-template>
+ <xsl:call-template name="user.head.content"/>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <xsl:for-each select="$mediaobject/textobject[not(phrase)]">
+ <xsl:apply-templates select="./*"/>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="longdesc.link">
+ <xsl:param name="longdesc.uri" select="''"/>
+
+ <xsl:variable name="this.uri">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="href.target.uri"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href.to">
+ <xsl:call-template name="trim.common.uri.paths">
+ <xsl:with-param name="uriA" select="$longdesc.uri"/>
+ <xsl:with-param name="uriB" select="$this.uri"/>
+ <xsl:with-param name="return" select="'A'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div class="longdesc-link" align="right">
+ <br clear="all"/>
+ <span class="longdesc-link">
+ <xsl:text>[</xsl:text>
+ <a href="{$href.to}" target="longdesc">D</a>
+ <xsl:text>]</xsl:text>
+ </span>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="videoobject">
+ <xsl:apply-templates select="videodata"/>
+</xsl:template>
+
+<xsl:template match="videodata">
+ <xsl:call-template name="process.image">
+ <xsl:with-param name="tag" select="'embed'"/>
+ <xsl:with-param name="alt">
+ <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="audioobject">
+ <xsl:apply-templates select="audiodata"/>
+</xsl:template>
+
+<xsl:template match="audiodata">
+ <xsl:call-template name="process.image">
+ <xsl:with-param name="tag" select="'embed'"/>
+ <xsl:with-param name="alt">
+ <xsl:apply-templates select="(../../textobject/phrase)[1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="textobject">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="textdata">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="@entityref">
+ <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="@fileref"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="encoding">
+ <xsl:choose>
+ <xsl:when test="@encoding">
+ <xsl:value-of select="@encoding"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$textdata.default.encoding"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$use.extensions != '0'
+ and $textinsert.extension != '0'">
+ <xsl:choose>
+ <xsl:when test="element-available('stext:insertfile')">
+ <stext:insertfile href="{$filename}" encoding="{$encoding}"/>
+ </xsl:when>
+ <xsl:when test="element-available('xtext:insertfile')">
+ <xtext:insertfile href="{$filename}"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No insertfile extension available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"
+ href="{$filename}"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="caption">
+ <div class="{name(.)}">
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- "Support" for SVG -->
+
+<xsl:template match="svg:*" xmlns:svg="http://www.w3.org/2000/svg">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<!-- Resolve xml:base attributes -->
+<xsl:template match="@fileref">
+ <!-- need a check for absolute urls -->
+ <xsl:choose>
+ <xsl:when test="contains(., ':')">
+ <!-- it has a uri scheme so it is an absolute uri -->
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- its a relative uri -->
+ <xsl:call-template name="relative-uri">
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/html-rtf.xsl b/kdoctools/docbook/xsl/html/html-rtf.xsl
new file mode 100644
index 000000000..dbf4c9820
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/html-rtf.xsl
@@ -0,0 +1,335 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ xmlns:set="http://exslt.org/sets"
+ exclude-result-prefixes="exsl set"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This module contains templates that match against HTML nodes. It is used
+ to post-process result tree fragments for some sorts of cleanup.
+ These templates can only ever be fired by a processor that supports
+ exslt:node-set(). -->
+
+<!-- ==================================================================== -->
+
+<!-- insert.html.p mode templates insert a particular RTF at the beginning
+ of the first paragraph in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.html.p">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:apply-templates mode="insert.html.p">
+ <xsl:with-param name="mark" select="$mark"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.html.p">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="insert.html.p">
+ <xsl:with-param name="mark" select="$mark"/>
+ </xsl:apply-templates>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+ match="html:p|p" mode="insert.html.p">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:if test="not(preceding::p|preceding::html:p)">
+ <xsl:copy-of select="$mark"/>
+ </xsl:if>
+ <xsl:apply-templates mode="insert.html.p">
+ <xsl:with-param name="mark" select="$mark"/>
+ </xsl:apply-templates>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.p">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- insert.html.text mode templates insert a particular RTF at the beginning
+ of the first text-node in the primary RTF. -->
+
+<xsl:template match="/" mode="insert.html.text">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:apply-templates mode="insert.html.text">
+ <xsl:with-param name="mark" select="$mark"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.html.text">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="insert.html.text">
+ <xsl:with-param name="mark" select="$mark"/>
+ </xsl:apply-templates>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="insert.html.text">
+ <xsl:param name="mark" select="'?'"/>
+
+ <xsl:if test="not(preceding::text())">
+ <xsl:copy-of select="$mark"/>
+ </xsl:if>
+
+ <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="processing-instruction()|comment()" mode="insert.html.text">
+ <xsl:param name="mark" select="'?'"/>
+ <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- unwrap.p mode templates remove blocks from HTML p elements (and
+ other places where blocks aren't allowed) -->
+
+<xsl:template name="unwrap.p">
+ <xsl:param name="p"/>
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')
+ and function-available('set:leading')
+ and function-available('set:trailing')">
+ <xsl:apply-templates select="exsl:node-set($p)" mode="unwrap.p"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$p"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+ match="html:p|p" mode="unwrap.p">
+ <!-- xmlns:html is necessary for the xhtml stylesheet case -->
+ <xsl:variable name="blocks" xmlns:html="http://www.w3.org/1999/xhtml"
+ select="address|blockquote|div|hr|h1|h2|h3|h4|h5|h6
+ |layer|p|pre|table|dl|menu|ol|ul|form
+ |html:address|html:blockquote|html:div|html:hr
+ |html:h1|html:h2|html:h3|html:h4|html:h5|html:h6
+ |html:layer|html:p|html:pre|html:table|html:dl
+ |html:menu|html:ol|html:ul|html:form"/>
+ <xsl:choose>
+ <xsl:when test="$blocks">
+ <xsl:call-template name="unwrap.p.nodes">
+ <xsl:with-param name="wrap" select="."/>
+ <xsl:with-param name="first" select="1"/>
+ <xsl:with-param name="nodes" select="node()"/>
+ <xsl:with-param name="blocks" select="$blocks"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="unwrap.p"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="unwrap.p">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="unwrap.p"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="unwrap.p">
+ <xsl:copy/>
+</xsl:template>
+
+<xsl:template name="unwrap.p.nodes">
+ <xsl:param name="wrap" select="."/>
+ <xsl:param name="first" select="0"/>
+ <xsl:param name="nodes"/>
+ <xsl:param name="blocks"/>
+ <xsl:variable name="block" select="$blocks[1]"/>
+
+ <!-- This template should never get called if these functions aren't available -->
+ <!-- but this test is still necessary so that processors don't choke on the -->
+ <!-- function calls if they don't support the set: functions -->
+ <xsl:if test="function-available('set:leading')
+ and function-available('set:trailing')">
+ <xsl:choose>
+ <xsl:when test="$blocks">
+ <xsl:variable name="leading" select="set:leading($nodes,$block)"/>
+ <xsl:variable name="trailing" select="set:trailing($nodes,$block)"/>
+
+ <xsl:if test="($wrap/@id and $first = 1) or $leading">
+ <xsl:element name="{local-name($wrap)}" namespace="{namespace-uri($wrap)}">
+ <xsl:for-each select="$wrap/@*">
+ <xsl:if test="$first != 0 or local-name(.) != 'id'">
+ <xsl:copy/>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:apply-templates select="$leading" mode="unwrap.p"/>
+ </xsl:element>
+ </xsl:if>
+
+ <xsl:apply-templates select="$block" mode="unwrap.p"/>
+
+ <xsl:if test="$trailing">
+ <xsl:call-template name="unwrap.p.nodes">
+ <xsl:with-param name="wrap" select="$wrap"/>
+ <xsl:with-param name="nodes" select="$trailing"/>
+ <xsl:with-param name="blocks" select="$blocks[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:if test="($wrap/@id and $first = 1) or $nodes">
+ <xsl:element name="{local-name($wrap)}" namespace="{namespace-uri($wrap)}">
+ <xsl:for-each select="$wrap/@*">
+ <xsl:if test="$first != 0 or local-name(.) != 'id'">
+ <xsl:copy/>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:apply-templates select="$nodes" mode="unwrap.p"/>
+ </xsl:element>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- make.verbatim.mode replaces spaces and newlines -->
+
+<xsl:template match="/" mode="make.verbatim.mode">
+ <xsl:apply-templates mode="make.verbatim.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="make.verbatim.mode">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="make.verbatim.mode"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="processing-instruction()|comment()" mode="make.verbatim.mode">
+ <xsl:copy/>
+</xsl:template>
+
+<xsl:template match="text()" mode="make.verbatim.mode">
+ <xsl:variable name="text" select="translate(., ' ', '&#160;')"/>
+
+ <xsl:choose>
+ <xsl:when test="not(contains($text, '&#xA;'))">
+ <xsl:value-of select="$text"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="len" select="string-length($text)"/>
+
+ <xsl:choose>
+ <xsl:when test="$len = 1">
+ <br/><xsl:text>&#xA;</xsl:text>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="half" select="$len div 2"/>
+ <xsl:call-template name="make-verbatim-recursive">
+ <xsl:with-param name="text" select="substring($text, 1, $half)"/>
+ </xsl:call-template>
+ <xsl:call-template name="make-verbatim-recursive">
+ <xsl:with-param name="text"
+ select="substring($text, ($half + 1), $len)"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make-verbatim-recursive">
+ <xsl:param name="text" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="not(contains($text, '&#xA;'))">
+ <xsl:value-of select="$text"/>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="len" select="string-length($text)"/>
+
+ <xsl:choose>
+ <xsl:when test="$len = 1">
+ <br/><xsl:text>&#xA;</xsl:text>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="half" select="$len div 2"/>
+ <xsl:call-template name="make-verbatim-recursive">
+ <xsl:with-param name="text" select="substring($text, 1, $half)"/>
+ </xsl:call-template>
+ <xsl:call-template name="make-verbatim-recursive">
+ <xsl:with-param name="text"
+ select="substring($text, ($half + 1), $len)"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<!-- remove.empty.div mode templates remove empty blocks -->
+
+<xsl:template name="remove.empty.div">
+ <xsl:param name="div"/>
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:apply-templates select="exsl:node-set($div)" mode="remove.empty.div"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$div"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template xmlns:html="http://www.w3.org/1999/xhtml"
+ match="html:p|p|html:div|div" mode="remove.empty.div">
+ <xsl:if test="node()">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="remove.empty.div"/>
+ </xsl:copy>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="*" mode="remove.empty.div">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="remove.empty.div"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="text()|processing-instruction()|comment()" mode="remove.empty.div">
+ <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/html.xsl b/kdoctools/docbook/xsl/html/html.xsl
new file mode 100644
index 000000000..4fdf9833b
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/html.xsl
@@ -0,0 +1,90 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template name="anchor">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="conditional" select="1"/>
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$conditional = 0 or $node/@id">
+ <a name="{$id}"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="href.target.uri">
+ <xsl:param name="context" select="."/>
+ <xsl:param name="object" select="."/>
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="href.target">
+ <xsl:param name="context" select="."/>
+ <xsl:param name="object" select="."/>
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="href.target.with.base.dir">
+ <xsl:param name="object" select="."/>
+ <xsl:if test="$manifest.in.base.dir = 0">
+ <xsl:value-of select="$base.dir"/>
+ </xsl:if>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dingbat">
+ <xsl:param name="dingbat">bullet</xsl:param>
+ <xsl:call-template name="dingbat.characters">
+ <xsl:with-param name="dingbat" select="$dingbat"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dingbat.characters">
+ <!-- now that I'm using the real serializer, all that dingbat malarky -->
+ <!-- isn't necessary anymore... -->
+ <xsl:param name="dingbat">bullet</xsl:param>
+ <xsl:choose>
+ <xsl:when test="$dingbat='bullet'">&#x2022;</xsl:when>
+ <xsl:when test="$dingbat='copyright'">&#x00A9;</xsl:when>
+ <xsl:when test="$dingbat='trademark'">&#x2122;</xsl:when>
+ <xsl:when test="$dingbat='trade'">&#x2122;</xsl:when>
+ <xsl:when test="$dingbat='registered'">&#x00AE;</xsl:when>
+ <xsl:when test="$dingbat='service'">(SM)</xsl:when>
+ <xsl:when test="$dingbat='nbsp'">&#x00A0;</xsl:when>
+ <xsl:when test="$dingbat='ldquo'">&#x201C;</xsl:when>
+ <xsl:when test="$dingbat='rdquo'">&#x201D;</xsl:when>
+ <xsl:when test="$dingbat='lsquo'">&#x2018;</xsl:when>
+ <xsl:when test="$dingbat='rsquo'">&#x2019;</xsl:when>
+ <xsl:when test="$dingbat='em-dash'">&#x2014;</xsl:when>
+ <xsl:when test="$dingbat='mdash'">&#x2014;</xsl:when>
+ <xsl:when test="$dingbat='en-dash'">&#x2013;</xsl:when>
+ <xsl:when test="$dingbat='ndash'">&#x2013;</xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#x2022;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/htmltbl.xsl b/kdoctools/docbook/xsl/html/htmltbl.xsl
new file mode 100644
index 000000000..feb79fa6f
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/htmltbl.xsl
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="colgroup" mode="htmlTable">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="htmlTable"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="col" mode="htmlTable">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="caption" mode="htmlTable">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+
+ <xsl:apply-templates select=".." mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="thead|tbody|tgroup|tr" mode="htmlTable">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="htmlTable"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="th|td" mode="htmlTable">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/> <!-- *not* mode=htmlTable -->
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/index.xsl b/kdoctools/docbook/xsl/html/index.xsl
new file mode 100644
index 000000000..ef4b29abb
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/index.xsl
@@ -0,0 +1,196 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="index">
+ <!-- some implementations use completely empty index tags to indicate -->
+ <!-- where an automatically generated index should be inserted. so -->
+ <!-- if the index is completely empty, skip it. Unless generate.index -->
+ <!-- is non-zero, in which case, this is where the automatically -->
+ <!-- generated index should go. -->
+
+ <xsl:if test="count(*)>0 or $generate.index != '0'">
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="index.titlepage"/>
+ <xsl:apply-templates/>
+
+ <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+ <xsl:call-template name="generate-index">
+ <xsl:with-param name="scope" select="(ancestor::book|/)[last()]"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="not(parent::article)">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="setindex">
+ <!-- some implementations use completely empty index tags to indicate -->
+ <!-- where an automatically generated index should be inserted. so -->
+ <!-- if the index is completely empty, skip it. Unless generate.index -->
+ <!-- is non-zero, in which case, this is where the automatically -->
+ <!-- generated index should go. -->
+
+ <xsl:if test="count(*)>0 or $generate.index != '0'">
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="setindex.titlepage"/>
+ <xsl:apply-templates/>
+
+ <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
+ <xsl:call-template name="generate-index">
+ <xsl:with-param name="scope" select="/"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="not(parent::article)">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="index/title"></xsl:template>
+<xsl:template match="index/subtitle"></xsl:template>
+<xsl:template match="index/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexdiv">
+ <div class="{name(.)}">
+ <xsl:if test="$generate.id.attributes != 0">
+ <xsl:attribute name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="*[not(self::indexentry)]"/>
+ <dl>
+ <xsl:apply-templates select="indexentry"/>
+ </dl>
+ </div>
+</xsl:template>
+
+<xsl:template match="indexdiv/title">
+ <h3 class="{name(.)}">
+ <xsl:apply-templates/>
+ </h3>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexterm">
+ <!-- this one must have a name, even if it doesn't have an ID -->
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <a class="indexterm" name="{$id}"/>
+</xsl:template>
+
+<xsl:template match="primary|secondary|tertiary|see|seealso">
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="indexentry">
+ <xsl:apply-templates select="primaryie"/>
+</xsl:template>
+
+<xsl:template match="primaryie">
+ <dt>
+ <xsl:apply-templates/>
+ </dt>
+ <xsl:choose>
+ <xsl:when test="following-sibling::secondaryie">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="following-sibling::secondaryie"/>
+ </dl>
+ </dd>
+ </xsl:when>
+ <xsl:when test="following-sibling::seeie
+ |following-sibling::seealsoie">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="following-sibling::seeie
+ |following-sibling::seealsoie"/>
+ </dl>
+ </dd>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="secondaryie">
+ <dt>
+ <xsl:apply-templates/>
+ </dt>
+ <xsl:choose>
+ <xsl:when test="following-sibling::tertiaryie">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="following-sibling::tertiaryie"/>
+ </dl>
+ </dd>
+ </xsl:when>
+ <xsl:when test="following-sibling::seeie
+ |following-sibling::seealsoie">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="following-sibling::seeie
+ |following-sibling::seealsoie"/>
+ </dl>
+ </dd>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tertiaryie">
+ <dt>
+ <xsl:apply-templates/>
+ </dt>
+ <xsl:if test="following-sibling::seeie
+ |following-sibling::seealsoie">
+ <dd>
+ <dl>
+ <xsl:apply-templates select="following-sibling::seeie
+ |following-sibling::seealsoie"/>
+ </dl>
+ </dd>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="seeie|seealsoie">
+ <dt>
+ <xsl:apply-templates/>
+ </dt>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/info.xsl b/kdoctools/docbook/xsl/html/info.xsl
new file mode 100644
index 000000000..b1d664927
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/info.xsl
@@ -0,0 +1,53 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- These templates define the "default behavior" for info
+ elements. Even if you don't process the *info wrappers,
+ some of these elements are needed because the elements are
+ processed from named templates that are called with modes.
+ Since modes aren't sticky, these rules apply.
+ (TODO: clarify this comment) -->
+
+<!-- ==================================================================== -->
+<!-- called from named templates in a given mode -->
+
+<xsl:template match="corpauthor">
+ <span class="{name(.)}">
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="jobtitle">
+ <span class="{name(.)}">
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgname">
+ <span class="{name(.)}">
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgdiv">
+ <span class="{name(.)}">
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/inline.xsl b/kdoctools/docbook/xsl/html/inline.xsl
new file mode 100644
index 000000000..b1d1965dd
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/inline.xsl
@@ -0,0 +1,1151 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+ <!ENTITY comment.block.parents "parent::answer|parent::appendix|parent::article|parent::bibliodiv|
+ parent::bibliography|parent::blockquote|parent::caution|parent::chapter|
+ parent::glossary|parent::glossdiv|parent::important|parent::index|
+ parent::indexdiv|parent::listitem|parent::note|parent::orderedlist|
+ parent::partintro|parent::preface|parent::procedure|parent::qandadiv|
+ parent::qandaset|parent::question|parent::refentry|parent::refnamediv|
+ parent::refsect1|parent::refsect2|parent::refsect3|parent::refsection|
+ parent::refsynopsisdiv|parent::sect1|parent::sect2|parent::sect3|parent::sect4|
+ parent::sect5|parent::section|parent::setindex|parent::sidebar|
+ parent::simplesect|parent::taskprerequisites|parent::taskrelated|
+ parent::tasksummary|parent::warning">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xlink='http://www.w3.org/1999/xlink'
+ xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+ exclude-result-prefixes="xlink suwl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template name="simple.xlink">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="content">
+ <xsl:apply-templates/>
+ </xsl:param>
+
+ <xsl:variable name="link">
+ <xsl:choose>
+ <xsl:when test="$node/@xlink:href
+ and (not($node/@xlink:type) or $node/@xlink:type='simple')">
+ <a>
+ <xsl:if test="@xlink.title">
+ <xsl:attribute name="title">
+ <xsl:value-of select="@xlink:title"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:attribute name="href">
+ <xsl:choose>
+ <!-- if the href starts with # and does not contain an "(" -->
+ <!-- or if the href starts with #xpointer(id(, it's just an ID -->
+ <xsl:when test="starts-with(@xlink:href,'#')
+ and (not(contains(@xlink:href,'&#40;'))
+ or starts-with(@xlink:href,'#xpointer&#40;id&#40;'))">
+ <xsl:variable name="idref">
+ <xsl:call-template name="xpointer.idref">
+ <xsl:with-param name="xpointer" select="@xlink:href"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="targets" select="key('id',$idref)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="count($target) = 0">
+ <xsl:message>
+ <xsl:text>XLink to nonexistent id: </xsl:text>
+ <xsl:value-of select="$idref"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <!-- otherwise it's a URI -->
+ <xsl:otherwise>
+ <xsl:value-of select="@xlink:href"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:copy-of select="$content"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$content"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('suwl:unwrapLinks')">
+ <xsl:copy-of select="suwl:unwrapLinks($link)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$link"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.charseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <span class="{local-name(.)}">
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </span>
+</xsl:template>
+
+<xsl:template name="inline.monoseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <code class="{local-name(.)}">
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </code>
+</xsl:template>
+
+<xsl:template name="inline.boldseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+
+ <span>
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <!-- don't put <strong> inside figure, example, or table titles -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'title'
+ and (local-name(../..) = 'figure'
+ or local-name(../..) = 'example'
+ or local-name(../..) = 'table')">
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <strong class="{local-name(.)}">
+ <xsl:copy-of select="$content"/>
+ </strong>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+</xsl:template>
+
+<xsl:template name="inline.italicseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <em class="{local-name(.)}">
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </em>
+</xsl:template>
+
+<xsl:template name="inline.boldmonoseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <!-- don't put <strong> inside figure, example, or table titles -->
+ <!-- or other titles that may already be represented with <strong>'s. -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'title'
+ and (local-name(../..) = 'figure'
+ or local-name(../..) = 'example'
+ or local-name(../..) = 'table'
+ or local-name(../..) = 'formalpara')">
+ <code class="{local-name(.)}">
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </code>
+ </xsl:when>
+ <xsl:otherwise>
+ <strong class="{local-name(.)}">
+ <code>
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </code>
+ </strong>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="inline.italicmonoseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <em class="{local-name(.)}">
+ <code>
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </code>
+ </em>
+</xsl:template>
+
+<xsl:template name="inline.superscriptseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <sup>
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </sup>
+</xsl:template>
+
+<xsl:template name="inline.subscriptseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+ <sub>
+ <xsl:if test="@dir">
+ <xsl:attribute name="dir">
+ <xsl:value-of select="@dir"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </sub>
+</xsl:template>
+
+<!-- ==================================================================== -->
+<!-- some special cases -->
+
+<xsl:template match="author">
+ <span class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="person.name"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="editor">
+ <span class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="person.name"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othercredit">
+ <span class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="person.name"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="authorinitials">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="accel">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="action">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="application">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="classname">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="exceptionname">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="interfacename">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="methodname">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="command">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="computeroutput">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="constant">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="database">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorcode">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errorname">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortype">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="errortext">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="envar">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="filename">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="function">
+ <xsl:choose>
+ <xsl:when test="$function.parens != '0'
+ and (parameter or function or replaceable)">
+ <xsl:variable name="nodes" select="text()|*"/>
+ <xsl:call-template name="inline.monoseq">
+ <xsl:with-param name="content">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates select="$nodes[1]"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="$nodes[position()>1]"/>
+ <xsl:text>)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.monoseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="function/parameter" priority="2">
+ <xsl:call-template name="inline.italicmonoseq"/>
+ <xsl:if test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="function/replaceable" priority="2">
+ <xsl:call-template name="inline.italicmonoseq"/>
+ <xsl:if test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="guibutton">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="hardware">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interface">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="interfacedefinition">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="keycode">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="keysym">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="literal">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="code">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="medialabel">
+ <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="shortcut">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="mousebutton">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="option">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="package">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="parameter">
+ <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="property">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="prompt">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="replaceable" priority="1">
+ <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="returnvalue">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="structfield">
+ <xsl:call-template name="inline.italicmonoseq"/>
+</xsl:template>
+
+<xsl:template match="structname">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="symbol">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="systemitem">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="token">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="type">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="userinput">
+ <xsl:call-template name="inline.boldmonoseq"/>
+</xsl:template>
+
+<xsl:template match="abbrev">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="acronym">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="citerefentry">
+ <xsl:choose>
+ <xsl:when test="$citerefentry.link != '0'">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="generate.citerefentry.link"/>
+ </xsl:attribute>
+ <xsl:call-template name="inline.charseq"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.charseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.citerefentry.link">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template name="x.generate.citerefentry.link">
+ <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
+ <xsl:value-of select="refentrytitle"/>
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="manvolnum"/>
+ <xsl:text>)</xsl:text>
+</xsl:template>
+
+<xsl:template match="citetitle">
+ <xsl:choose>
+ <xsl:when test="@pubwork = 'article'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="emphasis">
+ <span>
+ <xsl:choose>
+ <xsl:when test="@role and $emphasis.propagates.style != 0">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="class">
+ <xsl:text>emphasis</xsl:text>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="anchor"/>
+
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:choose>
+ <xsl:when test="@role = 'bold' or @role='strong'">
+ <!-- backwards compatibility: make bold into b elements, but -->
+ <!-- don't put bold inside figure, example, or table titles -->
+ <xsl:choose>
+ <xsl:when test="local-name(..) = 'title'
+ and (local-name(../..) = 'figure'
+ or local-name(../..) = 'example'
+ or local-name(../..) = 'table')">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <strong><xsl:apply-templates/></strong>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="@role and $emphasis.propagates.style != 0">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <em><xsl:apply-templates/></em>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </span>
+</xsl:template>
+
+<xsl:template match="foreignphrase">
+ <span class="foreignphrase">
+ <xsl:if test="@lang or @xml:lang">
+ <xsl:call-template name="language.attribute"/>
+ </xsl:if>
+ <xsl:call-template name="inline.italicseq"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="markup">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phrase">
+ <span>
+ <xsl:if test="@lang or @xml:lang">
+ <xsl:call-template name="language.attribute"/>
+ </xsl:if>
+ <xsl:if test="@role and $phrase.propagates.style != 0">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </span>
+</xsl:template>
+
+<xsl:template match="quote">
+ <xsl:variable name="depth">
+ <xsl:call-template name="dot.count">
+ <xsl:with-param name="string"><xsl:number level="multiple"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$depth mod 2 = 0">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gentext.nestedstartquote"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:call-template name="gentext.nestedendquote"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varname">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<xsl:template match="wordasword">
+ <xsl:call-template name="inline.italicseq"/>
+</xsl:template>
+
+<xsl:template match="lineannotation">
+ <em class="{local-name(.)}">
+ <xsl:call-template name="inline.charseq"/>
+ </em>
+</xsl:template>
+
+<xsl:template match="superscript">
+ <xsl:call-template name="inline.superscriptseq"/>
+</xsl:template>
+
+<xsl:template match="subscript">
+ <xsl:call-template name="inline.subscriptseq"/>
+</xsl:template>
+
+<xsl:template match="trademark">
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:choose>
+ <xsl:when test="@class = 'copyright'
+ or @class = 'registered'">
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat" select="@class"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="@class = 'service'">
+ <sup>SM</sup>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat" select="'trademark'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="firstterm">
+ <xsl:call-template name="glossterm">
+ <xsl:with-param name="firstterm" select="1"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="glossterm" name="glossterm">
+ <xsl:param name="firstterm" select="0"/>
+
+ <!-- To avoid extra <a name=""> anchor from inline.italicseq -->
+ <xsl:variable name="content">
+ <xsl:apply-templates/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="($firstterm.only.link = 0 or $firstterm = 1) and @linkend">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:call-template name="inline.italicseq">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+
+ <xsl:when test="not(@linkend)
+ and ($firstterm.only.link = 0 or $firstterm = 1)
+ and ($glossterm.auto.link != 0)
+ and $glossary.collection != ''">
+ <xsl:variable name="term">
+ <xsl:choose>
+ <xsl:when test="@baseform"><xsl:value-of select="@baseform"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="cterm"
+ select="(document($glossary.collection,.)//glossentry[glossterm=$term])[1]"/>
+
+ <!-- HACK HACK HACK! But it works... -->
+ <!-- You'd need to do more work if you wanted to chunk on glossdiv, though -->
+
+ <xsl:variable name="glossary" select="//glossary[@role='auto']"/>
+
+ <xsl:if test="count($glossary) != 1">
+ <xsl:message>
+ <xsl:text>Warning: glossary.collection specified, but there are </xsl:text>
+ <xsl:value-of select="count($glossary)"/>
+ <xsl:text> automatic glossaries</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="glosschunk">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$glossary"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="chunkbase">
+ <xsl:choose>
+ <xsl:when test="contains($glosschunk, '#')">
+ <xsl:value-of select="substring-before($glosschunk, '#')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$glosschunk"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="not($cterm)">
+ <xsl:message>
+ <xsl:text>There's no entry for </xsl:text>
+ <xsl:value-of select="$term"/>
+ <xsl:text> in </xsl:text>
+ <xsl:value-of select="$glossary.collection"/>
+ </xsl:message>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="id">
+ <xsl:choose>
+ <xsl:when test="$cterm/@id">
+ <xsl:value-of select="$cterm/@id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="generate-id($cterm)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <a href="{$chunkbase}#{$id}">
+ <xsl:call-template name="inline.italicseq">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="not(@linkend)
+ and ($firstterm.only.link = 0 or $firstterm = 1)
+ and $glossterm.auto.link != 0">
+ <xsl:variable name="term">
+ <xsl:choose>
+ <xsl:when test="@baseform">
+ <xsl:value-of select="normalize-space(@baseform)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="normalize-space(.)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="targets"
+ select="//glossentry[normalize-space(glossterm)=$term
+ or normalize-space(glossterm/@baseform)=$term]"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:choose>
+ <xsl:when test="count($targets)=0">
+ <xsl:message>
+ <xsl:text>Error: no glossentry for glossterm: </xsl:text>
+ <xsl:value-of select="."/>
+ <xsl:text>.</xsl:text>
+ </xsl:message>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:call-template name="inline.italicseq">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="inline.italicseq"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sgmltag|tag">
+ <xsl:call-template name="format.sgmltag"/>
+</xsl:template>
+
+<xsl:template name="format.sgmltag">
+ <xsl:param name="class">
+ <xsl:choose>
+ <xsl:when test="@class">
+ <xsl:value-of select="@class"/>
+ </xsl:when>
+ <xsl:otherwise>element</xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <code class="sgmltag-{$class}">
+ <xsl:choose>
+ <xsl:when test="$class='attribute'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$class='attvalue'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$class='element'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$class='endtag'">
+ <xsl:text>&lt;/</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='genentity'">
+ <xsl:text>&amp;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='numcharref'">
+ <xsl:text>&amp;#</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='paramentity'">
+ <xsl:text>%</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='pi'">
+ <xsl:text>&lt;?</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='xmlpi'">
+ <xsl:text>&lt;?</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>?&gt;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='starttag'">
+ <xsl:text>&lt;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='emptytag'">
+ <xsl:text>&lt;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>/&gt;</xsl:text>
+ </xsl:when>
+ <xsl:when test="$class='sgmlcomment'">
+ <xsl:text>&lt;!--</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>--&gt;</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </code>
+</xsl:template>
+
+<xsl:template match="email">
+ <xsl:call-template name="inline.monoseq">
+ <xsl:with-param name="content">
+ <xsl:text>&lt;</xsl:text>
+ <a>
+ <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ <xsl:text>&gt;</xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="keycombo">
+ <xsl:variable name="action" select="@action"/>
+ <xsl:variable name="joinchar">
+ <xsl:choose>
+ <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
+ <xsl:when test="$action='simul'">+</xsl:when>
+ <xsl:when test="$action='press'">-</xsl:when>
+ <xsl:when test="$action='click'">-</xsl:when>
+ <xsl:when test="$action='double-click'">-</xsl:when>
+ <xsl:when test="$action='other'"></xsl:when>
+ <xsl:otherwise>-</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="*">
+ <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="uri">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="menuchoice">
+ <xsl:variable name="shortcut" select="./shortcut"/>
+ <xsl:call-template name="process.menuchoice"/>
+ <xsl:if test="$shortcut">
+ <xsl:text> (</xsl:text>
+ <xsl:apply-templates select="$shortcut"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.menuchoice">
+ <xsl:param name="nodelist" select="guibutton|guiicon|guilabel|guimenu|guimenuitem|guisubmenu|interface"/><!-- not(shortcut) -->
+ <xsl:param name="count" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="$count>count($nodelist)"></xsl:when>
+ <xsl:when test="$count=1">
+ <xsl:apply-templates select="$nodelist[$count=position()]"/>
+ <xsl:call-template name="process.menuchoice">
+ <xsl:with-param name="nodelist" select="$nodelist"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="node" select="$nodelist[$count=position()]"/>
+ <xsl:choose>
+ <xsl:when test="name($node)='guimenuitem'
+ or name($node)='guisubmenu'">
+ <xsl:value-of select="$menuchoice.menu.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$menuchoice.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="$node"/>
+ <xsl:call-template name="process.menuchoice">
+ <xsl:with-param name="nodelist" select="$nodelist"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="optional">
+ <xsl:value-of select="$arg.choice.opt.open.str"/>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:value-of select="$arg.choice.opt.close.str"/>
+</xsl:template>
+
+<xsl:template match="citation">
+ <!-- todo: biblio-citation-check -->
+ <xsl:text>[</xsl:text>
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:text>]</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="comment[&comment.block.parents;]|remark[&comment.block.parents;]">
+ <xsl:if test="$show.comments != 0">
+ <p class="remark"><i><xsl:call-template name="inline.charseq"/></i></p>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="comment|remark">
+ <xsl:if test="$show.comments != 0">
+ <em><xsl:call-template name="inline.charseq"/></em>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="productname">
+ <xsl:call-template name="inline.charseq"/>
+ <xsl:if test="@class">
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat" select="@class"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="productnumber">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="pob|street|city|state|postcode|country|otheraddr">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="phone|fax">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- in Addresses, for example -->
+<xsl:template match="honorific|firstname|surname|lineage|othername">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="personname">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="beginpage">
+ <!-- does nothing; this *is not* markup to force a page break. -->
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/keywords.xsl b/kdoctools/docbook/xsl/html/keywords.xsl
new file mode 100644
index 000000000..013858efc
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/keywords.xsl
@@ -0,0 +1,35 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match="keywordset"></xsl:template>
+<xsl:template match="subjectset"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="keywordset" mode="html.header">
+ <meta name="keywords">
+ <xsl:attribute name="content">
+ <xsl:apply-templates select="keyword" mode="html.header"/>
+ </xsl:attribute>
+ </meta>
+</xsl:template>
+
+<xsl:template match="keyword" mode="html.header">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::keyword">, </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/lists.xsl b/kdoctools/docbook/xsl/html/lists.xsl
new file mode 100644
index 000000000..dc09ebd3c
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/lists.xsl
@@ -0,0 +1,1087 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="itemizedlist">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <!-- Preserve order of PIs and comments -->
+ <xsl:apply-templates
+ select="*[not(self::listitem
+ or self::title
+ or self::titleabbrev)]
+ |comment()[not(preceding-sibling::listitem)]
+ |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+ <ul>
+ <xsl:if test="$css.decoration != 0">
+ <xsl:attribute name="type">
+ <xsl:call-template name="list.itemsymbol"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="@spacing='compact'">
+ <xsl:attribute name="compact">
+ <xsl:value-of select="@spacing"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates
+ select="listitem
+ |comment()[preceding-sibling::listitem]
+ |processing-instruction()[preceding-sibling::listitem]"/>
+ </ul>
+ </div>
+</xsl:template>
+
+<xsl:template match="itemizedlist/title">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="itemizedlist/listitem">
+ <xsl:variable name="mark" select="../@mark"/>
+ <xsl:variable name="override" select="@override"/>
+
+ <xsl:variable name="usemark">
+ <xsl:choose>
+ <xsl:when test="$override != ''">
+ <xsl:value-of select="$override"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$mark"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="cssmark">
+ <xsl:choose>
+ <xsl:when test="$usemark = 'opencircle'">circle</xsl:when>
+ <xsl:when test="$usemark = 'bullet'">disc</xsl:when>
+ <xsl:when test="$usemark = 'box'">square</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$usemark"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <li>
+ <xsl:if test="$css.decoration = '1' and $cssmark != ''">
+ <xsl:attribute name="style">
+ <xsl:text>list-style-type: </xsl:text>
+ <xsl:value-of select="$cssmark"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <!-- we can't just drop the anchor in since some browsers (Opera)
+ get confused about line breaks if we do. So if the first child
+ is a para, assume the para will put in the anchor. Otherwise,
+ put the anchor in anyway. -->
+ <xsl:if test="local-name(child::*[1]) != 'para'">
+ <xsl:call-template name="anchor"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <div class="{@revisionflag}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+</xsl:template>
+
+<xsl:template match="orderedlist">
+ <xsl:variable name="pi-start">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'start'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="start">
+ <xsl:choose>
+ <xsl:when test="@continuation='continues'">
+ <xsl:call-template name="orderedlist-starting-number"/>
+ </xsl:when>
+ <xsl:when test="$pi-start != ''">
+ <xsl:value-of select="$pi-start"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="numeration">
+ <xsl:call-template name="list.numeration"/>
+ </xsl:variable>
+
+ <xsl:variable name="type">
+ <xsl:choose>
+ <xsl:when test="$numeration='arabic'">1</xsl:when>
+ <xsl:when test="$numeration='loweralpha'">a</xsl:when>
+ <xsl:when test="$numeration='lowerroman'">i</xsl:when>
+ <xsl:when test="$numeration='upperalpha'">A</xsl:when>
+ <xsl:when test="$numeration='upperroman'">I</xsl:when>
+ <!-- What!? This should never happen -->
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Unexpected numeration: </xsl:text>
+ <xsl:value-of select="$numeration"/>
+ </xsl:message>
+ <xsl:value-of select="1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+
+ <xsl:if test="title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <!-- Preserve order of PIs and comments -->
+ <xsl:apply-templates
+ select="*[not(self::listitem
+ or self::title
+ or self::titleabbrev)]
+ |comment()[not(preceding-sibling::listitem)]
+ |processing-instruction()[not(preceding-sibling::listitem)]"/>
+
+ <ol>
+ <xsl:if test="$start != '1'">
+ <xsl:attribute name="start">
+ <xsl:value-of select="$start"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$numeration != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$type"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@spacing='compact'">
+ <xsl:attribute name="compact">
+ <xsl:value-of select="@spacing"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates
+ select="listitem
+ |comment()[preceding-sibling::listitem]
+ |processing-instruction()[preceding-sibling::listitem]"/>
+ </ol>
+ </div>
+</xsl:template>
+
+<xsl:template match="orderedlist/title">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="orderedlist/listitem">
+ <li>
+ <xsl:if test="@override">
+ <xsl:attribute name="value">
+ <xsl:value-of select="@override"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <!-- we can't just drop the anchor in since some browsers (Opera)
+ get confused about line breaks if we do. So if the first child
+ is a para, assume the para will put in the anchor. Otherwise,
+ put the anchor in anyway. -->
+ <xsl:if test="local-name(child::*[1]) != 'para'">
+ <xsl:call-template name="anchor"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <div class="{@revisionflag}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </li>
+</xsl:template>
+
+<xsl:template match="variablelist">
+ <xsl:variable name="pi-presentation">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-presentation'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="presentation">
+ <xsl:choose>
+ <xsl:when test="$pi-presentation != ''">
+ <xsl:value-of select="$pi-presentation"/>
+ </xsl:when>
+ <xsl:when test="$variablelist.as.table != 0">
+ <xsl:value-of select="'table'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'list'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="list-width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="term-width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'term-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="table-summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$presentation = 'table'">
+ <!-- Preserve order of PIs and comments -->
+ <xsl:apply-templates
+ select="*[not(self::varlistentry
+ or self::title
+ or self::titleabbrev)]
+ |comment()[not(preceding-sibling::varlistentry)]
+ |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+ <table border="0">
+ <xsl:if test="$list-width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$list-width"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$table-summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$table-summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <col align="left" valign="top">
+ <xsl:if test="$term-width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$term-width"/>
+ </xsl:attribute>
+ </xsl:if>
+ </col>
+ <tbody>
+ <xsl:apply-templates mode="varlist-table"
+ select="varlistentry
+ |comment()[preceding-sibling::varlistentry]
+ |processing-instruction()[preceding-sibling::varlistentry]"/>
+ </tbody>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Preserve order of PIs and comments -->
+ <xsl:apply-templates
+ select="*[not(self::varlistentry
+ or self::title
+ or self::titleabbrev)]
+ |comment()[not(preceding-sibling::varlistentry)]
+ |processing-instruction()[not(preceding-sibling::varlistentry)]"/>
+ <dl>
+ <xsl:apply-templates
+ select="varlistentry
+ |comment()[preceding-sibling::varlistentry]
+ |processing-instruction()[preceding-sibling::varlistentry]"/>
+ </dl>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:template match="variablelist/title">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="itemizedlist/titleabbrev|orderedlist/titleabbrev">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="variablelist/titleabbrev">
+ <!--nop-->
+</xsl:template>
+
+<xsl:template match="listitem" mode="xref">
+ <xsl:number format="1"/>
+</xsl:template>
+
+<xsl:template match="listitem/simpara" priority="2">
+ <!-- If a listitem contains only a single simpara, don't output
+ the <p> wrapper; this has the effect of creating an li
+ with simple text content. -->
+ <xsl:choose>
+ <xsl:when test="not(preceding-sibling::*)
+ and not (following-sibling::*)">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <p>
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="varlistentry">
+ <dt>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates select="term"/>
+ </dt>
+ <dd>
+ <xsl:apply-templates select="listitem"/>
+ </dd>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="varlist-table">
+ <xsl:variable name="presentation">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="../processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'term-presentation'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="separator">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="../processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'term-separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <tr>
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="rownum">
+ <xsl:number from="variablelist" count="varlistentry"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <td>
+ <xsl:call-template name="anchor"/>
+ <xsl:choose>
+ <xsl:when test="$presentation = 'bold'">
+ <b>
+ <xsl:apply-templates select="term"/>
+ <xsl:value-of select="$separator"/>
+ </b>
+ </xsl:when>
+ <xsl:when test="$presentation = 'italic'">
+ <i>
+ <xsl:apply-templates select="term"/>
+ <xsl:value-of select="$separator"/>
+ </i>
+ </xsl:when>
+ <xsl:when test="$presentation = 'bold-italic'">
+ <b>
+ <i>
+ <xsl:apply-templates select="term"/>
+ <xsl:value-of select="$separator"/>
+ </i>
+ </b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="term"/>
+ <xsl:value-of select="$separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td>
+ <xsl:apply-templates select="listitem"/>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="varlistentry/term">
+ <span class="term">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ <xsl:text>, </xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="varlistentry/term[position()=last()]" priority="2">
+ <span class="term">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<xsl:template match="varlistentry/listitem">
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <div class="{@revisionflag}">
+ <xsl:apply-templates/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="simplelist">
+ <!-- with no type specified, the default is 'vert' -->
+ <xsl:call-template name="anchor"/>
+ <table class="simplelist" border="0" summary="Simple list">
+ <xsl:call-template name="simplelist.vert">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']">
+ <span class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </span>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='horiz']">
+ <xsl:call-template name="anchor"/>
+ <table class="simplelist" border="0" summary="Simple list">
+ <xsl:call-template name="simplelist.horiz">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </table>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='vert']">
+ <xsl:call-template name="anchor"/>
+ <table class="simplelist" border="0" summary="Simple list">
+ <xsl:call-template name="simplelist.vert">
+ <xsl:with-param name="cols">
+ <xsl:choose>
+ <xsl:when test="@columns">
+ <xsl:value-of select="@columns"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </table>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz">
+ <xsl:param name="cols">1</xsl:param>
+ <xsl:param name="cell">1</xsl:param>
+ <xsl:param name="members" select="./member"/>
+
+ <xsl:if test="$cell &lt;= count($members)">
+ <tr>
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="row" select="$members[1]"/>
+ <xsl:with-param name="rownum" select="(($cell - 1) div $cols) + 1"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="simplelist.horiz.row">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="cell" select="$cell"/>
+ <xsl:with-param name="members" select="$members"/>
+ </xsl:call-template>
+ </tr>
+ <xsl:call-template name="simplelist.horiz">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="cell" select="$cell + $cols"/>
+ <xsl:with-param name="members" select="$members"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.horiz.row">
+ <xsl:param name="cols">1</xsl:param>
+ <xsl:param name="cell">1</xsl:param>
+ <xsl:param name="members" select="./member"/>
+ <xsl:param name="curcol">1</xsl:param>
+
+ <xsl:if test="$curcol &lt;= $cols">
+ <td>
+ <xsl:choose>
+ <xsl:when test="$members[position()=$cell]">
+ <xsl:apply-templates select="$members[position()=$cell]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#160;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <xsl:call-template name="simplelist.horiz.row">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="cell" select="$cell+1"/>
+ <xsl:with-param name="members" select="$members"/>
+ <xsl:with-param name="curcol" select="$curcol+1"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert">
+ <xsl:param name="cols">1</xsl:param>
+ <xsl:param name="cell">1</xsl:param>
+ <xsl:param name="members" select="./member"/>
+ <xsl:param name="rows"
+ select="floor((count($members)+$cols - 1) div $cols)"/>
+
+ <xsl:if test="$cell &lt;= $rows">
+ <tr>
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="row" select="$members[1]"/>
+ <xsl:with-param name="rownum" select="$cell"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="simplelist.vert.row">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="rows" select="$rows"/>
+ <xsl:with-param name="cell" select="$cell"/>
+ <xsl:with-param name="members" select="$members"/>
+ </xsl:call-template>
+ </tr>
+ <xsl:call-template name="simplelist.vert">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="cell" select="$cell+1"/>
+ <xsl:with-param name="members" select="$members"/>
+ <xsl:with-param name="rows" select="$rows"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="simplelist.vert.row">
+ <xsl:param name="cols">1</xsl:param>
+ <xsl:param name="rows">1</xsl:param>
+ <xsl:param name="cell">1</xsl:param>
+ <xsl:param name="members" select="./member"/>
+ <xsl:param name="curcol">1</xsl:param>
+
+ <xsl:if test="$curcol &lt;= $cols">
+ <td>
+ <xsl:choose>
+ <xsl:when test="$members[position()=$cell]">
+ <xsl:apply-templates select="$members[position()=$cell]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>&#160;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <xsl:call-template name="simplelist.vert.row">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="rows" select="$rows"/>
+ <xsl:with-param name="cell" select="$cell+$rows"/>
+ <xsl:with-param name="members" select="$members"/>
+ <xsl:with-param name="curcol" select="$curcol+1"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="member">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member">
+ <xsl:apply-templates/>
+ <xsl:text>, </xsl:text>
+</xsl:template>
+
+<xsl:template match="simplelist[@type='inline']/member[position()=last()]"
+ priority="2">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="procedure">
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Preserve order of PIs and comments -->
+ <xsl:variable name="preamble"
+ select="*[not(self::step
+ or self::title
+ or self::titleabbrev)]
+ |comment()[not(preceding-sibling::step)]
+ |processing-instruction()[not(preceding-sibling::step)]"/>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional">
+ <xsl:choose>
+ <xsl:when test="title">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:if test="title and $placement = 'before'">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="$preamble"/>
+
+ <xsl:choose>
+ <xsl:when test="count(step) = 1">
+ <ul>
+ <xsl:apply-templates
+ select="step
+ |comment()[preceding-sibling::step]
+ |processing-instruction()[preceding-sibling::step]"/>
+ </ul>
+ </xsl:when>
+ <xsl:otherwise>
+ <ol>
+ <xsl:attribute name="type">
+ <xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
+ </xsl:attribute>
+ <xsl:apply-templates
+ select="step
+ |comment()[preceding-sibling::step]
+ |processing-instruction()[preceding-sibling::step]"/>
+ </ol>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="title and $placement != 'before'">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="procedure/title">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="substeps">
+ <xsl:variable name="numeration">
+ <xsl:call-template name="procedure.step.numeration"/>
+ </xsl:variable>
+
+ <xsl:call-template name="anchor"/>
+
+ <ol type="{$numeration}">
+ <xsl:apply-templates/>
+ </ol>
+</xsl:template>
+
+<xsl:template match="step">
+ <li>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </li>
+</xsl:template>
+
+<xsl:template match="stepalternatives">
+ <xsl:call-template name="anchor"/>
+ <ul>
+ <xsl:apply-templates/>
+ </ul>
+</xsl:template>
+
+<xsl:template match="step/title">
+ <p class="title">
+ <b>
+ <xsl:apply-templates/>
+ </b>
+ </p>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="segmentedlist">
+ <xsl:variable name="presentation">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-presentation'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="$presentation = 'table'">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:when test="$presentation = 'list'">
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:when test="$segmentedlist.as.table != 0">
+ <xsl:apply-templates select="." mode="seglist-table"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:template match="segmentedlist/title">
+ <div class="title">
+ <strong><span class="title"><xsl:apply-templates/></span></strong>
+ </div>
+</xsl:template>
+
+<xsl:template match="segtitle">
+</xsl:template>
+
+<xsl:template match="segtitle" mode="segtitle-in-seg">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="seglistitem">
+ <div class="seglistitem">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="seg">
+ <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
+ <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
+ <xsl:variable name="segtitles" select="$seglist/segtitle"/>
+
+ <!--
+ Note: segtitle is only going to be the right thing in a well formed
+ SegmentedList. If there are too many Segs or too few SegTitles,
+ you'll get something odd...maybe an error
+ -->
+
+ <div class="seg">
+ <strong>
+ <span class="segtitle">
+ <xsl:apply-templates select="$segtitles[$segnum=position()]"
+ mode="segtitle-in-seg"/>
+ <xsl:text>: </xsl:text>
+ </span>
+ </strong>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="segmentedlist" mode="seglist-table">
+ <xsl:variable name="table-summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="list-width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'list-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates select="title"/>
+
+ <table border="0">
+ <xsl:if test="$list-width != ''">
+ <xsl:attribute name="width">
+ <xsl:value-of select="$list-width"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$table-summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$table-summary"/>
+ </xsl:attribute>
+ </xsl:if>
+ <thead>
+ <tr class="segtitle">
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="row" select="segtitle[1]"/>
+ <xsl:with-param name="rownum" select="1"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="segtitle" mode="seglist-table"/>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:apply-templates select="seglistitem" mode="seglist-table"/>
+ </tbody>
+ </table>
+</xsl:template>
+
+<xsl:template match="segtitle" mode="seglist-table">
+ <th><xsl:apply-templates/></th>
+</xsl:template>
+
+<xsl:template match="seglistitem" mode="seglist-table">
+ <xsl:variable name="seglinum">
+ <xsl:number from="segmentedlist" count="seglistitem"/>
+ </xsl:variable>
+
+ <tr class="seglistitem">
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="rownum" select="$seglinum + 1"/>
+ </xsl:call-template>
+ <xsl:apply-templates mode="seglist-table"/>
+ </tr>
+</xsl:template>
+
+<xsl:template match="seg" mode="seglist-table">
+ <td class="seg"><xsl:apply-templates/></td>
+</xsl:template>
+
+<xsl:template match="seg[1]" mode="seglist-table">
+ <td class="seg">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="ancestor::seglistitem"/>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </td>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="calloutlist">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="title">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <!-- Preserve order of PIs and comments -->
+ <xsl:apply-templates
+ select="*[not(self::callout or self::title or self::titleabbrev)]
+ |comment()[not(preceding-sibling::callout)]
+ |processing-instruction()[not(preceding-sibling::callout)]"/>
+
+ <xsl:choose>
+ <xsl:when test="$callout.list.table != 0">
+ <table border="0" summary="Callout list">
+ <xsl:apply-templates select="callout
+ |comment()[preceding-sibling::calllout]
+ |processing-instruction()[preceding-sibling::callout]"/>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <dl compact="compact">
+ <xsl:apply-templates select="callout
+ |comment()[preceding-sibling::calllout]
+ |processing-instruction()[preceding-sibling::callout]"/>
+ </dl>
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+</xsl:template>
+
+<xsl:template match="calloutlist/title">
+</xsl:template>
+
+<xsl:template match="callout">
+ <xsl:choose>
+ <xsl:when test="$callout.list.table != 0">
+ <tr>
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="rownum">
+ <xsl:number from="calloutlist" count="callout"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <td width="5%" valign="top" align="left">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="callout.arearefs">
+ <xsl:with-param name="arearefs" select="@arearefs"/>
+ </xsl:call-template>
+ </td>
+ <td valign="top" align="left">
+ <xsl:apply-templates/>
+ </td>
+ </tr>
+ </xsl:when>
+ <xsl:otherwise>
+ <dt>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="callout.arearefs">
+ <xsl:with-param name="arearefs" select="@arearefs"/>
+ </xsl:call-template>
+ </dt>
+ <dd><xsl:apply-templates/></dd>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="callout/simpara" priority="2">
+ <!-- If a callout contains only a single simpara, don't output
+ the <p> wrapper; this has the effect of creating an li
+ with simple text content. -->
+ <xsl:choose>
+ <xsl:when test="not(preceding-sibling::*)
+ and not (following-sibling::*)">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <p>
+ <xsl:if test="@role and $para.propagates.style != 0">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </p>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="callout.arearefs">
+ <xsl:param name="arearefs"></xsl:param>
+ <xsl:if test="$arearefs!=''">
+ <xsl:choose>
+ <xsl:when test="substring-before($arearefs,' ')=''">
+ <xsl:call-template name="callout.arearef">
+ <xsl:with-param name="arearef" select="$arearefs"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="callout.arearef">
+ <xsl:with-param name="arearef"
+ select="substring-before($arearefs,' ')"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="callout.arearefs">
+ <xsl:with-param name="arearefs"
+ select="substring-after($arearefs,' ')"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="callout.arearef">
+ <xsl:param name="arearef"></xsl:param>
+ <xsl:variable name="targets" select="key('id',$arearef)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="$arearef"/>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="count($target)=0">
+ <xsl:text>???</xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($target)='co'">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>#</xsl:text>
+ <xsl:value-of select="$arearef"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target" mode="callout-bug"/>
+ </a>
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:when test="local-name($target)='areaset'">
+ <xsl:call-template name="callout-bug">
+ <xsl:with-param name="conum">
+ <xsl:apply-templates select="$target" mode="conumber"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="local-name($target)='area'">
+ <xsl:choose>
+ <xsl:when test="$target/parent::areaset">
+ <xsl:call-template name="callout-bug">
+ <xsl:with-param name="conum">
+ <xsl:apply-templates select="$target/parent::areaset"
+ mode="conumber"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="callout-bug">
+ <xsl:with-param name="conum">
+ <xsl:apply-templates select="$target" mode="conumber"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/maketoc.xsl b/kdoctools/docbook/xsl/html/maketoc.xsl
new file mode 100644
index 000000000..d4d63fbec
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/maketoc.xsl
@@ -0,0 +1,83 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk.xsl"/>
+
+<xsl:output method="xml" indent="no" encoding='utf-8'/>
+
+<xsl:param name="toc.list.type" select="'tocentry'"/>
+
+<!-- refentry in autotoc.xsl does not use subtoc, so must
+ handle it explicitly here. -->
+<xsl:template match="refentry" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ </xsl:call-template>
+</xsl:template>
+
+
+<xsl:template name="subtoc">
+ <xsl:param name="nodes" select="NOT-AN-ELEMENT"/>
+ <xsl:variable name="filename">
+ <xsl:apply-templates select="." mode="chunk-filename"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:if test="$chunk != 0">
+ <xsl:call-template name="indent-spaces"/>
+ <tocentry linkend="{@id}">
+ <xsl:processing-instruction name="dbhtml">
+ <xsl:text>filename="</xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:text>"</xsl:text>
+ </xsl:processing-instruction>
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:apply-templates mode="toc" select="$nodes"/>
+ <xsl:call-template name="indent-spaces"/>
+ </tocentry>
+ <xsl:text>&#xA;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="indent-spaces">
+ <xsl:param name="node" select="."/>
+ <xsl:text> </xsl:text>
+ <xsl:if test="$node/parent::*">
+ <xsl:call-template name="indent-spaces">
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="/" priority="-1">
+ <xsl:text>&#xA;</xsl:text>
+ <toc role="chunk-toc">
+ <xsl:text>&#xA;</xsl:text>
+ <xsl:apply-templates select="/" mode="toc"/>
+ </toc>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/manifest.xsl b/kdoctools/docbook/xsl/html/manifest.xsl
new file mode 100644
index 000000000..a546a0ea6
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/manifest.xsl
@@ -0,0 +1,120 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="manifest.base.dir">
+</xsl:variable>
+
+<xsl:template name="generate.manifest">
+ <xsl:param name="node" select="/"/>
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename">
+ <xsl:if test="$manifest.in.base.dir != 0">
+ <xsl:value-of select="$base.dir"/>
+ </xsl:if>
+ <xsl:value-of select="$manifest"/>
+ </xsl:with-param>
+ <xsl:with-param name="method" select="'text'"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates select="$node" mode="enumerate-files"/>
+ </xsl:with-param>
+ <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="set|book|part|preface|chapter|appendix
+ |article
+ |reference|refentry
+ |sect1|sect2|sect3|sect4|sect5
+ |section
+ |book/glossary|article/glossary|part/glossary
+ |book/bibliography|article/bibliography|part/bibliography
+ |colophon"
+ mode="enumerate-files">
+ <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
+ <xsl:if test="$ischunk='1'">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir">
+ <xsl:if test="$manifest.in.base.dir = 0">
+ <xsl:value-of select="$base.dir"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="base.name">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="*" mode="enumerate-files"/>
+</xsl:template>
+
+<xsl:template match="book/index|article/index|part/index"
+ mode="enumerate-files">
+ <xsl:if test="$htmlhelp.output != 1">
+ <xsl:variable name="ischunk"><xsl:call-template name="chunk"/></xsl:variable>
+ <xsl:if test="$ischunk='1'">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir">
+ <xsl:if test="$manifest.in.base.dir = 0">
+ <xsl:value-of select="$base.dir"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="base.name">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="*" mode="enumerate-files"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="enumerate-files">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:if test="$generate.legalnotice.link != 0">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir">
+ <xsl:if test="$manifest.in.base.dir = 0">
+ <xsl:value-of select="$base.dir"/>
+ </xsl:if>
+ </xsl:with-param>
+ <xsl:with-param name="base.name" select="concat('ln-',$id,$html.ext)"/>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="mediaobject[imageobject] | inlinemediaobject[imageobject]" mode="enumerate-files">
+ <xsl:variable name="longdesc.uri">
+ <xsl:call-template name="longdesc.uri">
+ <xsl:with-param name="mediaobject"
+ select="."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="mediaobject" select="."/>
+
+ <xsl:if test="$html.longdesc != 0 and $mediaobject/textobject[not(phrase)]">
+ <xsl:call-template name="longdesc.uri">
+ <xsl:with-param name="mediaobject" select="$mediaobject"/>
+ </xsl:call-template>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="enumerate-files">
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/math.xsl b/kdoctools/docbook/xsl/html/math.xsl
new file mode 100644
index 000000000..b8d30e994
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/math.xsl
@@ -0,0 +1,262 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match="inlineequation">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="alt">
+</xsl:template>
+
+<!-- "Support" for MathML -->
+
+<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+<!-- Support for TeX math in alt -->
+
+<xsl:template match="*" mode="collect.tex.math">
+ <xsl:call-template name="write.text.chunk">
+ <xsl:with-param name="filename" select="$tex.math.file"/>
+ <xsl:with-param name="method" select="'text'"/>
+ <xsl:with-param name="content">
+ <xsl:choose>
+ <xsl:when test="$tex.math.in.alt = 'plain'">
+ <xsl:call-template name="tex.math.plain.head"/>
+ <xsl:apply-templates select="." mode="collect.tex.math.plain"/>
+ <xsl:call-template name="tex.math.plain.tail"/>
+ </xsl:when>
+ <xsl:when test="$tex.math.in.alt = 'latex'">
+ <xsl:call-template name="tex.math.latex.head"/>
+ <xsl:apply-templates select="." mode="collect.tex.math.latex"/>
+ <xsl:call-template name="tex.math.latex.tail"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ Unsupported TeX math notation:
+ <xsl:value-of select="$tex.math.in.alt"/>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- PlainTeX -->
+
+<xsl:template name="tex.math.plain.head">
+ <xsl:text>\nopagenumbers &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template name="tex.math.plain.tail">
+ <xsl:text>\bye &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="inlineequation" mode="collect.tex.math.plain">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="graphic">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select="graphic"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="select.mediaobject.filename">
+ <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.delims">
+ <xsl:call-template name="tex.math.output.delims"/>
+ </xsl:variable>
+ <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+ <xsl:if test="$tex">
+ <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:text>} &#xA;</xsl:text>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$tex"/>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$ &#xA;</xsl:text>
+ </xsl:if>
+ <xsl:text>\vfill\eject &#xA;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="equation|informalequation" mode="collect.tex.math.plain">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="graphic">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select="graphic"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="select.mediaobject.filename">
+ <xsl:with-param name="olist" select="mediaobject/*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.delims">
+ <xsl:call-template name="tex.math.output.delims"/>
+ </xsl:variable>
+ <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+ <xsl:if test="$tex">
+ <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:text>} &#xA;</xsl:text>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$$</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$tex"/>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$$ &#xA;</xsl:text>
+ </xsl:if>
+ <xsl:text>\vfill\eject &#xA;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="collect.tex.math.plain"/>
+
+<!-- LaTeX -->
+
+<xsl:template name="tex.math.latex.head">
+ <xsl:text>\documentclass{article} &#xA;</xsl:text>
+ <xsl:text>\pagestyle{empty} &#xA;</xsl:text>
+ <xsl:text>\begin{document} &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template name="tex.math.latex.tail">
+ <xsl:text>\end{document} &#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="inlineequation" mode="collect.tex.math.latex">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="graphic">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select="graphic"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="select.mediaobject.filename">
+ <xsl:with-param name="olist" select="inlinemediaobject/*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.delims">
+ <xsl:call-template name="tex.math.output.delims"/>
+ </xsl:variable>
+ <xsl:variable name="tex" select="alt[@role='tex'] | inlinemediaobject/textobject[@role='tex']"/>
+ <xsl:if test="$tex">
+ <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:text>} &#xA;</xsl:text>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$tex"/>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$ &#xA;</xsl:text>
+ </xsl:if>
+ <xsl:text>\newpage &#xA;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="equation|informalequation" mode="collect.tex.math.latex">
+ <xsl:variable name="filename">
+ <xsl:choose>
+ <xsl:when test="graphic">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object" select="graphic"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="select.mediaobject.filename">
+ <xsl:with-param name="olist" select="mediaobject/*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="output.delims">
+ <xsl:call-template name="tex.math.output.delims"/>
+ </xsl:variable>
+ <xsl:variable name="tex" select="alt[@role='tex'] | mediaobject/textobject[@role='tex']"/>
+ <xsl:if test="$tex">
+ <xsl:text>\special{dvi2bitmap outputfile </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:text>} &#xA;</xsl:text>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$$</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="$tex"/>
+ <xsl:if test="$output.delims != 0">
+ <xsl:text>$$ &#xA;</xsl:text>
+ </xsl:if>
+ <xsl:text>\newpage &#xA;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="text()" mode="collect.tex.math.latex"/>
+
+<!-- Extracting image filename from mediaobject and graphic elements -->
+
+<xsl:template name="select.mediaobject.filename">
+ <xsl:param name="olist"
+ select="imageobject|imageobjectco
+ |videoobject|audioobject|textobject"/>
+
+ <xsl:variable name="mediaobject.index">
+ <xsl:call-template name="select.mediaobject.index">
+ <xsl:with-param name="olist" select="$olist"/>
+ <xsl:with-param name="count" select="1"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="$mediaobject.index != ''">
+ <xsl:call-template name="mediaobject.filename">
+ <xsl:with-param name="object"
+ select="$olist[position() = $mediaobject.index]"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="tex.math.output.delims">
+ <xsl:variable name="pi.delims">
+ <xsl:call-template name="pi-attribute">
+ <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
+ <xsl:with-param name="attribute" select="'delims'"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="result">
+ <xsl:choose>
+ <xsl:when test="$pi.delims = 'no'">0</xsl:when>
+ <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="$result"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/oldchunker.xsl b/kdoctools/docbook/xsl/html/oldchunker.xsl
new file mode 100644
index 000000000..b9f0fed96
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/oldchunker.xsl
@@ -0,0 +1,202 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:saxon="http://icl.com/saxon"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.1"
+ exclude-result-prefixes="doc"
+ extension-element-prefixes="saxon xalanredirect lxslt">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- This stylesheet works with Saxon and Xalan; for XT use xtchunker.xsl -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="default.encoding" select="'ISO-8859-1'" doc:type='string'/>
+
+<doc:param name="default.encoding" xmlns="">
+<refpurpose>Encoding used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This encoding is used in files generated by chunking stylesheet. Currently
+only Saxon is able to change output encoding.
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:param name="saxon.character.representation" select="'entity;decimal'" doc:type='string'/>
+
+<doc:param name="saxon.character.representation" xmlns="">
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+<refdescription>
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation
+in default.encoding, set this parameter to value <literal>native</literal>.
+</para>
+</refdescription>
+</doc:param>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make-relative-filename">
+ <xsl:param name="base.dir" select="'./'"/>
+ <xsl:param name="base.name" select="''"/>
+
+ <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($vendor, 'SAXON')">
+ <!-- Saxon doesn't make the chunks relative -->
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
+ </xsl:when>
+ <xsl:when test="contains($vendor, 'Apache')">
+ <!-- Xalan doesn't make the chunks relative -->
+ <xsl:value-of select="concat($base.dir,$base.name)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>Chunking isn't supported with </xsl:text>
+ <xsl:value-of select="$vendor"/>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk">
+ <xsl:param name="filename" select="''"/>
+ <xsl:param name="method" select="'html'"/>
+ <xsl:param name="encoding" select="$default.encoding"/>
+ <xsl:param name="indent" select="'no'"/>
+ <xsl:param name="content" select="''"/>
+
+ <xsl:message>
+ <xsl:text>Writing </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:if test="name(.) != ''">
+ <xsl:text> for </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="@id">
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ </xsl:message>
+
+ <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($vendor, 'SAXON 6.2')">
+ <!-- Saxon 6.2.x uses xsl:document -->
+ <xsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ saxon:character-representation="{$saxon.character.representation}">
+ <xsl:copy-of select="$content"/>
+ </xsl:document>
+ </xsl:when>
+ <xsl:when test="contains($vendor, 'SAXON')">
+ <!-- Saxon uses saxon:output -->
+ <saxon:output file="{$filename}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ saxon:character-representation="{$saxon.character.representation}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="contains($vendor, 'Apache')">
+ <!-- Xalan uses xalanredirect -->
+ <xalanredirect:write file="{$filename}">
+ <xsl:copy-of select="$content"/>
+ </xalanredirect:write>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- it doesn't matter since we won't be making chunks... -->
+ <xsl:message terminate="yes">
+ <xsl:text>Can't make chunks with </xsl:text>
+ <xsl:value-of select="$vendor"/>
+ <xsl:text>'s processor.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="write.chunk.with.doctype">
+ <xsl:param name="filename" select="''"/>
+ <xsl:param name="method" select="'html'"/>
+ <xsl:param name="encoding" select="$default.encoding"/>
+ <xsl:param name="indent" select="'no'"/>
+ <xsl:param name="doctype-public" select="''"/>
+ <xsl:param name="doctype-system" select="''"/>
+ <xsl:param name="content" select="''"/>
+
+ <xsl:message>
+ <xsl:text>Writing </xsl:text>
+ <xsl:value-of select="$filename"/>
+ <xsl:if test="name(.) != ''">
+ <xsl:text> for </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ </xsl:if>
+ </xsl:message>
+
+ <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($vendor, 'SAXON 6.2')">
+ <!-- Saxon 6.2.x uses xsl:document -->
+ <xsl:document href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ saxon:character-representation="{$saxon.character.representation}">
+ <xsl:copy-of select="$content"/>
+ </xsl:document>
+ </xsl:when>
+ <xsl:when test="contains($vendor, 'SAXON')">
+ <!-- Saxon uses saxon:output -->
+ <saxon:output file="{$filename}"
+ href="{$filename}"
+ method="{$method}"
+ encoding="{$encoding}"
+ indent="{$indent}"
+ doctype-public="{$doctype-public}"
+ doctype-system="{$doctype-system}"
+ saxon:character-representation="{$saxon.character.representation}">
+ <xsl:copy-of select="$content"/>
+ </saxon:output>
+ </xsl:when>
+ <xsl:when test="contains($vendor, 'Apache')">
+ <!-- Xalan uses xalanredirect -->
+ <xalanredirect:write file="{$filename}">
+ <xsl:copy-of select="$content"/>
+ </xalanredirect:write>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- it doesn't matter since we won't be making chunks... -->
+ <xsl:message terminate="yes">
+ <xsl:text>Can't make chunks with </xsl:text>
+ <xsl:value-of select="$vendor"/>
+ <xsl:text>'s processor.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/onechunk.xsl b/kdoctools/docbook/xsl/html/onechunk.xsl
new file mode 100644
index 000000000..5f0c005c9
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/onechunk.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="chunk.xsl"/>
+
+<!-- Ok, using the onechunk parameter makes this all work again. -->
+<!-- It does have the disadvantage that it only works for documents that have -->
+<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
+<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
+
+<xsl:param name="onechunk" select="1"/>
+<xsl:param name="suppress.navigation">1</xsl:param>
+
+<xsl:template name="href.target.uri">
+ <xsl:param name="object" select="."/>
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/param.ent b/kdoctools/docbook/xsl/html/param.ent
new file mode 100644
index 000000000..c42256b02
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/param.ent
@@ -0,0 +1,269 @@
+<!ENTITY admon.graphics SYSTEM "../params/admon.graphics.xml">
+<!ENTITY admon.graphics.extension SYSTEM "../params/admon.graphics.extension.xml">
+<!ENTITY admon.graphics.path SYSTEM "../params/admon.graphics.path.xml">
+<!ENTITY admon.textlabel SYSTEM "../params/admon.textlabel.xml">
+<!ENTITY admon.style SYSTEM "../params/admon.style.xml">
+<!ENTITY annotate.toc SYSTEM "../params/annotate.toc.xml">
+<!ENTITY appendix.autolabel SYSTEM "../params/appendix.autolabel.xml">
+<!ENTITY author.othername.in.middle SYSTEM "../params/author.othername.in.middle.xml">
+<!ENTITY autotoc.label.separator SYSTEM "../params/autotoc.label.separator.xml">
+<!ENTITY base.dir SYSTEM "../params/base.dir.xml">
+<!ENTITY biblioentry.item.separator SYSTEM "../params/biblioentry.item.separator.xml">
+<!ENTITY bibliography.collection SYSTEM "../params/bibliography.collection.xml">
+<!ENTITY bridgehead.in.toc SYSTEM "../params/bridgehead.in.toc.xml">
+<!ENTITY callout.defaultcolumn SYSTEM "../params/callout.defaultcolumn.xml">
+<!ENTITY callout.graphics SYSTEM "../params/callout.graphics.xml">
+<!ENTITY callout.graphics.extension SYSTEM "../params/callout.graphics.extension.xml">
+<!ENTITY callout.graphics.number.limit SYSTEM "../params/callout.graphics.number.limit.xml">
+<!ENTITY callout.graphics.path SYSTEM "../params/callout.graphics.path.xml">
+<!ENTITY callout.list.table SYSTEM "../params/callout.list.table.xml">
+<!ENTITY callout.unicode SYSTEM "../params/callout.unicode.xml">
+<!ENTITY callout.unicode.number.limit SYSTEM "../params/callout.unicode.number.limit.xml">
+<!ENTITY callout.unicode.start.character SYSTEM "../params/callout.unicode.start.character.xml">
+<!ENTITY callouts.extension SYSTEM "../params/callouts.extension.xml">
+<!ENTITY chapter.autolabel SYSTEM "../params/chapter.autolabel.xml">
+<!ENTITY chunk.first.sections SYSTEM "../params/chunk.first.sections.xml">
+<!ENTITY chunk.quietly SYSTEM "../params/chunk.quietly.xml">
+<!ENTITY chunk.section.depth SYSTEM "../params/chunk.section.depth.xml">
+<!ENTITY chunk.separate.lots SYSTEM "../params/chunk.separate.lots.xml">
+<!ENTITY chunk.toc SYSTEM "../params/chunk.toc.xml">
+<!ENTITY chunker.output.cdata-section-elements SYSTEM "../params/chunker.output.cdata-section-elements.xml">
+<!ENTITY chunker.output.doctype-public SYSTEM "../params/chunker.output.doctype-public.xml">
+<!ENTITY chunker.output.doctype-system SYSTEM "../params/chunker.output.doctype-system.xml">
+<!ENTITY chunker.output.encoding SYSTEM "../params/chunker.output.encoding.xml">
+<!ENTITY chunker.output.indent SYSTEM "../params/chunker.output.indent.xml">
+<!ENTITY chunker.output.media-type SYSTEM "../params/chunker.output.media-type.xml">
+<!ENTITY chunker.output.method SYSTEM "../params/chunker.output.method.xml">
+<!ENTITY chunker.output.omit-xml-declaration SYSTEM "../params/chunker.output.omit-xml-declaration.xml">
+<!ENTITY chunker.output.standalone SYSTEM "../params/chunker.output.standalone.xml">
+<!ENTITY citerefentry.link SYSTEM "../params/citerefentry.link.xml">
+<!ENTITY collect.xref.targets SYSTEM "../params/collect.xref.targets.xml">
+<!ENTITY css.decoration SYSTEM "../params/css.decoration.xml">
+<!ENTITY current.docid SYSTEM "../params/current.docid.xml">
+<!ENTITY default.table.width SYSTEM "../params/default.table.width.xml">
+<!ENTITY draft.mode SYSTEM "../params/draft.mode.xml">
+<!ENTITY draft.watermark.image SYSTEM "../params/draft.watermark.image.xml">
+<!ENTITY ebnf.table.bgcolor SYSTEM "../params/ebnf.table.bgcolor.xml">
+<!ENTITY ebnf.table.border SYSTEM "../params/ebnf.table.border.xml">
+<!ENTITY emphasis.propagates.style SYSTEM "../params/emphasis.propagates.style.xml">
+<!ENTITY firstterm.only.link SYSTEM "../params/firstterm.only.link.xml">
+<!ENTITY footer.rule SYSTEM "../params/footer.rule.xml">
+<!ENTITY formal.procedures SYSTEM "../params/formal.procedures.xml">
+<!ENTITY formal.title.placement SYSTEM "../params/formal.title.placement.xml">
+<!ENTITY funcsynopsis.decoration SYSTEM "../params/funcsynopsis.decoration.xml">
+<!ENTITY funcsynopsis.style SYSTEM "../params/funcsynopsis.style.xml">
+<!ENTITY function.parens SYSTEM "../params/function.parens.xml">
+<!ENTITY generate.id.attributes SYSTEM "../params/generate.id.attributes.xml">
+<!ENTITY generate.index SYSTEM "../params/generate.index.xml">
+<!ENTITY generate.legalnotice.link SYSTEM "../params/generate.legalnotice.link.xml">
+<!ENTITY generate.manifest SYSTEM "../params/generate.manifest.xml">
+<!ENTITY generate.meta.abstract SYSTEM "../params/generate.meta.abstract.xml">
+<!ENTITY generate.section.toc.level SYSTEM "../params/generate.section.toc.level.xml">
+<!ENTITY generate.toc SYSTEM "../params/generate.toc.xml">
+<!ENTITY glossary.collection SYSTEM "../params/glossary.collection.xml">
+<!ENTITY glossterm.auto.link SYSTEM "../params/glossterm.auto.link.xml">
+<!ENTITY graphic.default.extension SYSTEM "../params/graphic.default.extension.xml">
+<!ENTITY header.rule SYSTEM "../params/header.rule.xml">
+<!ENTITY html.base SYSTEM "../params/html.base.xml">
+<!ENTITY html.cleanup SYSTEM "../params/html.cleanup.xml">
+<!ENTITY html.ext SYSTEM "../params/html.ext.xml">
+<!ENTITY html.extra.head.links SYSTEM "../params/html.extra.head.links.xml">
+<!ENTITY html.longdesc SYSTEM "../params/html.longdesc.xml">
+<!ENTITY html.longdesc.link SYSTEM "../params/html.longdesc.link.xml">
+<!ENTITY html.stylesheet SYSTEM "../params/html.stylesheet.xml">
+<!ENTITY html.stylesheet.type SYSTEM "../params/html.stylesheet.type.xml">
+<!ENTITY htmlhelp.alias.file SYSTEM "../params/htmlhelp.alias.file.xml">
+<!ENTITY htmlhelp.autolabel SYSTEM "../params/htmlhelp.autolabel.xml">
+<!ENTITY htmlhelp.button.back SYSTEM "../params/htmlhelp.button.back.xml">
+<!ENTITY htmlhelp.button.forward SYSTEM "../params/htmlhelp.button.forward.xml">
+<!ENTITY htmlhelp.button.hideshow SYSTEM "../params/htmlhelp.button.hideshow.xml">
+<!ENTITY htmlhelp.button.home SYSTEM "../params/htmlhelp.button.home.xml">
+<!ENTITY htmlhelp.button.home.url SYSTEM "../params/htmlhelp.button.home.url.xml">
+<!ENTITY htmlhelp.button.jump1 SYSTEM "../params/htmlhelp.button.jump1.xml">
+<!ENTITY htmlhelp.button.jump1.title SYSTEM "../params/htmlhelp.button.jump1.title.xml">
+<!ENTITY htmlhelp.button.jump1.url SYSTEM "../params/htmlhelp.button.jump1.url.xml">
+<!ENTITY htmlhelp.button.jump2 SYSTEM "../params/htmlhelp.button.jump2.xml">
+<!ENTITY htmlhelp.button.jump2.title SYSTEM "../params/htmlhelp.button.jump2.title.xml">
+<!ENTITY htmlhelp.button.jump2.url SYSTEM "../params/htmlhelp.button.jump2.url.xml">
+<!ENTITY htmlhelp.button.locate SYSTEM "../params/htmlhelp.button.locate.xml">
+<!ENTITY htmlhelp.button.next SYSTEM "../params/htmlhelp.button.next.xml">
+<!ENTITY htmlhelp.button.options SYSTEM "../params/htmlhelp.button.options.xml">
+<!ENTITY htmlhelp.button.prev SYSTEM "../params/htmlhelp.button.prev.xml">
+<!ENTITY htmlhelp.button.print SYSTEM "../params/htmlhelp.button.print.xml">
+<!ENTITY htmlhelp.button.refresh SYSTEM "../params/htmlhelp.button.refresh.xml">
+<!ENTITY htmlhelp.button.stop SYSTEM "../params/htmlhelp.button.stop.xml">
+<!ENTITY htmlhelp.button.zoom SYSTEM "../params/htmlhelp.button.zoom.xml">
+<!ENTITY htmlhelp.chm SYSTEM "../params/htmlhelp.chm.xml">
+<!ENTITY htmlhelp.default.topic SYSTEM "../params/htmlhelp.default.topic.xml">
+<!ENTITY htmlhelp.display.progress SYSTEM "../params/htmlhelp.display.progress.xml">
+<!ENTITY htmlhelp.encoding SYSTEM "../params/htmlhelp.encoding.xml">
+<!ENTITY htmlhelp.enhanced.decompilation SYSTEM "../params/htmlhelp.enhanced.decompilation.xml">
+<!ENTITY htmlhelp.enumerate.images SYSTEM "../params/htmlhelp.enumerate.images.xml">
+<!ENTITY htmlhelp.force.map.and.alias SYSTEM "../params/htmlhelp.force.map.and.alias.xml">
+<!ENTITY htmlhelp.hhc SYSTEM "../params/htmlhelp.hhc.xml">
+<!ENTITY htmlhelp.hhc.binary SYSTEM "../params/htmlhelp.hhc.binary.xml">
+<!ENTITY htmlhelp.hhc.folders.instead.books SYSTEM "../params/htmlhelp.hhc.folders.instead.books.xml">
+<!ENTITY htmlhelp.hhc.section.depth SYSTEM "../params/htmlhelp.hhc.section.depth.xml">
+<!ENTITY htmlhelp.hhc.show.root SYSTEM "../params/htmlhelp.hhc.show.root.xml">
+<!ENTITY htmlhelp.hhc.width SYSTEM "../params/htmlhelp.hhc.width.xml">
+<!ENTITY htmlhelp.hhp.windows SYSTEM "../params/htmlhelp.hhp.windows.xml">
+<!ENTITY htmlhelp.hhk SYSTEM "../params/htmlhelp.hhk.xml">
+<!ENTITY htmlhelp.hhp SYSTEM "../params/htmlhelp.hhp.xml">
+<!ENTITY htmlhelp.hhp.tail SYSTEM "../params/htmlhelp.hhp.tail.xml">
+<!ENTITY htmlhelp.hhp.window SYSTEM "../params/htmlhelp.hhp.window.xml">
+<!ENTITY htmlhelp.map.file SYSTEM "../params/htmlhelp.map.file.xml">
+<!ENTITY htmlhelp.only SYSTEM "../params/htmlhelp.only.xml">
+<!ENTITY htmlhelp.remember.window.position SYSTEM "../params/htmlhelp.remember.window.position.xml">
+<!ENTITY htmlhelp.show.advanced.search SYSTEM "../params/htmlhelp.show.advanced.search.xml">
+<!ENTITY htmlhelp.show.favorities SYSTEM "../params/htmlhelp.show.favorities.xml">
+<!ENTITY htmlhelp.show.menu SYSTEM "../params/htmlhelp.show.menu.xml">
+<!ENTITY htmlhelp.show.toolbar.text SYSTEM "../params/htmlhelp.show.toolbar.text.xml">
+<!ENTITY htmlhelp.title SYSTEM "../params/htmlhelp.title.xml">
+<!ENTITY htmlhelp.use.hhk SYSTEM "../params/htmlhelp.use.hhk.xml">
+<!ENTITY htmlhelp.window.geometry SYSTEM "../params/htmlhelp.window.geometry.xml">
+<!ENTITY img.src.path SYSTEM "../params/img.src.path.xml">
+<!ENTITY index.on.role SYSTEM "../params/index.on.role.xml">
+<!ENTITY index.prefer.titleabbrev SYSTEM "../params/index.prefer.titleabbrev.xml">
+<!ENTITY index.on.type SYSTEM "../params/index.on.type.xml">
+<!ENTITY inherit.keywords SYSTEM "../params/inherit.keywords.xml">
+<!ENTITY label.from.part SYSTEM "../params/label.from.part.xml">
+<!ENTITY linenumbering.everyNth SYSTEM "../params/linenumbering.everyNth.xml">
+<!ENTITY linenumbering.extension SYSTEM "../params/linenumbering.extension.xml">
+<!ENTITY linenumbering.separator SYSTEM "../params/linenumbering.separator.xml">
+<!ENTITY linenumbering.width SYSTEM "../params/linenumbering.width.xml">
+<!ENTITY link.mailto.url SYSTEM "../params/link.mailto.url.xml">
+<!ENTITY make.graphic.viewport SYSTEM "../params/make.graphic.viewport.xml">
+<!ENTITY make.single.year.ranges SYSTEM "../params/make.single.year.ranges.xml">
+<!ENTITY make.valid.html SYSTEM "../params/make.valid.html.xml">
+<!ENTITY make.year.ranges SYSTEM "../params/make.year.ranges.xml">
+<!ENTITY manifest SYSTEM "../params/manifest.xml">
+<!ENTITY manifest.in.base.dir SYSTEM "../params/manifest.in.base.dir.xml">
+<!ENTITY manual.toc SYSTEM "../params/manual.toc.xml">
+<!ENTITY navig.graphics SYSTEM "../params/navig.graphics.xml">
+<!ENTITY navig.graphics.extension SYSTEM "../params/navig.graphics.extension.xml">
+<!ENTITY navig.graphics.path SYSTEM "../params/navig.graphics.path.xml">
+<!ENTITY navig.showtitles SYSTEM "../params/navig.showtitles.xml">
+<!ENTITY nominal.image.depth SYSTEM "../params/nominal.image.depth.xml">
+<!ENTITY nominal.image.width SYSTEM "../params/nominal.image.width.xml">
+<!ENTITY nominal.table.width SYSTEM "../params/nominal.table.width.xml">
+<!ENTITY olink.base.uri SYSTEM "../params/olink.base.uri.xml">
+<!ENTITY olink.doctitle SYSTEM "../params/olink.doctitle.xml">
+<!ENTITY olink.properties SYSTEM "../params/olink.properties.xml">
+<!ENTITY olink.debug SYSTEM "../params/olink.debug.xml">
+<!ENTITY prefer.internal.olink SYSTEM "../params/prefer.internal.olink.xml">
+<!ENTITY insert.olink.page.number SYSTEM "../params/insert.olink.page.number.xml">
+<!ENTITY insert.olink.pdf.frag SYSTEM "../params/insert.olink.pdf.frag.xml">
+<!ENTITY olink.lang.fallback.sequence SYSTEM "../params/olink.lang.fallback.sequence.xml">
+<!ENTITY olink.fragid SYSTEM "../params/olink.fragid.xml">
+<!ENTITY olink.outline.ext SYSTEM "../params/olink.outline.ext.xml">
+<!ENTITY olink.pubid SYSTEM "../params/olink.pubid.xml">
+<!ENTITY olink.resolver SYSTEM "../params/olink.resolver.xml">
+<!ENTITY olink.sysid SYSTEM "../params/olink.sysid.xml">
+<!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml">
+<!ENTITY phrase.propagates.style SYSTEM "../params/phrase.propagates.style.xml">
+<!ENTITY pixels.per.inch SYSTEM "../params/pixels.per.inch.xml">
+<!ENTITY points.per.em SYSTEM "../params/points.per.em.xml">
+<!ENTITY preface.autolabel SYSTEM "../params/preface.autolabel.xml">
+<!ENTITY preferred.mediaobject.role SYSTEM "../params/preferred.mediaobject.role.xml">
+<!ENTITY process.empty.source.toc SYSTEM "../params/process.empty.source.toc.xml">
+<!ENTITY process.source.toc SYSTEM "../params/process.source.toc.xml">
+<!ENTITY profile.arch SYSTEM "../params/profile.arch.xml">
+<!ENTITY profile.attribute SYSTEM "../params/profile.attribute.xml">
+<!ENTITY profile.condition SYSTEM "../params/profile.condition.xml">
+<!ENTITY profile.conformance SYSTEM "../params/profile.conformance.xml">
+<!ENTITY profile.lang SYSTEM "../params/profile.lang.xml">
+<!ENTITY profile.os SYSTEM "../params/profile.os.xml">
+<!ENTITY profile.revision SYSTEM "../params/profile.revision.xml">
+<!ENTITY profile.revisionflag SYSTEM "../params/profile.revisionflag.xml">
+<!ENTITY profile.role SYSTEM "../params/profile.role.xml">
+<!ENTITY profile.security SYSTEM "../params/profile.security.xml">
+<!ENTITY profile.separator SYSTEM "../params/profile.separator.xml">
+<!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml">
+<!ENTITY profile.value SYSTEM "../params/profile.value.xml">
+<!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml">
+<!ENTITY punct.honorific SYSTEM "../params/punct.honorific.xml">
+<!ENTITY qanda.defaultlabel SYSTEM "../params/qanda.defaultlabel.xml">
+<!ENTITY qanda.inherit.numeration SYSTEM "../params/qanda.inherit.numeration.xml">
+<!ENTITY qandadiv.autolabel SYSTEM "../params/qandadiv.autolabel.xml">
+<!ENTITY refentry.generate.name SYSTEM "../params/refentry.generate.name.xml">
+<!ENTITY refentry.generate.title SYSTEM "../params/refentry.generate.title.xml">
+<!ENTITY refentry.separator SYSTEM "../params/refentry.separator.xml">
+<!ENTITY refentry.xref.manvolnum SYSTEM "../params/refentry.xref.manvolnum.xml">
+<!ENTITY root.filename SYSTEM "../params/root.filename.xml">
+<!ENTITY rootid SYSTEM "../params/rootid.xml">
+<!ENTITY runinhead.default.title.end.punct SYSTEM "../params/runinhead.default.title.end.punct.xml">
+<!ENTITY runinhead.title.end.punct SYSTEM "../params/runinhead.title.end.punct.xml">
+<!ENTITY saxon.character.representation SYSTEM "../params/saxon.character.representation.xml">
+<!ENTITY section.autolabel SYSTEM "../params/section.autolabel.xml">
+<!ENTITY section.autolabel.max.depth SYSTEM "../params/section.autolabel.max.depth.xml">
+<!ENTITY section.label.includes.component.label SYSTEM "../params/section.label.includes.component.label.xml">
+<!ENTITY segmentedlist.as.table SYSTEM "../params/segmentedlist.as.table.xml">
+<!ENTITY shade.verbatim SYSTEM "../params/shade.verbatim.xml">
+<!ENTITY shade.verbatim.style SYSTEM "../params/shade.verbatim.style.xml">
+<!ENTITY show.comments SYSTEM "../params/show.comments.xml">
+<!ENTITY show.revisionflag SYSTEM "../params/show.revisionflag.xml">
+<!ENTITY spacing.paras SYSTEM "../params/spacing.paras.xml">
+<!ENTITY suppress.footer.navigation SYSTEM "../params/suppress.footer.navigation.xml">
+<!ENTITY suppress.header.navigation SYSTEM "../params/suppress.header.navigation.xml">
+<!ENTITY suppress.navigation SYSTEM "../params/suppress.navigation.xml">
+<!ENTITY table.borders.with.css SYSTEM "../params/table.borders.with.css.xml">
+<!ENTITY tablecolumns.extension SYSTEM "../params/tablecolumns.extension.xml">
+<!ENTITY targets.filename SYSTEM "../params/targets.filename.xml">
+<!ENTITY target.database.document SYSTEM "../params/target.database.document.xml">
+<!ENTITY tex.math.delims SYSTEM "../params/tex.math.delims.xml">
+<!ENTITY tex.math.file SYSTEM "../params/tex.math.file.xml">
+<!ENTITY tex.math.in.alt SYSTEM "../params/tex.math.in.alt.xml">
+<!ENTITY textinsert.extension SYSTEM "../params/textinsert.extension.xml">
+<!ENTITY toc.list.type SYSTEM "../params/toc.list.type.xml">
+<!ENTITY toc.section.depth SYSTEM "../params/toc.section.depth.xml">
+<!ENTITY toc.max.depth SYSTEM "../params/toc.max.depth.xml">
+<!ENTITY ulink.target SYSTEM "../params/ulink.target.xml">
+<!ENTITY use.embed.for.svg SYSTEM "../params/use.embed.for.svg.xml">
+<!ENTITY use.extensions SYSTEM "../params/use.extensions.xml">
+<!ENTITY use.id.as.filename SYSTEM "../params/use.id.as.filename.xml">
+<!ENTITY use.local.olink.style SYSTEM "../params/use.local.olink.style.xml">
+<!ENTITY use.role.as.xrefstyle SYSTEM "../params/use.role.as.xrefstyle.xml">
+<!ENTITY use.role.for.mediaobject SYSTEM "../params/use.role.for.mediaobject.xml">
+<!ENTITY use.svg SYSTEM "../params/use.svg.xml">
+<!ENTITY variablelist.as.table SYSTEM "../params/variablelist.as.table.xml">
+<!ENTITY para.propagates.style SYSTEM "../params/para.propagates.style.xml">
+<!ENTITY html.cellpadding SYSTEM "../params/html.cellpadding.xml">
+<!ENTITY html.cellspacing SYSTEM "../params/html.cellspacing.xml">
+<!ENTITY menuchoice.separator SYSTEM "../params/menuchoice.separator.xml">
+<!ENTITY menuchoice.menu.separator SYSTEM "../params/menuchoice.menu.separator.xml">
+<!ENTITY bibliography.numbered SYSTEM "../params/bibliography.numbered.xml">
+<!ENTITY chunk.tocs.and.lots SYSTEM "../params/chunk.tocs.and.lots.xml">
+<!ENTITY graphicsize.extension SYSTEM "../params/graphicsize.extension.xml">
+<!ENTITY l10n.gentext.language SYSTEM "../params/l10n.gentext.language.xml">
+<!ENTITY l10n.gentext.default.language SYSTEM "../params/l10n.gentext.default.language.xml">
+<!ENTITY l10n.gentext.use.xref.language SYSTEM "../params/l10n.gentext.use.xref.language.xml">
+<!ENTITY default.image.width SYSTEM "../params/default.image.width.xml">
+<!ENTITY default.float.class SYSTEM "../params/default.float.class.xml">
+<!ENTITY funcsynopsis.tabular.threshold SYSTEM "../params/funcsynopsis.tabular.threshold.xml">
+<!ENTITY table.cell.border.color SYSTEM "../params/table.cell.border.color.xml">
+<!ENTITY table.cell.border.style SYSTEM "../params/table.cell.border.style.xml">
+<!ENTITY table.cell.border.thickness SYSTEM "../params/table.cell.border.thickness.xml">
+<!ENTITY table.frame.border.color SYSTEM "../params/table.frame.border.color.xml">
+<!ENTITY table.frame.border.style SYSTEM "../params/table.frame.border.style.xml">
+<!ENTITY table.frame.border.thickness SYSTEM "../params/table.frame.border.thickness.xml">
+<!ENTITY textdata.default.encoding SYSTEM "../params/textdata.default.encoding.xml">
+<!ENTITY ignore.image.scaling SYSTEM "../params/ignore.image.scaling.xml">
+<!ENTITY footnote.number.format SYSTEM "../params/footnote.number.format.xml">
+<!ENTITY table.footnote.number.format SYSTEM "../params/table.footnote.number.format.xml">
+<!ENTITY footnote.number.symbols SYSTEM "../params/footnote.number.symbols.xml">
+<!ENTITY table.footnote.number.symbols SYSTEM "../params/table.footnote.number.symbols.xml">
+<!ENTITY entry.propagates.style SYSTEM "../params/entry.propagates.style.xml">
+<!ENTITY glossentry.show.acronym SYSTEM "../params/glossentry.show.acronym.xml">
+<!ENTITY xref.with.number.and.title SYSTEM "../params/xref.with.number.and.title.xml">
+<!ENTITY xref.label-title.separator SYSTEM "../params/xref.label-title.separator.xml">
+<!ENTITY xref.label-page.separator SYSTEM "../params/xref.label-page.separator.xml">
+<!ENTITY xref.title-page.separator SYSTEM "../params/xref.title-page.separator.xml">
+<!ENTITY ebnf.assignment SYSTEM "../params/ebnf.assignment.xml">
+<!ENTITY ebnf.statement.terminator SYSTEM "../params/ebnf.statement.terminator.xml">
+<!ENTITY eclipse.autolabel SYSTEM "../params/eclipse.autolabel.xml">
+<!ENTITY eclipse.plugin.name SYSTEM "../params/eclipse.plugin.name.xml">
+<!ENTITY eclipse.plugin.id SYSTEM "../params/eclipse.plugin.id.xml">
+<!ENTITY eclipse.plugin.provider SYSTEM "../params/eclipse.plugin.provider.xml">
+<!ENTITY insert.xref.page.number SYSTEM "../params/insert.xref.page.number.xml">
+<!ENTITY component.label.includes.part.label SYSTEM "../params/component.label.includes.part.label.xml">
+<!ENTITY simplesect.in.toc SYSTEM "../params/simplesect.in.toc.xml">
diff --git a/kdoctools/docbook/xsl/html/param.xml b/kdoctools/docbook/xsl/html/param.xml
new file mode 100644
index 000000000..259fb08f3
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/param.xml
@@ -0,0 +1,8273 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book
+ PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<book>
+<bookinfo>
+<title>HTML Parameter Reference</title>
+<releaseinfo role="meta">
+$Id$
+</releaseinfo>
+<author>
+ <surname>Walsh</surname>
+ <firstname>Norman</firstname>
+</author>
+<copyright>
+ <year>1999</year>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the HTML Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal moreinfo="none">html.stylesheet</literal>
+to <filename moreinfo="none">reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting format="linespecific">&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'&gt;
+
+ &lt;xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/&gt;
+
+ &lt;xsl:param name="html.stylesheet"&gt;reference.css&lt;/xsl:param&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class="attribute">href</sgmltag> attribute on
+<literal moreinfo="none">&lt;xsl:import&gt;</literal> to point to
+<filename moreinfo="none">docbook.xsl</filename> on your system. (Or
+<filename moreinfo="none">chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+<refentry id="admon.graphics.extension">
+<refmeta>
+<refentrytitle>admon.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.extension</refname>
+<refpurpose>Extension for admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.extension.frag">&lt;xsl:param name="admon.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on admonition graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics.path">
+<refmeta>
+<refentrytitle>admon.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics.path</refname>
+<refpurpose>Path to admonition graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.path.frag">&lt;xsl:param name="admon.graphics.path"&gt;images/&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the admonition graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.graphics">
+<refmeta>
+<refentrytitle>admon.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.graphics</refname>
+<refpurpose>Use graphics in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.graphics.frag">
+&lt;xsl:param name="admon.graphics" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented in an alternate style that uses
+a graphic. Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="admon.textlabel">
+<refmeta>
+<refentrytitle>admon.textlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.textlabel</refname>
+<refpurpose>Use text label in admonitions?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.textlabel.frag">
+&lt;xsl:param name="admon.textlabel" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), admonitions are presented with a generated
+text label such as Note or Warning in the appropriate language.
+If zero, such labels are turned off, but any title child
+of the admonition element are still output.
+The default value is 1.
+</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="admon.style">
+<refmeta>
+<refentrytitle>admon.style</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>admon.style</refname>
+<refpurpose>CSS style attributes for admonitions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="admon.style.frag">&lt;xsl:param name="admon.style"&gt;
+ &lt;xsl:text&gt;margin-left: 0.5in; margin-right: 0.5in;&lt;/xsl:text&gt;
+&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the value of the <sgmltag class="attribute">STYLE</sgmltag>
+attribute that should be added to admonitions.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Callouts</title>
+<refentry id="callout.defaultcolumn">
+<refmeta>
+<refentrytitle>callout.defaultcolumn</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.defaultcolumn</refname>
+<refpurpose>Indicates what column callouts appear in by default</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.defaultcolumn.frag">&lt;xsl:param name="callout.defaultcolumn" select="'60'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a callout does not identify a column (for example, if it uses
+the <literal moreinfo="none">linerange</literal> <sgmltag class="attribute">unit</sgmltag>),
+it will appear in the default column.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.extension">
+<refmeta>
+<refentrytitle>callout.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.extension</refname>
+<refpurpose>Extension for callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.extension.frag">&lt;xsl:param name="callout.graphics.extension" select="'.png'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the extension to use on callout graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.number.limit">
+<refmeta>
+<refentrytitle>callout.graphics.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.number.limit.frag">&lt;xsl:param name="callout.graphics.number.limit" select="'15'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter>
+is non-zero, graphics are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.graphics.number.limit</parameter>
+is
+the largest number for which a graphic exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics.path">
+<refmeta>
+<refentrytitle>callout.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics.path</refname>
+<refpurpose>Path to callout graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.path.frag">
+&lt;xsl:param name="callout.graphics.path" select="'images/callouts/'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the callout graphics.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.graphics">
+<refmeta>
+<refentrytitle>callout.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.graphics</refname>
+<refpurpose>Use graphics for callouts?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.graphics.frag">
+&lt;xsl:param name="callout.graphics" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, callouts are presented with graphics (e.g., reverse-video
+circled numbers instead of "(1)", "(2)", etc.).
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.list.table">
+<refmeta>
+<refentrytitle>callout.list.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.list.table</refname>
+<refpurpose>Present callout lists using a table?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.list.table.frag">&lt;xsl:param name="callout.list.table" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The default presentation of <sgmltag>CalloutList</sgmltag>s uses
+an HTML <sgmltag>DL</sgmltag>. Some browsers don't align DLs very well
+if <parameter moreinfo="none">callout.graphics</parameter> are used. With this option
+turned on, <sgmltag>CalloutList</sgmltag>s are presented in an HTML
+<sgmltag>TABLE</sgmltag>, which usually results in better alignment
+of the callout number with the callout description.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.number.limit">
+<refmeta>
+<refentrytitle>callout.unicode.number.limit</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.number.limit</refname>
+<refpurpose>Number of the largest callout graphic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.number.limit.frag">&lt;xsl:param name="callout.unicode.number.limit" select="'10'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.number.limit</parameter>
+is
+the largest number for which a unicode character exists. If the callout number
+exceeds this limit, the default presentation "(nnn)" will always
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode.start.character">
+<refmeta>
+<refentrytitle>callout.unicode.start.character</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode.start.character</refname>
+<refpurpose>First Unicode character to use, decimal value.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.start.character.frag">&lt;xsl:param name="callout.unicode.start.character" select="10102"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">callout.graphics</parameter> is zero and <parameter moreinfo="none">callout.unicode</parameter>
+is non-zero, unicode characters are used to represent
+callout numbers. The value of
+<parameter moreinfo="none">callout.unicode.start.character</parameter>
+is the decimal unicode value used for callout number one. Currently,
+only 10102 is supported in the stylesheets for this parameter.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callout.unicode">
+<refmeta>
+<refentrytitle>callout.unicode</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callout.unicode</refname>
+<refpurpose>Use Unicode characters rather than images for callouts.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callout.unicode.frag">&lt;xsl:param name="callout.unicode" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The stylesheets can use either an image of the numbers one to ten, or the single Unicode character which represents the numeral, in white on a black background. Use this to select the Unicode character option.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="callouts.extension">
+<refmeta>
+<refentrytitle>callouts.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>callouts.extension</refname>
+<refpurpose>Enable the callout extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="callouts.extension.frag">&lt;xsl:param name="callouts.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The callouts extension processes <sgmltag>areaset</sgmltag>
+elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
+callout elements.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>EBNF</title>
+<refentry id="ebnf.table.bgcolor">
+<refmeta>
+<refentrytitle>ebnf.table.bgcolor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.bgcolor</refname>
+<refpurpose>Background color for EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.table.bgcolor.frag">&lt;xsl:param name="ebnf.table.bgcolor" select="'#F5DCB3'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the background color for EBNF tables. No <sgmltag>bgcolor</sgmltag>
+attribute is output if <varname>ebnf.table.bgcolor</varname> is set to
+the null string. The default value matches the value used in recent
+online versions of the W3C's XML Spec productions.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.table.border">
+<refmeta>
+<refentrytitle>ebnf.table.border</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>ebnf.table.border</refname>
+<refpurpose>Selects border on EBNF tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.table.border.frag">&lt;xsl:param name="ebnf.table.border" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects the border on EBNF tables. If non-zero, the tables have
+borders, otherwise they don't.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.assignment">
+<refmeta>
+<refentrytitle>ebnf.assignment</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.assignment</refname>
+<refpurpose>The EBNF production assignment operator</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.assignment.frag">
+&lt;xsl:param name="ebnf.assignment"&gt;
+&lt;code&gt;::=&lt;/code&gt;
+&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.assignment</parameter> parameter determines what
+text is used to show <quote>assignment</quote> in <sgmltag>production</sgmltag>s
+in <sgmltag>productionset</sgmltag>s.</para>
+
+<para>While <quote><literal moreinfo="none">::=</literal></quote> is common, so are several
+other operators.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ebnf.statement.terminator">
+<refmeta>
+<refentrytitle>ebnf.statement.terminator</refentrytitle>
+<refmiscinfo role="type">rtf</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ebnf.statement.terminator</refname>
+<refpurpose>Punctuation that ends an EBNF statement.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ebnf.statement.terminator.frag">
+&lt;xsl:param name="ebnf.statement.terminator"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">ebnf.statement.terminator</parameter> parameter determines what
+text is used to terminate each <sgmltag>production</sgmltag>
+in <sgmltag>productionset</sgmltag>.</para>
+
+<para>Some notations end each statement with a period.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+<refentry id="annotate.toc">
+<refmeta>
+<refentrytitle>annotate.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>annotate.toc</refname>
+<refpurpose>Annotate the Table of Contents?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="annotate.toc.frag">&lt;xsl:param name="annotate.toc" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, TOCs will be annotated. At present, this just means
+that the <sgmltag>RefPurpose</sgmltag> of <sgmltag>RefEntry</sgmltag>
+TOC entries will be displayed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="autotoc.label.separator">
+<refmeta>
+<refentrytitle>autotoc.label.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>autotoc.label.separator</refname>
+<refpurpose>Separator between labels and titles in the ToC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="autotoc.label.separator.frag">&lt;xsl:param name="autotoc.label.separator" select="'. '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>String to use to seperate labels and title in a table of contents.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.source.toc">
+<refmeta>
+<refentrytitle>process.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.source.toc</refname>
+<refpurpose>Process a non-empty <sgmltag>toc</sgmltag> element if it occurs in a source document?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.source.toc.frag">&lt;xsl:param name="process.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies that the contents of a non-empty "hard-coded"
+<sgmltag>toc</sgmltag> element in a source document are processed to
+generate a TOC in output.
+<note>
+ <para>This parameter has no effect on automated generation of
+ TOCs. An automated TOC may still be generated along with the
+ "hard-coded" TOC. To suppress automated TOC generation, adjust the
+ value of the <parameter moreinfo="none">generate.toc</parameter> paramameter.</para>
+
+ <para>The <sgmltag>process.source.toc</sgmltag> parameter also has
+ no effect if the <sgmltag>toc</sgmltag> element is empty; handling
+ for empty <sgmltag>toc</sgmltag> is controlled by the
+ <parameter moreinfo="none">process.empty.source.toc</parameter> parameter.</para>
+</note>
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="process.empty.source.toc">
+<refmeta>
+<refentrytitle>process.empty.source.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>process.empty.source.toc</refname>
+<refpurpose>Generate automated TOC if <sgmltag>toc</sgmltag> element occurs in a source document?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="process.empty.source.toc.frag">&lt;xsl:param name="process.empty.source.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies that if an empty <sgmltag>toc</sgmltag> element is
+found in a source document, an automated TOC is generated.
+<note>
+ <para>Depending on what the value of the
+ <parameter moreinfo="none">generate.toc</parameter> parameter is, setting this
+ parameter to <literal moreinfo="none">1</literal> could result in generation of
+ duplicate automated TOCs. So the
+ <parameter moreinfo="none">process.empty.source.toc</parameter> is primarily useful
+ as an "override": by placing an empty <sgmltag>toc</sgmltag> in your
+ document and setting this parameter to <literal moreinfo="none">1</literal>, you can
+ force a TOC to be generated even if <sgmltag>generate.toc</sgmltag>
+ says not to.</para>
+</note>
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bridgehead.in.toc">
+<refmeta>
+<refentrytitle>bridgehead.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bridgehead.in.toc</refname>
+<refpurpose>Should bridgehead elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bridgehead.in.toc.frag">&lt;xsl:param name="bridgehead.in.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, bridgeheads appear in the TOC. Note that this option
+is not fully supported and may be removed in a future version of the
+stylesheets.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="simplesect.in.toc">
+<refmeta>
+<refentrytitle>simplesect.in.toc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>simplesect.in.toc</refname>
+<refpurpose>Should <sgmltag>simplesect</sgmltag> elements appear in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="simplesect.in.toc.frag">&lt;xsl:param name="simplesect.in.toc" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>simplesect</sgmltag>s appear in the TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="manual.toc">
+<refmeta>
+<refentrytitle>manual.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manual.toc</refname>
+<refpurpose>An explicit TOC to be used for the TOC</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="manual.toc.frag">
+&lt;xsl:param name="manual.toc" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">manual.toc</parameter> identifies an explicit TOC that
+will be used for building the printed TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.list.type">
+<refmeta>
+<refentrytitle>toc.list.type</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">dl</refmiscinfo>
+<refmiscinfo role="value">ul</refmiscinfo>
+<refmiscinfo role="value">ol</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.list.type</refname>
+<refpurpose>Type of HTML list element to use for Tables of Contents</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.list.type.frag">&lt;xsl:param name="toc.list.type"&gt;dl&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When an automatically generated Table of Contents (or List of Titles)
+is produced, this HTML element will be used to make the list.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.section.depth">
+<refmeta>
+<refentrytitle>toc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.section.depth</refname>
+<refpurpose>How deep should recursive <sgmltag>section</sgmltag>s appear
+in the TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.section.depth.frag">&lt;xsl:param name="toc.section.depth"&gt;2&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the depth to which recursive sections should appear in the
+TOC.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="toc.max.depth">
+<refmeta>
+<refentrytitle>toc.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>toc.max.depth</refname>
+<refpurpose>How maximaly deep should be each TOC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="toc.max.depth.frag">&lt;xsl:param name="toc.max.depth"&gt;8&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the maximal depth of TOC on all levels.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.toc">
+<refmeta>
+<refentrytitle>generate.toc</refentrytitle>
+<refmiscinfo role="type">table</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.toc</refname>
+<refpurpose>Control generation of ToCs and LoTs</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.toc.frag">
+&lt;xsl:param name="generate.toc"&gt;
+appendix toc,title
+article/appendix nop
+article toc,title
+book toc,title,figure,table,example,equation
+chapter toc,title
+part toc,title
+preface toc,title
+qandadiv toc
+qandaset toc
+reference toc,title
+sect1 toc
+sect2 toc
+sect3 toc
+sect4 toc
+sect5 toc
+section toc
+set toc,title
+&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter has a structured value. It is a table of space-delimited
+path/value pairs. Each path identifies some element in the source document
+using a restricted subset of XPath (only the implicit child axis, no wildcards,
+no predicates). Paths can be either relative or absolute.</para>
+
+<para>When processing a particular element, the stylesheets consult this table to
+determine if a ToC (or LoT(s)) should be generated.</para>
+
+<para>For example, consider the entry:</para>
+
+<screen format="linespecific">book toc,figure</screen>
+
+<para>This indicates that whenever a <sgmltag>book</sgmltag> is formatted, a
+Table Of Contents and a List of Figures should be generated. Similarly,</para>
+
+<screen format="linespecific">/chapter toc</screen>
+
+<para>indicates that whenever a document <emphasis>that has a root
+of</emphasis> <sgmltag>chapter</sgmltag> is formatted, a Table of
+Contents should be generated. The entry <literal moreinfo="none">chapter</literal> would match
+all chapters, but <literal moreinfo="none">/chapter</literal> matches only <sgmltag>chapter</sgmltag>
+document elements.</para>
+
+<para>Generally, the longest match wins. So, for example, if you want to distinguish
+articles in books from articles in parts, you could use these two entries:</para>
+
+<screen format="linespecific">book/article toc,figure
+part/article toc</screen>
+
+<para>Note that an article in a part can never match a <literal moreinfo="none">book/article</literal>,
+so if you want nothing to be generated for articles in parts, you can simply leave
+that rule out.</para>
+
+<para>If you want to leave the rule in, to make it explicit that you're turning
+something off, use the value <quote>nop</quote>. For example, the following
+entry disables ToCs and LoTs for articles:</para>
+
+<screen format="linespecific">article nop</screen>
+
+<para>Do not simply leave the word <quote>article</quote> in the file
+without a matching value. That'd be just begging the silly little
+path/value parser to get confused.</para>
+
+<para>Section ToCs are further controlled by the
+<parameter moreinfo="none">generate.section.toc.level</parameter> parameter.
+For a given section level to have a ToC, it must have both an entry in
+<parameter moreinfo="none">generate.toc</parameter> and be within the range enabled by
+<parameter moreinfo="none">generate.section.toc.level</parameter>.</para>
+</refsect1>
+</refentry>
+
+<refentry id="generate.section.toc.level">
+<refmeta>
+<refentrytitle>generate.section.toc.level</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.section.toc.level</refname>
+<refpurpose>Control depth of TOC generation in sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.section.toc.level.frag">
+&lt;xsl:param name="generate.section.toc.level" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">generate.section.toc.level</parameter> parameter
+controls the depth of section in which TOCs will be generated. Note
+that this is related to, but not the same as
+<parameter moreinfo="none">toc.section.depth</parameter>, which controls the depth to
+which TOC entries will be generated in a given TOC.</para>
+<para>If, for example, <parameter moreinfo="none">generate.section.toc.level</parameter>
+is <literal moreinfo="none">3</literal>, TOCs will be generated in first, second, and third
+level sections, but not in fourth level sections.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.index">
+<refmeta>
+<refentrytitle>generate.index</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.index</refname>
+<refpurpose>Do you want an index?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.index.frag">&lt;xsl:param name="generate.index" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specify if an index should be generated. </para>
+
+</refsect1>
+</refentry>
+
+<refentry id="index.on.type">
+<refmeta>
+<refentrytitle>index.on.type</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>index.on.type</refname>
+<refpurpose>Select indexterms based on <sgmltag>type</sgmltag>
+attribute value</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="index.on.type.frag">
+&lt;xsl:param name="index.on.type" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If non-zero,
+then an <sgmltag>index</sgmltag> element that has a
+<sgmltag>type</sgmltag> attribute
+value will contain only those <sgmltag>indexterm</sgmltag>
+elements with a matching <sgmltag>type</sgmltag> attribute value.
+If an <sgmltag>index</sgmltag> has no <sgmltag>type</sgmltag>
+attribute or it is blank, then the index will contain
+all <sgmltag>indexterm</sgmltag>s in the current scope.
+</para>
+
+<para>
+If <literal moreinfo="none">index.on.type</literal> is zero, then the
+<sgmltag>type</sgmltag> attribute has no effect
+on selecting indexterms for an index.
+</para>
+
+<para>For those using DocBook version 4.2 or earlier,
+the <sgmltag>type</sgmltag> attribute is not available
+for index terms. However, you can achieve the same
+effect by using the <sgmltag>role</sgmltag> attribute
+in the same manner on <sgmltag>indexterm</sgmltag>
+and <sgmltag>index</sgmltag>, and setting the stylesheet parameter
+<parameter moreinfo="none">index.on.role</parameter> to a nonzero value.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="index.on.role">
+<refmeta>
+<refentrytitle>index.on.role</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>index.on.role</refname>
+<refpurpose>Select indexterms based on role value</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="index.on.role.frag">
+&lt;xsl:param name="index.on.role" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If non-zero,
+then an <sgmltag>index</sgmltag> element that has a
+<sgmltag>role</sgmltag> attribute
+value will contain only those <sgmltag>indexterm</sgmltag>
+elements with a matching role value.
+If an <sgmltag>index</sgmltag> has no <sgmltag>role</sgmltag>
+attribute or it is blank, then the index will contain
+all <sgmltag>indexterm</sgmltag>s in the current scope.
+</para>
+<para>
+If <literal moreinfo="none">index.on.role</literal> is zero, then the
+<sgmltag>role</sgmltag> attribute has no effect
+on selecting indexterms for an index.
+</para>
+
+<para>If you are using DocBook version 4.3 or later, you should
+use the <sgmltag>type</sgmltag> attribute instead of <sgmltag>role</sgmltag>
+on <sgmltag>indexterm</sgmltag> and <sgmltag>index</sgmltag>,
+and set the <parameter moreinfo="none">index.on.type</parameter> to a nonzero
+value.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="index.prefer.titleabbrev">
+<refmeta>
+<refentrytitle>index.prefer.titleabbrev</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>index.prefer.titleabbrev</refname>
+<refpurpose>Should be abbreviated titles used as back references</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="index.prefer.titleabbrev.frag">
+&lt;xsl:param name="index.prefer.titleabbrev" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Extensions</title>
+<refentry id="linenumbering.everyNth">
+<refmeta>
+<refentrytitle>linenumbering.everyNth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.everyNth</refname>
+<refpurpose>Indicate which lines should be numbered</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.everyNth.frag">&lt;xsl:param name="linenumbering.everyNth" select="'5'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, everyNth line will be numbered.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.extension">
+<refmeta>
+<refentrytitle>linenumbering.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.extension</refname>
+<refpurpose>Enable the line numbering extension</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.extension.frag">&lt;xsl:param name="linenumbering.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, verbatim environments (elements that have the
+format='linespecific' notation attribute: address, literallayout,
+programlisting, screen, synopsis) that specify line numbering will
+have, surprise, line numbers.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.separator">
+<refmeta>
+<refentrytitle>linenumbering.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.separator</refname>
+<refpurpose>Specify a separator between line numbers and lines</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.separator.frag">&lt;xsl:param name="linenumbering.separator" select="' '"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The separator is inserted between line numbers and lines in
+the verbatim environment.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="linenumbering.width">
+<refmeta>
+<refentrytitle>linenumbering.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>linenumbering.width</refname>
+<refpurpose>Indicates the width of line numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="linenumbering.width.frag">&lt;xsl:param name="linenumbering.width" select="'3'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If line numbering is enabled, line numbers will appear right
+justified in a field "width" characters wide.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tablecolumns.extension">
+<refmeta>
+<refentrytitle>tablecolumns.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tablecolumns.extension</refname>
+<refpurpose>Enable the table columns extension function</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tablecolumns.extension.frag">&lt;xsl:param name="tablecolumns.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The table columns extension function adjusts the widths of table
+columns in the HTML result to more accurately reflect the specifications
+in the CALS table.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="textinsert.extension">
+<refmeta>
+<refentrytitle>textinsert.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>textinsert.extension</refname>
+<refpurpose>Enable the textinsert extension element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="textinsert.extension.frag">&lt;xsl:param name="textinsert.extension" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The textinsert extension element inserts the contents of a
+a file into the result tree (as text).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="textdata.default.encoding">
+<refmeta>
+<refentrytitle>textdata.default.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>textdata.default.encoding</refname>
+<refpurpose>Default encoding of external text files which are included
+using textdata element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="textdata.default.encoding.frag">
+&lt;xsl:param name="textdata.default.encoding" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Default encoding of external text files which are included using
+textdata element. This value is used only when you do not specify
+encoding by appropriate attribute directly on textdata. Default
+encoding (empty string) is interpreted as system default
+encoding.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="graphicsize.extension">
+<refmeta>
+<refentrytitle>graphicsize.extension</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphicsize.extension</refname>
+<refpurpose>Enable the getWidth()/getDepth() extension functions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="graphicsize.extension.frag">
+&lt;xsl:param name="graphicsize.extension" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero (and if <parameter moreinfo="none">use.extensions</parameter> is non-zero
+and if you're using a processor that supports extension functions), the
+<function moreinfo="none">getWidth</function> and <function moreinfo="none">getDepth</function> functions
+will be used to extract image sizes from graphics.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.extensions">
+<refmeta>
+<refentrytitle>use.extensions</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.extensions</refname>
+<refpurpose>Enable extensions</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.extensions.frag">&lt;xsl:param name="use.extensions" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extensions may be used. Each extension is
+further controlled by its own parameter. But if
+<parameter moreinfo="none">use.extensions</parameter> is zero, no extensions will
+be used.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Automatic labelling</title>
+<refentry id="chapter.autolabel">
+<refmeta>
+<refentrytitle>chapter.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chapter.autolabel</refname>
+<refpurpose>Are chapters automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chapter.autolabel.frag">&lt;xsl:param name="chapter.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled chapters will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="appendix.autolabel">
+<refmeta>
+<refentrytitle>appendix.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>appendix.autolabel</refname>
+<refpurpose>Are Appendixes automatically enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="appendix.autolabel.frag">&lt;xsl:param name="appendix.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled appendixes will be
+enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="part.autolabel">
+<refmeta>
+<refentrytitle>part.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>part.autolabel</refname>
+<refpurpose>Are parts and references enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="part.autolabel.frag">&lt;xsl:param name="part.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled parts and references will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="preface.autolabel">
+<refmeta>
+<refentrytitle>preface.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>preface.autolabel</refname>
+<refpurpose>Are prefaces enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preface.autolabel.frag">&lt;xsl:param name="preface.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled prefaces will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qandadiv.autolabel">
+<refmeta>
+<refentrytitle>qandadiv.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qandadiv.autolabel</refname>
+<refpurpose>Are divisions in QAndASets enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qandadiv.autolabel.frag">&lt;xsl:param name="qandadiv.autolabel" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled qandadivs will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.autolabel">
+<refmeta>
+<refentrytitle>section.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.autolabel</refname>
+<refpurpose>Are sections enumerated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.autolabel.frag">&lt;xsl:param name="section.autolabel" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), unlabeled sections will be enumerated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.autolabel.max.depth">
+<refmeta>
+<refentrytitle>section.autolabel.max.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.autolabel.max.depth</refname>
+<refpurpose>The deepest level of sections that are numbered.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.autolabel.max.depth.frag">&lt;xsl:param name="section.autolabel.max.depth" select="8"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When section numbering is turned on by the
+<literal moreinfo="none">section.autolabel</literal> parameter,
+then this parameter controls the depth of section nesting
+that is numbered.
+Sections nested to a level deeper than this value will
+not be numbered.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="section.label.includes.component.label">
+<refmeta>
+<refentrytitle>section.label.includes.component.label</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>section.label.includes.component.label</refname>
+<refpurpose>Do section labels include the component label?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="section.label.includes.component.label.frag">&lt;xsl:param name="section.label.includes.component.label" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), section labels are prefixed with the label of the
+component that contains them.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="label.from.part">
+<refmeta>
+<refentrytitle>label.from.part</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>label.from.part</refname>
+<refpurpose>Renumber chapters in each part?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="label.from.part.frag">&lt;xsl:param name="label.from.part" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">label.from.part</parameter> is non-zero, components
+(<sgmltag>chapter</sgmltag>s, <sgmltag>appendixe</sgmltag>s, etc.)
+will be numbered from 1 in each <sgmltag>part</sgmltag>. Otherwise,
+they will be numbered monotonically throughout each
+<sgmltag>book</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="component.label.includes.part.label">
+<refmeta>
+<refentrytitle>component.label.includes.part.label</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>component.label.includes.part.label</refname>
+<refpurpose>Do section labels include the component label?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="component.label.includes.part.label.frag">&lt;xsl:param name="component.label.includes.part.label" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), labels for chapters, appendices, and other component
+elements are prefixed with the label of the
+part element that contains them.
+Also, the labels for formal elements such as table and figure will
+include the part label.
+If there is no part element container, then no prefix is generated.
+</para>
+<para>
+This feature is most useful when the
+<literal moreinfo="none">label.from.part</literal> parameter is turned on.
+In that case, there would be more than one chapter
+<quote>1</quote>, and the extra part label prefix will identify
+each chapter unambiguously.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+
+
+<reference><title>HTML</title>
+<refentry id="html.base">
+<refmeta>
+<refentrytitle>html.base</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.base</refname>
+<refpurpose>An HTML base URI</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.base.frag">&lt;xsl:param name="html.base"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If html.base is set, it is used for the <sgmltag>BASE</sgmltag>
+element in the <sgmltag>HEAD</sgmltag> of the HTML documents.
+This is useful for dynamically served HTML where the base URI needs
+to be shifted.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.stylesheet.type">
+<refmeta>
+<refentrytitle>html.stylesheet.type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet.type</refname>
+<refpurpose>The type of the stylesheet used in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.stylesheet.type.frag">&lt;xsl:param name="html.stylesheet.type"&gt;text/css&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The type of the stylesheet to place in the HTML <sgmltag>link</sgmltag> tag.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.stylesheet">
+<refmeta>
+<refentrytitle>html.stylesheet</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.stylesheet</refname>
+<refpurpose>Name of the stylesheet(s) to use in the generated HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.stylesheet.frag">
+&lt;xsl:param name="html.stylesheet" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">html.stylesheet</parameter> parameter is either empty,
+indicating that no stylesheet <sgmltag>LINK</sgmltag> tag should be generated
+in the HTML output, or it is a list of one or more stylesheets.</para>
+
+<para>Multiple stylesheets are space-delimited. If you need to
+reference a stylesheet URI that includes a space, encode it with
+<literal moreinfo="none">%20</literal>. A seprate HTML <sgmltag>LINK</sgmltag> element will
+be generated for each stylesheet in the order they are listed in the
+parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.id.as.filename">
+<refmeta>
+<refentrytitle>use.id.as.filename</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.id.as.filename</refname>
+<refpurpose>Use ID value of chunk elements as the filename?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.id.as.filename.frag">&lt;xsl:param name="use.id.as.filename" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">use.id.as.filename</parameter>
+is non-zero, the filename of chunk elements that have IDs will be
+derived from the ID value.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="css.decoration">
+<refmeta>
+<refentrytitle>css.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>css.decoration</refname>
+<refpurpose>Enable CSS decoration of elements</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="css.decoration.frag">
+&lt;xsl:param name="css.decoration" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">css.decoration</literal> is turned on, then HTML elements
+produced by the
+stylesheet may be decorated with STYLE attributes. For example, the
+LI tags produced for list items may include a fragment of CSS in the
+STYLE attribute which sets the CSS property "list-style-type".
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="spacing.paras">
+<refmeta>
+<refentrytitle>spacing.paras</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>spacing.paras</refname>
+<refpurpose>Insert additional &lt;p&gt; elements for spacing?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="spacing.paras.frag">&lt;xsl:param name="spacing.paras" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When non-zero, additional, empty paragraphs are inserted in
+several contexts (for example, around informal figures), to create a
+more pleasing visual appearance in many browsers.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="emphasis.propagates.style">
+<refmeta>
+<refentrytitle>emphasis.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>emphasis.propagates.style</refname>
+<refpurpose>Pass emphasis role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="emphasis.propagates.style.frag">
+&lt;xsl:param name="emphasis.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>emphasis</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the emphasis.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="para.propagates.style">
+<refmeta>
+<refentrytitle>para.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>para.propagates.style</refname>
+<refpurpose>Pass para role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="para.propagates.style.frag">
+&lt;xsl:param name="para.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>para</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>p</sgmltag> generated for the paragraph.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="phrase.propagates.style">
+<refmeta>
+<refentrytitle>phrase.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>phrase.propagates.style</refname>
+<refpurpose>Pass phrase role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="phrase.propagates.style.frag">&lt;xsl:param name="phrase.propagates.style" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>phrase</sgmltag> elements
+will be passed through to the HTML as a class attribute on a
+<sgmltag>span</sgmltag> that surrounds the phrase.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="entry.propagates.style">
+<refmeta>
+<refentrytitle>entry.propagates.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>entry.propagates.style</refname>
+<refpurpose>Pass entry role attribute through to HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="entry.propagates.style.frag">
+&lt;xsl:param name="entry.propagates.style" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, the role attribute of <sgmltag>entry</sgmltag> elements
+will be passed through to the HTML as a class attribute on the
+<sgmltag>td</sgmltag> or <sgmltag>th</sgmltag> generated for the table
+cell.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.longdesc">
+<refmeta>
+<refentrytitle>html.longdesc</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc</refname>
+<refpurpose>Should longdesc URIs be created?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.longdesc.frag">
+&lt;xsl:param name="html.longdesc" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, HTML files will be created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. These files
+are created from the <sgmltag>textobject</sgmltag>s in
+<sgmltag>mediaobject</sgmltag>s and
+<sgmltag>inlinemediaobject</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.longdesc.link">
+<refmeta>
+<refentrytitle>html.longdesc.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.longdesc.link</refname>
+<refpurpose>Should a link to the longdesc be included in the HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.longdesc.link.frag">
+&lt;xsl:param name="html.longdesc.link" select="$html.longdesc"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, links will be created to the
+HTML files created for the
+<sgmltag class="attribute">longdesc</sgmltag> attribute. It makes no
+sense to turn enable this option without also enabling the
+<parameter moreinfo="none">$html.longdesc</parameter> parameter.</para>
+
+<para>The <literal moreinfo="none">longdesc.link</literal> named template is called
+to construct the link.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.valid.html">
+<refmeta>
+<refentrytitle>make.valid.html</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.valid.html</refname>
+<refpurpose>Attempt to make sure the HTML output is valid HTML</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.valid.html.frag">
+&lt;xsl:param name="make.valid.html" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">make.valid.html</parameter> is true, the stylesheets take
+extra effort to ensure that the resulting HTML is valid. This may mean that some
+<sgmltag>para</sgmltag> tags are translated into HTML <sgmltag>div</sgmltag>s or
+that other substitutions occur.</para>
+
+<para>This parameter is different from <parameter moreinfo="none">html.cleanup</parameter>
+because it changes the resulting markup; it does not use extension functions
+to manipulate result-tree-fragments and is therefore applicable to any
+XSLT processor.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cleanup">
+<refmeta>
+<refentrytitle>html.cleanup</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cleanup</refname>
+<refpurpose>Attempt to clean up the resulting HTML?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cleanup.frag">
+&lt;xsl:param name="html.cleanup" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, and if the <ulink url="http://www.exslt.org/">EXSLT</ulink>
+extensions are supported by your processor, the resulting HTML will be
+<quote>cleaned up</quote>. This improves the chances that the
+resulting HTML will be valid. It may also improve the formatting of
+some elements.</para>
+
+<para>This parameter is different from <parameter moreinfo="none">make.valid.html</parameter>
+because it uses extension functions to manipulate result-tree-fragments.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.mode">
+<refmeta>
+<refentrytitle>draft.mode</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.mode</refname>
+<refpurpose>Select draft mode</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.mode.frag">
+&lt;xsl:param name="draft.mode" select="'maybe'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects draft mode. If <parameter moreinfo="none">draft.mode</parameter> is
+<quote><literal moreinfo="none">yes</literal></quote>, the entire document will be treated
+as a draft. If it is <quote><literal moreinfo="none">no</literal></quote>, the entire document
+will be treated as a final copy. If it is <quote><literal moreinfo="none">maybe</literal></quote>,
+individual sections will be treated as draft or final independently, depending
+on how their <sgmltag class="attribute">status</sgmltag> attribute is set.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="draft.watermark.image">
+<refmeta>
+<refentrytitle>draft.watermark.image</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>draft.watermark.image</refname>
+<refpurpose>The URI of the image to be used for draft watermarks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="draft.watermark.image.frag">
+&lt;xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The image to be used for draft watermarks.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.id.attributes">
+<refmeta>
+<refentrytitle>generate.id.attributes</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>generate.id.attributes</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.id.attributes.frag">
+&lt;xsl:param name="generate.id.attributes" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the HTML stylesheet will generate ID attributes on
+containers. For example, the markup:</para>
+
+<screen format="linespecific">&lt;section id="foo"&gt;&lt;title&gt;Some Title&lt;/title&gt;
+&lt;para&gt;Some para.&lt;/para&gt;
+&lt;/section&gt;</screen>
+
+<para>might produce:</para>
+
+<screen format="linespecific">&lt;div class="section" id="foo"&gt;
+&lt;h2&gt;Some Title&lt;/h2&gt;
+&lt;p&gt;Some para.&lt;/p&gt;
+&lt;/div&gt;</screen>
+
+<para>The alternative is to generate anchors:</para>
+
+<screen format="linespecific">&lt;div class="section"&gt;
+&lt;h2&gt;&lt;a name="foo"&gt;&lt;/a&gt;Some Title&lt;/h2&gt;
+&lt;p&gt;Some para.&lt;/p&gt;
+&lt;/div&gt;</screen>
+
+<para>Because the <sgmltag class="attribute">name</sgmltag> attribute of
+the <sgmltag>a</sgmltag> element and the <sgmltag class="attribute">id</sgmltag>
+attribute of other tags are both of type <quote>ID</quote>, producing both
+generates invalid documents.</para>
+
+<para>As of version 1.50, you can use this switch to control which type of
+identifier is generated. For backwards-compatibility, generating
+<sgmltag>a</sgmltag> anchors is preferred.</para>
+
+<para>Note: at present, this switch is incompletely implemented.
+Disabling ID attributes will suppress them, but enabling ID attributes
+will not suppress the anchors.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.meta.abstract">
+<refmeta>
+<refentrytitle>generate.meta.abstract</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.meta.abstract</refname>
+<refpurpose>Generate HTML <sgmltag>META</sgmltag> element from <sgmltag>abstract</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.meta.abstract.frag">
+&lt;xsl:param name="generate.meta.abstract" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, document abstracts will be reproduced in the HTML
+<sgmltag>HEAD</sgmltag> with <sgmltag class="starttag">meta name="description" content="..."</sgmltag>.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>XSLT Processing</title>
+<refentry id="rootid">
+<refmeta>
+<refentrytitle>rootid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>rootid</refname>
+<refpurpose>Specify the root element to format</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="rootid.frag">&lt;xsl:param name="rootid" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">rootid</parameter> is specified, it must be the
+value of an ID that occurs in the document being formatted. The entire
+document will be loaded and parsed, but formatting will begin at the
+element identified, rather than at the root. For example, this allows
+you to process only chapter 4 of a book.</para>
+<para>Because the entire document is available to the processor, automatic
+numbering, cross references, and other dependencies are correctly
+resolved.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.navigation">
+<refmeta>
+<refentrytitle>suppress.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.navigation</refname>
+<refpurpose>Disable header and footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.navigation.frag">&lt;xsl:param name="suppress.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.navigation</literal> is turned on, header and
+footer navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.header.navigation">
+<refmeta>
+<refentrytitle>suppress.header.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.header.navigation</refname>
+<refpurpose>Disable header navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.header.navigation.frag">&lt;xsl:param name="suppress.header.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.header.navigation</literal> is turned on, header
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="suppress.footer.navigation">
+<refmeta>
+<refentrytitle>suppress.footer.navigation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>suppress.footer.navigation</refname>
+<refpurpose>Disable footer navigation</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="suppress.footer.navigation.frag">&lt;xsl:param name="suppress.footer.navigation"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">suppress.footer.navigation</literal> is turned on, footer
+navigation will be suppressed.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="header.rule">
+<refmeta>
+<refentrytitle>header.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>header.rule</refname>
+<refpurpose>Rule under headers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="header.rule.frag">
+&lt;xsl:param name="header.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn below the page headers.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footer.rule">
+<refmeta>
+<refentrytitle>footer.rule</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footer.rule</refname>
+<refpurpose>Rule over footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footer.rule.frag">
+&lt;xsl:param name="footer.rule" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a rule will be drawn above the page footers.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Meta/*Info</title>
+<refentry id="inherit.keywords">
+<refmeta>
+<refentrytitle>inherit.keywords</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>inherit.keywords</refname>
+<refpurpose>Inherit keywords from ancestor elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="inherit.keywords.frag">&lt;xsl:param name="inherit.keywords" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">inherit.keywords</parameter>
+is non-zero, the keyword <sgmltag>META</sgmltag> for each HTML
+<sgmltag>HEAD</sgmltag> element will include all of the keywords from
+ancestral elements. Otherwise, only the keywords from the current section
+will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.single.year.ranges">
+<refmeta>
+<refentrytitle>make.single.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.single.year.ranges</refname>
+<refpurpose>Print single-year ranges (e.g., 1998-1999)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.single.year.ranges.frag">&lt;xsl:param name="make.single.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, year ranges that span a single year will be printed
+in range notation (1998-1999) instead of discrete notation
+(1998, 1999).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.year.ranges">
+<refmeta>
+<refentrytitle>make.year.ranges</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.year.ranges</refname>
+<refpurpose>Collate copyright years into ranges?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.year.ranges.frag">&lt;xsl:param name="make.year.ranges" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, copyright years will be collated into ranges.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="author.othername.in.middle">
+<refmeta>
+<refentrytitle>author.othername.in.middle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>author.othername.in.middle</refname>
+<refpurpose>Is <sgmltag>othername</sgmltag> in <sgmltag>author</sgmltag> a
+middle name?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="author.othername.in.middle.frag">&lt;xsl:param name="author.othername.in.middle" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the <sgmltag>othername</sgmltag> of an <sgmltag>author</sgmltag>
+appears between the <sgmltag>firstname</sgmltag> and
+<sgmltag>surname</sgmltag>. Otherwise, <sgmltag>othername</sgmltag>
+is suppressed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.legalnotice.link">
+<refmeta>
+<refentrytitle>generate.legalnotice.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>generate.legalnotice.link</refname>
+<refpurpose>TBD</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="generate.legalnotice.link.frag">&lt;xsl:param name="generate.legalnotice.link" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>TBD</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Reference Pages</title>
+<refentry id="funcsynopsis.decoration">
+<refmeta>
+<refentrytitle>funcsynopsis.decoration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.decoration</refname>
+<refpurpose>Decorate elements of a FuncSynopsis?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.decoration.frag">&lt;xsl:param name="funcsynopsis.decoration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or
+italic). The decoration is controlled by functions that can be redefined
+in a customization layer.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="funcsynopsis.style">
+<refmeta>
+<refentrytitle>funcsynopsis.style</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">ansi</refmiscinfo>
+<refmiscinfo role="value">kr</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.style</refname>
+<refpurpose>What style of 'FuncSynopsis' should be generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.style.frag">&lt;xsl:param name="funcsynopsis.style"&gt;kr&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <varname>funcsynopsis.style</varname> is <literal moreinfo="none">ansi</literal>,
+ANSI-style function synopses are generated for a
+<sgmltag>funcsynopsis</sgmltag>, otherwise K&amp;R-style
+function synopses are generated.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="funcsynopsis.tabular.threshold">
+<refmeta>
+<refentrytitle>funcsynopsis.tabular.threshold</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>funcsynopsis.tabular.threshold</refname>
+<refpurpose>Width beyond which a tabular presentation will be used</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="funcsynopsis.tabular.threshold.frag">
+&lt;xsl:param name="funcsynopsis.tabular.threshold" select="40"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">funcsynopsis.tabular.threshold</parameter> is greater than
+zero then if a <sgmltag>funcprototype</sgmltag> is wider than the threshold
+value, it will be presented in a table.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="function.parens">
+<refmeta>
+<refentrytitle>function.parens</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>function.parens</refname>
+<refpurpose>Generate parens after a function?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="function.parens.frag">&lt;xsl:param name="function.parens"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not 0, the formatting of
+a <sgmltag class="starttag">function</sgmltag> element will include
+generated parenthesis.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.name">
+<refmeta>
+<refentrytitle>refentry.generate.name</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.name</refname>
+<refpurpose>Output NAME header before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.name.frag">&lt;xsl:param name="refentry.generate.name" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), a "NAME" section title is output before the list
+of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.title</parameter> are mutually
+exclusive. This means that if you change this parameter to zero, you
+should set <parameter moreinfo="none">refentry.generate.title</parameter> to 1 unless
+you want get quite strange output.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.generate.title">
+<refmeta>
+<refentrytitle>refentry.generate.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.generate.title</refname>
+<refpurpose>Output title before 'RefName'(s)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.generate.title.frag">
+&lt;xsl:param name="refentry.generate.title" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the reference page title or first name is
+output before the list of 'RefName's. This parameter and
+<parameter moreinfo="none">refentry.generate.name</parameter> are mutually exclusive.
+This means that if you change this parameter to 1, you
+should set <parameter moreinfo="none">refentry.generate.name</parameter> to 0 unless
+you want get quite strange output.</para>
+
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.xref.manvolnum">
+<refmeta>
+<refentrytitle>refentry.xref.manvolnum</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.xref.manvolnum</refname>
+<refpurpose>Output <sgmltag>manvolnum</sgmltag> as part of
+<sgmltag>refentry</sgmltag> cross-reference?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.xref.manvolnum.frag">&lt;xsl:param name="refentry.xref.manvolnum" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>if true (non-zero), the <sgmltag>manvolnum</sgmltag> is used when cross-referencing
+<sgmltag>refentry</sgmltag>s, either with <sgmltag>xref</sgmltag>
+or <sgmltag>citerefentry</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="citerefentry.link">
+<refmeta>
+<refentrytitle>citerefentry.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>citerefentry.link</refname>
+<refpurpose>Generate URL links when cross-referencing RefEntrys?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="citerefentry.link.frag">&lt;xsl:param name="citerefentry.link" select="'0'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a web link will be generated, presumably
+to an online man-&gt;HTML gateway. The text of the link is
+generated by the generate.citerefentry.link template.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="refentry.separator">
+<refmeta>
+<refentrytitle>refentry.separator</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>refentry.separator</refname>
+<refpurpose>Generate a separator between consecutive RefEntry elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="refentry.separator.frag">&lt;xsl:param name="refentry.separator" select="'1'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a separator will be generated between consecutive
+reference pages.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Tables</title>
+<refentry id="default.table.width">
+<refmeta>
+<refentrytitle>default.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.table.width</refname>
+<refpurpose>The default width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.table.width.frag">&lt;xsl:param name="default.table.width" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the WIDTH attribute on
+tables that do not specify an alternate width (with the dbhtml processing
+instruction).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.table.width">
+<refmeta>
+<refentrytitle>nominal.table.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.table.width</refname>
+<refpurpose>The (absolute) nominal width of tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.table.width.frag">&lt;xsl:param name="nominal.table.width" select="'6in'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In order to convert CALS column widths into HTML column widths, it
+is sometimes necessary to have an absolute table width to use for conversion
+of mixed absolute and relative widths. This value must be an absolute
+length (not a percentag).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.borders.with.css">
+<refmeta>
+<refentrytitle>table.borders.with.css</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.borders.with.css</refname>
+<refpurpose>Use CSS to specify table, row, and cell borders?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.borders.with.css.frag">
+&lt;xsl:param name="table.borders.with.css" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), CSS will be used to draw table borders.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.style">
+<refmeta>
+<refentrytitle>table.cell.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.style.frag">
+&lt;xsl:param name="table.cell.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.thickness">
+<refmeta>
+<refentrytitle>table.cell.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.thickness</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.thickness.frag">
+&lt;xsl:param name="table.cell.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.cell.border.color">
+<refmeta>
+<refentrytitle>table.cell.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.cell.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.cell.border.color.frag">
+&lt;xsl:param name="table.cell.border.color" select="''"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.style">
+<refmeta>
+<refentrytitle>table.frame.border.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.style</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.style.frag">
+&lt;xsl:param name="table.frame.border.style" select="'solid'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.thickness">
+<refmeta>
+<refentrytitle>table.frame.border.thickness</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.thickness</refname>
+<refpurpose>Specifies the thickness of the frame border</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.thickness.frag">
+&lt;xsl:param name="table.frame.border.thickness" select="'0.5pt'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies the thickness of the border on the table's frame.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.frame.border.color">
+<refmeta>
+<refentrytitle>table.frame.border.color</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.frame.border.color</refname>
+<refpurpose/>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.frame.border.color.frag">
+&lt;xsl:param name="table.frame.border.color" select="''"&gt;&lt;/xsl:param&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cellspacing">
+<refmeta>
+<refentrytitle>html.cellspacing</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellspacing</refname>
+<refpurpose>Default value for cellspacing in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cellspacing.frag">
+&lt;xsl:param name="html.cellspacing" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellspacing value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.cellpadding">
+<refmeta>
+<refentrytitle>html.cellpadding</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.cellpadding</refname>
+<refpurpose>Default value for cellpadding in HTML tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.cellpadding.frag">
+&lt;xsl:param name="html.cellpadding" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used as the default cellpadding value
+in HTML tables.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>QAndASet</title>
+<refentry id="qanda.defaultlabel">
+<refmeta>
+<refentrytitle>qanda.defaultlabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.defaultlabel</refname>
+<refpurpose>Sets the default for defaultlabel on QandASet.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.defaultlabel.frag">&lt;xsl:param name="qanda.defaultlabel"&gt;number&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If no defaultlabel attribute is specified on a QandASet, this
+value is used. It must be one of the legal values for the defaultlabel
+attribute.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="qanda.inherit.numeration">
+<refmeta>
+<refentrytitle>qanda.inherit.numeration</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>qanda.inherit.numeration</refname>
+<refpurpose>Does enumeration of QandASet components inherit the numeration of parent elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="qanda.inherit.numeration.frag">&lt;xsl:param name="qanda.inherit.numeration" select="1"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), numbered QandADiv elements and Questions and Answers inherit
+the numeration of the ancestors of the QandASet.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Linking</title>
+<refentry id="target.database.document">
+<refmeta>
+<refentrytitle>target.database.document</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>target.database.document</refname>
+<refpurpose>Name of master database file for resolving
+olinks</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="target.database.document.frag">
+&lt;xsl:param name="target.database.document" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>
+To resolve olinks between documents, the stylesheets use
+a master database document that identifies the target datafiles for all the documents within the scope
+of the olinks. This parameter value is the URI of
+the master document to be read during processing to resolve olinks.
+The default value is <filename moreinfo="none">olinkdb.xml</filename>.</para>
+<para>The data structure of the file is defined in the <filename moreinfo="none">targetdatabase.dtd</filename> DTD. The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also <parameter moreinfo="none">targets.filename</parameter>.
+
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="targets.filename">
+<refmeta>
+<refentrytitle>targets.filename</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>targets.filename</refname>
+<refpurpose>Name of cross reference targets data file</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="targets.filename.frag">
+&lt;xsl:param name="targets.filename" select="'target.db'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter lets you change the name of the generated
+file from the default name <filename moreinfo="none">target.db</filename>.
+The name must agree with that used in the target database
+used to resolve olinks during processing.
+See also <parameter moreinfo="none">target.database.document</parameter>.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="collect.xref.targets">
+<refmeta>
+<refentrytitle>collect.xref.targets</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>collect.xref.targets</refname>
+<refpurpose>Controls whether cross reference data is
+collected</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="collect.xref.targets.frag">
+&lt;xsl:param name="collect.xref.targets" select="'no'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>
+In order to resolve olinks efficiently, the stylesheets can
+generate an external data file containing information about
+all potential cross reference endpoints in a document.
+This parameter determines whether the collection process is run when the document is processed by the stylesheet. The default value is <literal moreinfo="none">no</literal>, which means the data file is not generated during processing. The other choices are <literal moreinfo="none">yes</literal>, which means the data file is created and the document is processed for output, and <literal moreinfo="none">only</literal>, which means the data file is created but the document is not processed for output.
+See also <parameter moreinfo="none">targets.filename</parameter>.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="olink.base.uri">
+<refmeta>
+<refentrytitle>olink.base.uri</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.base.uri</refname>
+<refpurpose>Base URI used in olink hrefs</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="olink.base.uri.frag">
+&lt;xsl:param name="olink.base.uri" select="''"&gt;&lt;/xsl:param&gt; </programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>When cross reference data is collected for resolving olinks, it may be necessary to prepend a base URI to each target's href. This parameter lets you set that base URI when cross reference data is collected. This feature is needed when you want to link to a document that is processed without chunking. The output filename for such a document is not known to the XSL stylesheet; the only target information consists of fragment identifiers such as <literal moreinfo="none">#idref</literal>. To enable the resolution of olinks between documents, you should pass the name of the HTML output file as the value of this parameter. Then the hrefs recorded in the cross reference data collection look like <literal moreinfo="none">outfile.html#idref</literal>, which can be reached as links from other documents.</para>
+</refsect1>
+</refentry>
+
+<refentry id="use.local.olink.style">
+<refmeta>
+<refentrytitle>use.local.olink.style</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.local.olink.style</refname>
+<refpurpose>Process olinks using xref style of current
+document</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="use.local.olink.style.frag">
+&lt;xsl:param name="use.local.olink.style" select="0"&gt;&lt;/xsl:param&gt; </programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the <parameter moreinfo="none">use.local.olink.style</parameter> parameter is set to non-zero, then instead the cross
+reference string is formed again from the target title, number, and
+element name, using the stylesheet processing the targeting document.
+Then olinks will match the xref style in the targeting document
+rather than in the target document. If both documents are processed
+with the same stylesheet, then the results will be the same.</para>
+</refsect1>
+</refentry>
+
+<refentry id="current.docid">
+<refmeta>
+<refentrytitle>current.docid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>current.docid</refname>
+<refpurpose>targetdoc identifier for the document being
+processed</refpurpose>
+</refnamediv>
+<refsynopsisdiv> <programlisting id="current.docid.frag">
+&lt;xsl:param name="current.docid" select="''"&gt;&lt;/xsl:param&gt; </programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the <literal moreinfo="none">targetdoc</literal> identifiers for both documents, as they appear in the <parameter moreinfo="none">target.database.document</parameter> database file. This parameter passes to the stylesheet
+the targetdoc identifier of the current document, since that
+identifier does not appear in the document itself. </para>
+<para>This parameter can also be used for print output. If an olink's <literal moreinfo="none">targetdoc</literal> id differs from the <literal moreinfo="none">current.docid</literal>, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also <parameter moreinfo="none">olink.doctitle</parameter> to enable that feature.</para>
+</refsect1>
+</refentry>
+
+<refentry id="olink.doctitle">
+<refmeta>
+<refentrytitle>olink.doctitle</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.doctitle</refname>
+<refpurpose>show the document title for external olinks?</refpurpose>
+
+</refnamediv>
+<refsynopsisdiv> <programlisting id="olink.doctitle.frag">
+&lt;xsl:param name="olink.doctitle" select="no"&gt;&lt;/xsl:param&gt; </programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+<para>When olinks between documents are resolved, the generated text
+may not make it clear that the reference is to another document.
+It is possible for the stylesheets to append the other document's
+title to external olinks. For this to happen, two parameters must
+be set.</para>
+<itemizedlist>
+<listitem>
+<para>This <parameter moreinfo="none">olink.doctitle</parameter> parameter
+should be set to either <literal moreinfo="none">yes</literal> or <literal moreinfo="none">maybe</literal>
+to enable this feature.
+</para>
+</listitem>
+<listitem>
+<para>And you should also set the <parameter moreinfo="none">current.docid</parameter>
+parameter to the document id for the document currently
+being processed for output.
+</para>
+</listitem>
+</itemizedlist>
+
+<para>
+Then if an olink's <literal moreinfo="none">targetdoc</literal> id differs from
+the <literal moreinfo="none">current.docid</literal> value, the stylesheet knows
+that it is a reference to another document and can
+append the target document's
+title to the generated olink text. </para>
+
+<para>The text for the target document's title is copied from the
+olink database from the <sgmltag>ttl</sgmltag> element
+of the top-level <sgmltag>div</sgmltag> for that document.
+If that <sgmltag>ttl</sgmltag> element is missing or empty,
+no title is output.
+</para>
+
+<para>The supported values for <parameter moreinfo="none">olink.doctitle</parameter> are:
+</para>
+<variablelist>
+<varlistentry>
+<term><literal moreinfo="none">yes</literal></term>
+<listitem>
+<para>
+Always insert the title to the target document if it is not
+the current document.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal moreinfo="none">no</literal></term>
+<listitem>
+<para>
+Never insert the title to the target document, even if requested
+in an <sgmltag class="attribute">xrefstyle</sgmltag> attribute.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal moreinfo="none">maybe</literal></term>
+<listitem>
+<para>
+Only insert the title to the target document, if requested
+in an <sgmltag class="attribute">xrefstyle</sgmltag> attribute.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>An <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+may override the global setting for individual olinks.
+The following values are supported in an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute using the <literal moreinfo="none">select:</literal> syntax:
+</para>
+
+<variablelist>
+<varlistentry>
+<term><literal moreinfo="none">docname</literal></term>
+<listitem>
+<para>
+Insert the target document name for this olink using the
+<literal moreinfo="none">docname</literal> gentext template, but only
+if the value of <parameter moreinfo="none">olink.doctitle</parameter>
+is not <literal moreinfo="none">no</literal>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal moreinfo="none">docnamelong</literal></term>
+<listitem>
+<para>
+Insert the target document name for this olink using the
+<literal moreinfo="none">docnamelong</literal> gentext template, but only
+if the value of <parameter moreinfo="none">olink.doctitle</parameter>
+is not <literal moreinfo="none">no</literal>.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><literal moreinfo="none">nodocname</literal></term>
+<listitem>
+<para>
+Omit the target document name even if
+the value of <parameter moreinfo="none">olink.doctitle</parameter>
+is <literal moreinfo="none">yes</literal>.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>Another way of inserting the target document name
+for a single olink is to employ an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute using the <literal moreinfo="none">template:</literal> syntax.
+The <literal moreinfo="none">%o</literal> placeholder (the letter o, not zero)
+in such a template
+will be filled in with the target document's title when it is processed.
+This will occur regardless of
+the value of <parameter moreinfo="none">olink.doctitle</parameter>.
+</para>
+<para>Note that prior to version 1.66 of the XSL stylesheets,
+the allowed values for this parameter were 0 and 1. Those
+values are still supported and mapped to 'no' and 'yes', respectively.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="olink.debug">
+<refmeta>
+<refentrytitle>olink.debug</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.debug</refname>
+<refpurpose>Turn on debugging messages for olinks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.debug.frag">
+&lt;xsl:param name="olink.debug" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, then each olink will generate several
+messages about how it is being resolved during processing.
+This is useful when an olink does not resolve properly
+and the standard error messages are not sufficient to
+find the problem.
+</para>
+
+<para>You may need to read through the olink XSL templates
+to understand the context for some of the debug messages.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.properties">
+<refnamediv>
+<refname>olink.properties</refname>
+<refpurpose>Properties associated with the cross-reference
+text of an olink.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.properties.frag">
+&lt;xsl:attribute-set name="olink.properties"&gt;
+&lt;/xsl:attribute-set&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This attribute set is used on cross reference text
+from an olink. It is not applied to the
+optional page number or
+optional title of the external document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.lang.fallback.sequence">
+<refmeta>
+<refentrytitle>olink.lang.fallback.sequence</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.lang.fallback.sequence</refname>
+<refpurpose>look up translated documents if olink not found?</refpurpose>
+
+</refnamediv>
+<refsynopsisdiv> <programlisting id="olink.lang.fallback.sequence.frag">
+&lt;xsl:param name="olink.lang.fallback.sequence" select="''"&gt;&lt;/xsl:param&gt; </programlisting>
+</refsynopsisdiv>
+<refsect1>
+<title>Description</title>
+
+<para>This parameter defines a list of lang values
+to search among to resolve olinks.
+</para>
+
+<para>Normally an olink tries to resolve to a document in the same
+language as the olink itself. The language of an olink
+is determined by its nearest ancestor element with a
+<sgmltag class="attribute">lang</sgmltag> attribute, otherwise the
+value of the <parameter moreinfo="none">l10n.gentext.default.lang</parameter>
+parameter.
+</para>
+
+<para>An olink database can contain target data for the same
+document in multiple languages. Each set of data has the
+same value for the <sgmltag>targetdoc</sgmltag> attribute in
+the <sgmltag>document</sgmltag> element in the database, but with a
+different <sgmltag>lang</sgmltag> attribute value.
+</para>
+
+<para>When an olink is being resolved, the target is first
+sought in the document with the same language as the olink.
+If no match is found there, then this parameter is consulted
+for additional languages to try.</para>
+
+<para>The <parameter moreinfo="none">olink.lang.fallback.sequence</parameter>
+must be a whitespace separated list of lang values to
+try. The first one with a match in the olink database is used.
+The default value is empty.</para>
+
+<para>For example, a document might be written in German
+and contain an olink with
+<literal moreinfo="none">targetdoc="adminguide"</literal>.
+When the document is processed, the processor
+first looks for a target dataset in the
+olink database starting with:</para>
+
+<literallayout format="linespecific" class="normal"><literal moreinfo="none">&lt;document targetdoc="adminguide" lang="de"&gt;</literal>.
+</literallayout>
+
+<para>If there is no such element, then the
+<parameter moreinfo="none">olink.lang.fallback.sequence</parameter>
+parameter is consulted.
+If its value is, for example, <quote>fr en</quote>, then the processor next
+looks for <literal moreinfo="none">targetdoc="adminguide" lang="fr"</literal>, and
+then for <literal moreinfo="none">targetdoc="adminguide" lang="en"</literal>.
+If there is still no match, it looks for
+<literal moreinfo="none">targetdoc="adminguide"</literal> with no
+lang attribute.
+</para>
+
+<para>This parameter is useful when a set of documents is only
+partially translated, or is in the process of being translated.
+If a target of an olink has not yet been translated, then this
+parameter permits the processor to look for the document in
+other languages. This assumes the reader would rather have
+a link to a document in a different language than to have
+a broken link.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="insert.olink.page.number">
+<refmeta>
+<refentrytitle>insert.olink.page.number</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.olink.page.number</refname>
+<refpurpose>Turns page numbers in olinks on and off</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="insert.olink.page.number.frag">
+&lt;xsl:param name="insert.olink.page.number"&gt;no&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines if
+cross references made between documents with
+<sgmltag>olink</sgmltag> will
+include page number citations.
+In most cases this is only applicable to references in printed output.
+</para>
+<para>The parameter has three possible values.
+</para>
+<variablelist>
+<varlistentry>
+<term>no</term>
+<listitem><para>No page number references will be generated for olinks.
+</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>yes</term>
+<listitem><para>Page number references will be generated
+for all <sgmltag>olink</sgmltag> references.
+The style of page reference may be changed
+if an <sgmltag class="attribute">xrefstyle</sgmltag>
+attribute is used.
+</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>maybe</term>
+<listitem><para>Page number references will not be generated
+for an <sgmltag>olink</sgmltag> element unless
+it has an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute whose value specifies a page reference.
+</para></listitem>
+</varlistentry>
+</variablelist>
+<para>Olinks that point to targets within the same document
+are treated as <sgmltag>xref</sgmltag>s, and controlled by
+the <parameter moreinfo="none">insert.xref.page.number</parameter> parameter.
+</para>
+
+<para>Page number references for olinks to
+external documents can only be inserted if the
+information exists in the olink database.
+This means each olink target element
+(<sgmltag>div</sgmltag> or <sgmltag>obj</sgmltag>)
+must have a <sgmltag class="attribute">page</sgmltag> attribute
+whose value is its page number in the target document.
+The XSL stylesheets are not able to extract that information
+during processing because pages have not yet been created in
+XSLT transformation. Only the XSL-FO processor knows what
+page each element is placed on.
+Therefore some postprocessing must take place to populate
+page numbers in the olink database.
+</para>
+
+
+
+</refsect1>
+</refentry>
+
+<refentry id="insert.olink.pdf.frag">
+<refmeta>
+<refentrytitle>insert.olink.pdf.frag</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.olink.pdf.frag</refname>
+<refpurpose>Add fragment identifiers for links into PDF files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="insert.olink.pdf.frag.frag">
+&lt;xsl:param name="insert.olink.pdf.frag" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines whether
+the cross reference URIs to PDF documents made with
+<sgmltag>olink</sgmltag> will
+include fragment identifiers.
+</para>
+
+<para>When forming a URI to link to a PDF document,
+a fragment identifier (typically a '#' followed by an
+id value) appended to the PDF filename can be used by
+the PDF viewer to open
+the PDF file to a location within the document instead of
+the first page.
+However, not all PDF files have id
+values embedded in them, and not all PDF viewers can
+handle fragment identifiers.
+</para>
+
+<para>If <parameter moreinfo="none">insert.olink.pdf.frag</parameter> is set
+to a non-zero value, then any olink targeting a
+PDF file will have the fragment identifier appended to the URI.
+The URI is formed by concatenating the value of the
+<parameter moreinfo="none">olink.base.uri</parameter> parameter, the
+value of the <sgmltag class="attribute">baseuri</sgmltag>
+attribute from the <sgmltag class="element">document</sgmltag>
+element in the olink database with the matching
+<sgmltag class="attribute">targetdoc</sgmltag> value,
+and the value of the <sgmltag class="attribute">href</sgmltag>
+attribute for the targeted element in the olink database.
+The <sgmltag class="attribute">href</sgmltag> attribute
+contains the fragment identifier.
+</para>
+
+<para>If <parameter moreinfo="none">insert.olink.pdf.frag</parameter> is set
+to zero (the default value), then
+the <sgmltag class="attribute">href</sgmltag> attribute
+from the olink database
+is not appended to PDF olinks, so the fragment identifier is left off.
+A PDF olink is any olink for which the
+<sgmltag class="attribute">baseuri</sgmltag> attribute
+from the matching <sgmltag class="element">document</sgmltag>
+element in the olink database ends with '.pdf'.
+Any other olinks will still have the fragment identifier added.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="prefer.internal.olink">
+<refmeta>
+<refentrytitle>prefer.internal.olink</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>prefer.internal.olink</refname>
+<refpurpose>Prefer a local olink reference to an external reference</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="prefer.internal.olink.frag">
+&lt;xsl:param name="prefer.internal.olink" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you are re-using XML content modules in multiple documents,
+you may want to redirect some of your olinks. This parameter
+permits you to redirect an olink to the current document.
+</para>
+
+<para>For example: you are writing documentation for a product,
+which includes 3 manuals: a little installation
+booklet (booklet.xml), a user
+guide (user.xml), and a reference manual (reference.xml).
+All 3 documents begin with the same introduction section (intro.xml) that
+contains a reference to the customization section (custom.xml) which is
+included in both user.xml and reference.xml documents.
+</para>
+
+<para>How do you write the link to custom.xml in intro.xml
+so that it is interpreted correctly in all 3 documents?</para>
+<itemizedlist>
+<listitem><para>If you use xref, it will fail in user.xml.</para>
+</listitem>
+<listitem><para>If you use olink (pointing to reference.xml),
+the reference in user.xml
+will point to the customization section of the reference manual, while it is
+actually available in user.xml.</para>
+</listitem>
+</itemizedlist>
+
+<para>If you set the <parameter moreinfo="none">prefer.internal.olink</parameter>
+parameter to a non-zero value, then the processor will
+first look in the olink database
+for the olink's <sgmltag>targetptr</sgmltag> attribute value
+in document matching the <parameter moreinfo="none">current.docid</parameter>
+parameter value. If it isn't found there, then
+it tries the document in the database
+with the <sgmltag>targetdoc</sgmltag>
+value that matches the olink's <sgmltag>targetdoc</sgmltag>
+attribute.
+</para>
+
+<para>This feature permits an olink reference to resolve to
+the current document if there is an element
+with an id matching the olink's <sgmltag>targetptr</sgmltag>
+value. The current document's olink data must be
+included in the target database for this to work.</para>
+
+<caution>
+<para>There is a potential for incorrect links if
+the same <sgmltag>id</sgmltag> attribute value is used for different
+content in different documents.
+Some of your olinks may be redirected to the current document
+when they shouldn't be. It is not possible to control
+individual olink instances.</para>
+</caution>
+
+</refsect1>
+</refentry>
+
+<refentry id="link.mailto.url">
+<refmeta>
+<refentrytitle>link.mailto.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>link.mailto.url</refname>
+<refpurpose>Mailto URL for the LINK REL=made HTML HEAD element</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="link.mailto.url.frag">&lt;xsl:param name="link.mailto.url"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If not the empty string, this address will be used for the
+REL=made <sgmltag>LINK</sgmltag> element in the HTML <sgmltag>HEAD</sgmltag>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="ulink.target">
+<refmeta>
+<refentrytitle>ulink.target</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ulink.target</refname>
+<refpurpose>The HTML anchor target for ULinks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ulink.target.frag">&lt;xsl:param name="ulink.target" select="'_top'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">ulink.target</parameter> is set, its value will
+be used for the <sgmltag class="attribute">target</sgmltag> attribute
+on anchors generated for <sgmltag>ulink</sgmltag>s.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.fragid">
+<refmeta>
+<refentrytitle>olink.fragid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.fragid</refname>
+<refpurpose>Names the fragment identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.fragid.frag">&lt;xsl:param name="olink.fragid" select="'fragid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.outline.ext">
+<refmeta>
+<refentrytitle>olink.outline.ext</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.outline.ext</refname>
+<refpurpose>The extension of OLink outline files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.outline.ext.frag">&lt;xsl:param name="olink.outline.ext" select="'.olink'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.pubid">
+<refmeta>
+<refentrytitle>olink.pubid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.pubid</refname>
+<refpurpose>Names the public identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.pubid.frag">&lt;xsl:param name="olink.pubid" select="'pubid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.sysid">
+<refmeta>
+<refentrytitle>olink.sysid</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>olink.sysid</refname>
+<refpurpose>Names the system identifier portion of an OLink resolver query</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.sysid.frag">&lt;xsl:param name="olink.sysid" select="'sysid='"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="olink.resolver">
+<refmeta>
+<refentrytitle>olink.resolver</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>olink.resolver</refname>
+<refpurpose>The root name of the OLink resolver (usually a script)</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="olink.resolver.frag">&lt;xsl:param name="olink.resolver" select="'/cgi-bin/olink'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Bibliography</title>
+<refentry id="biblioentry.item.separator">
+<refmeta>
+<refentrytitle>biblioentry.item.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>biblioentry.item.separator</refname>
+<refpurpose>Text to separate bibliography entries</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="biblioentry.item.separator.frag">&lt;xsl:param name="biblioentry.item.separator"&gt;. &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Text to separate bibliography entries
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.collection">
+<refmeta>
+<refentrytitle>bibliography.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.collection</refname>
+<refpurpose>Name of the bibliography collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.collection.frag">&lt;xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Maintaining bibliography entries across a set of documents is tedious, time
+consuming, and error prone. It makes much more sense, usually, to store all of
+the bibliography entries in a single place and simply <quote>extract</quote>
+the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter. To setup a global
+bibliography <quote>database</quote>, follow these steps:</para>
+
+<para>First, create a stand-alone bibliography document that contains all of
+the documents that you wish to reference. Make sure that each bibliography
+entry (whether you use <sgmltag>biblioentry</sgmltag> or <sgmltag>bibliomixed</sgmltag>)
+has an ID.</para>
+
+<para>My global bibliography, <filename moreinfo="none">~/bibliography.xml</filename> begins
+like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;!DOCTYPE bibliography
+ PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;bibliography&gt;&lt;title&gt;References&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"&gt;&lt;abbrev&gt;XML 1.0&lt;/abbrev&gt;Tim Bray,
+Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml"&gt;Extensible Markup
+Language (XML) 1.0 Second Edition&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 2000.
+&lt;/bibliomixed&gt;
+
+&lt;bibliomixed id="xml-names"&gt;&lt;abbrev&gt;Namespaces&lt;/abbrev&gt;Tim Bray,
+Dave Hollander,
+and Andrew Layman, editors.
+&lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml-names/"&gt;Namespaces in
+XML&lt;/ulink&gt;&lt;/citetitle&gt;.
+World Wide Web Consortium, 1999.
+&lt;/bibliomixed&gt;
+
+&lt;!-- ... --&gt;
+&lt;/bibliography&gt;
+</programlisting>
+</informalexample>
+
+<para>When you create a bibliography in your document, simply
+provide <emphasis>empty</emphasis> <sgmltag>bibliomixed</sgmltag>
+entries for each document that you wish to cite. Make sure that these
+elements have the same ID as the corresponding <quote>real</quote>
+entry in your global bibliography.</para>
+
+<para>For example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;bibliography&gt;&lt;title&gt;Bibliography&lt;/title&gt;
+
+&lt;bibliomixed id="xml-rec"/&gt;
+&lt;bibliomixed id="xml-names"/&gt;
+&lt;bibliomixed id="DKnuth86"&gt;Donald E. Knuth. &lt;citetitle&gt;Computers and
+Typesetting: Volume B, TeX: The Program&lt;/citetitle&gt;. Addison-Wesley,
+1986. ISBN 0-201-13437-3.
+&lt;/bibliomixed&gt;
+&lt;bibliomixed id="relaxng"/&gt;
+
+&lt;/bibliography&gt;</programlisting>
+</informalexample>
+
+<para>Note that it's perfectly acceptable to mix entries from your
+global bibliography with <quote>normal</quote> entries. You can use
+<sgmltag>xref</sgmltag> or other elements to cross-reference your
+bibliography entries in exactly the same way you do now.</para>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">bibliography.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global bibliography.</para>
+
+<para>The stylesheets will format the bibliography in your document as if
+all of the entries referenced appeared there literally.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="bibliography.numbered">
+<refmeta>
+<refentrytitle>bibliography.numbered</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>bibliography.numbered</refname>
+<refpurpose>Should bibliography entries be numbered?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="bibliography.numbered.frag">
+&lt;xsl:param name="bibliography.numbered" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero bibliography entries will be numbered</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Glossary</title>
+<refentry id="glossterm.auto.link">
+<refmeta>
+<refentrytitle>glossterm.auto.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossterm.auto.link</refname>
+<refpurpose>Generate links from glossterm to glossentry automaticaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossterm.auto.link.frag">
+&lt;xsl:param name="glossterm.auto.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, a link will be automatically created from glossterm
+to glossentry for that glossary term. This is usefull when your
+glossterm names are consistent and you don't want to add links
+manually.</para>
+<para>If there is <sgmltag class="attribute">linkend</sgmltag> on
+<sgmltag>glossterm</sgmltag> then is used instead of autogeneration of
+link.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="firstterm.only.link">
+<refmeta>
+<refentrytitle>firstterm.only.link</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>firstterm.only.link</refname>
+<refpurpose>Does automatic glossterm linking only apply to firstterms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="firstterm.only.link.frag">
+&lt;xsl:param name="firstterm.only.link" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true, only <sgmltag>firstterm</sgmltag>s will be automatically linked
+to the glossary. If glossary linking is not enabled, this parameter
+has no effect.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossary.collection">
+<refmeta>
+<refentrytitle>glossary.collection</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossary.collection</refname>
+<refpurpose>Name of the glossary collection file</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossary.collection.frag">
+&lt;xsl:param name="glossary.collection" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Glossaries maintained independently across a set of documents
+are likely to become inconsistent unless considerable effort is
+expended to keep them in sync. It makes much more sense, usually, to
+store all of the glossary entries in a single place and simply
+<quote>extract</quote> the ones you need in each document.</para>
+
+<para>That's the purpose of the
+<parameter moreinfo="none">glossary.collection</parameter> parameter. To setup a global
+glossary <quote>database</quote>, follow these steps:</para>
+
+<refsect2><title>Setting Up the Glossary Database</title>
+
+<para>First, create a stand-alone glossary document that contains all of
+the entries that you wish to reference. Make sure that each glossary
+entry has an ID.</para>
+
+<para>Here's an example glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">
+&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE glossary
+ PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
+&lt;glossary&gt;
+&lt;glossaryinfo&gt;
+&lt;editor&gt;&lt;firstname&gt;Eric&lt;/firstname&gt;&lt;surname&gt;Raymond&lt;/surname&gt;&lt;/editor&gt;
+&lt;title&gt;Jargon File 4.2.3 (abridged)&lt;/title&gt;
+&lt;releaseinfo&gt;Just some test data&lt;/releaseinfo&gt;
+&lt;/glossaryinfo&gt;
+
+&lt;glossdiv&gt;&lt;title&gt;0&lt;/title&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;0&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;Numeric zero, as opposed to the letter `O' (the 15th letter of
+the English alphabet). In their unmodified forms they look a lot
+alike, and various kluges invented to make them visually distinct have
+compounded the confusion. If your zero is center-dotted and letter-O
+is not, or if letter-O looks almost rectangular but zero looks more
+like an American football stood on end (or the reverse), you're
+probably looking at a modern character display (though the dotted zero
+seems to have originated as an option on IBM 3270 controllers). If
+your zero is slashed but letter-O is not, you're probably looking at
+an old-style ASCII graphic set descended from the default typewheel on
+the venerable ASR-33 Teletype (Scandinavians, for whom /O is a letter,
+curse this arrangement). (Interestingly, the slashed zero long
+predates computers; Florian Cajori's monumental "A History of
+Mathematical Notations" notes that it was used in the twelfth and
+thirteenth centuries.) If letter-O has a slash across it and the zero
+does not, your display is tuned for a very old convention used at IBM
+and a few other early mainframe makers (Scandinavians curse &lt;emphasis&gt;this&lt;/emphasis&gt;
+arrangement even more, because it means two of their letters collide).
+Some Burroughs/Unisys equipment displays a zero with a &lt;emphasis&gt;reversed&lt;/emphasis&gt;
+slash. Old CDC computers rendered letter O as an unbroken oval and 0
+as an oval broken at upper right and lower left. And yet another
+convention common on early line printers left zero unornamented but
+added a tail or hook to the letter-O so that it resembled an inverted
+Q or cursive capital letter-O (this was endorsed by a draft ANSI
+standard for how to draw ASCII characters, but the final standard
+changed the distinguisher to a tick-mark in the upper-left corner).
+Are we sufficiently confused yet?&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;glossentry&gt;
+&lt;glossterm&gt;1TBS&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para role="accidence"&gt;
+&lt;phrase role="pronounce"&gt;&lt;/phrase&gt;
+&lt;phrase role="partsofspeach"&gt;n&lt;/phrase&gt;
+&lt;/para&gt;
+&lt;para&gt;The "One True Brace Style"&lt;/para&gt;
+&lt;glossseealso&gt;indent style&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossdiv&gt;
+
+&lt;!-- ... --&gt;
+
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+</refsect2>
+
+<refsect2><title>Marking Up Glossary Terms</title>
+
+<para>That takes care of the glossary database, now you have to get the entries
+into your document. Unlike bibliography entries, which can be empty, creating
+<quote>placeholder</quote> glossary entries would be very tedious. So instead,
+support for <parameter moreinfo="none">glossary.collection</parameter> relies on implicit linking.</para>
+
+<para>In your source document, simply use <sgmltag>firstterm</sgmltag> and
+<sgmltag>glossterm</sgmltag> to identify the terms you wish to have included
+in the glossary. The stylesheets assume that you will either set the
+<sgmltag class="attribute">baseform</sgmltag> attribute correctly, or that the
+content of the element exactly matches a term in your glossary.</para>
+
+<para>If you're using a <parameter moreinfo="none">glossary.collection</parameter>, don't
+make explicit links on the terms in your document.</para>
+
+<para>So, in your document, you might write things like this:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para&gt;This is dummy text, without any real meaning.
+The point is simply to reference glossary terms like &lt;glossterm&gt;0&lt;/glossterm&gt;
+and the &lt;firstterm baseform="1TBS"&gt;One True Brace Style (1TBS)&lt;/firstterm&gt;.
+The &lt;glossterm&gt;1TBS&lt;/glossterm&gt;, as you can probably imagine, is a nearly
+religious issue.&lt;/para&gt;</programlisting>
+</informalexample>
+
+<para>If you set the <parameter moreinfo="none">firstterm.only.link</parameter> parameter,
+only the terms marked with <sgmltag>firstterm</sgmltag> will be links.
+Otherwise, all the terms will be linked.</para>
+
+</refsect2>
+
+<refsect2><title>Marking Up the Glossary</title>
+
+<para>The glossary itself has to be identified for the stylesheets. For lack
+of a better choice, the <sgmltag class="attribute">role</sgmltag> is used.
+To identify the glossary as the target for automatic processing, set
+the role to <quote><literal moreinfo="none">auto</literal></quote>. The title of this
+glossary (and any other information from the <sgmltag>glossaryinfo</sgmltag>
+that's rendered by your stylesheet) will be displayed, but the entries will
+come from the database.
+</para>
+
+<para>Unfortunately, the glossary can't be empty, so you must put in
+at least one <sgmltag>glossentry</sgmltag>. The content of this entry
+is irrelevant, it will not be rendered:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+
+<para>What about glossary divisions? If your glossary database has glossary
+divisions <emphasis>and</emphasis> your automatic glossary contains at least
+one <sgmltag>glossdiv</sgmltag>, the automic glossary will have divisions.
+If the <sgmltag>glossdiv</sgmltag> is missing from either location, no divisions
+will be rendered.</para>
+
+<para>Glossary entries (and divisions, if appropriate) in the glossary will
+occur in precisely the order they occur in your database.</para>
+
+</refsect2>
+
+<refsect2><title>Formatting the Document</title>
+
+<para>Finally, when you are ready to format your document, simply set the
+<parameter moreinfo="none">glossary.collection</parameter> parameter (in either a
+customization layer or directly through your processor's interface) to
+point to your global glossary.</para>
+
+<para>The stylesheets will format the glossary in your document as if
+all of the entries implicilty referenced appeared there literally.</para>
+</refsect2>
+
+<refsect2><title>Limitations</title>
+
+<para>Glossary cross-references <emphasis>within the glossary</emphasis> are
+not supported. For example, this <emphasis>will not</emphasis> work:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+
+<para>If you put glossary cross-references in your glossary that way,
+you'll get the cryptic error: <computeroutput moreinfo="none">Warning:
+glossary.collection specified, but there are 0 automatic
+glossaries</computeroutput>.</para>
+
+<para>Instead, you must do two things:</para>
+
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+<para>Markup your glossary using <sgmltag>glossseealso</sgmltag>:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossentry&gt;
+&lt;glossterm&gt;gloss-1&lt;/glossterm&gt;
+&lt;glossdef&gt;&lt;para&gt;A description that references &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/para&gt;
+&lt;glossseealso&gt;gloss-2&lt;/glossseealso&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;</programlisting>
+</informalexample>
+</listitem>
+
+<listitem>
+<para>Make sure there is at least one <sgmltag>glossterm</sgmltag> reference to
+<glossterm>gloss-2</glossterm> <emphasis>in your document</emphasis>. The
+easiest way to do that is probably within a <sgmltag>remark</sgmltag> in your
+automatic glossary:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;glossary role="auto"&gt;
+&lt;remark&gt;Make sure there's a reference to &lt;glossterm&gt;gloss-2&lt;/glossterm&gt;.&lt;/remark&gt;
+&lt;glossentry&gt;
+&lt;glossterm&gt;Irrelevant&lt;/glossterm&gt;
+&lt;glossdef&gt;
+&lt;para&gt;If you can see this, the document was processed incorrectly. Use
+the &lt;parameter&gt;glossary.collection&lt;/parameter&gt; parameter.&lt;/para&gt;
+&lt;/glossdef&gt;
+&lt;/glossentry&gt;
+&lt;/glossary&gt;</programlisting>
+</informalexample>
+</listitem>
+</orderedlist>
+</refsect2>
+
+</refsect1>
+</refentry>
+
+<refentry id="glossentry.show.acronym">
+<refmeta>
+<refentrytitle>glossentry.show.acronym</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>glossentry.show.acronym</refname>
+<refpurpose>Display <sgmltag>glossentry</sgmltag> acronyms?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="glossentry.show.acronym.frag">
+&lt;xsl:param name="glossentry.show.acronym" select="'no'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A setting of <quote>yes</quote> means they should be displayed;
+<quote>no</quote> means they shouldn't. If <quote>primary</quote> is used,
+then they are shown as the primary text for the entry.</para>
+
+<note>
+<para>This setting controls both <sgmltag>acronym</sgmltag> and
+<sgmltag>abbrev</sgmltag> elements in the <sgmltag>glossentry</sgmltag>.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Miscellaneous</title>
+<refentry id="formal.procedures">
+<refmeta>
+<refentrytitle>formal.procedures</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>formal.procedures</refname>
+<refpurpose>Selects formal or informal procedures</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.procedures.frag">
+&lt;xsl:param name="formal.procedures" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Formal procedures are numbered and always have a title.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="formal.title.placement">
+<refmeta>
+<refentrytitle>formal.title.placement</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>formal.title.placement</refname>
+<refpurpose>Specifies where formal object titles should occur</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="formal.title.placement.frag">
+&lt;xsl:param name="formal.title.placement"&gt;
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Specifies where formal object titles should occur. For each formal object
+type (<sgmltag>figure</sgmltag>,
+<sgmltag>example</sgmltag>,
+<sgmltag>equation</sgmltag>,
+<sgmltag>table</sgmltag>, and <sgmltag>procedure</sgmltag>)
+you can specify either the keyword
+<quote><literal moreinfo="none">before</literal></quote> or
+<quote><literal moreinfo="none">after</literal></quote>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.default.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.default.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.default.title.end.punct</refname>
+<refpurpose>Default punctuation character on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.default.title.end.punct.frag">&lt;xsl:param name="runinhead.default.title.end.punct" select="'.'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="runinhead.title.end.punct">
+<refmeta>
+<refentrytitle>runinhead.title.end.punct</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>runinhead.title.end.punct</refname>
+<refpurpose>Characters that count as punctuation on a run-in-head</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="runinhead.title.end.punct.frag">&lt;xsl:param name="runinhead.title.end.punct" select="'.!?:'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="show.comments">
+<refmeta>
+<refentrytitle>show.comments</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.comments</refname>
+<refpurpose>Display <sgmltag>comment</sgmltag> elements?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="show.comments.frag">&lt;xsl:param name="show.comments"&gt;1&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), comments will be displayed, otherwise they are suppressed.
+Comments here refers to the <sgmltag>comment</sgmltag> element,
+which will be renamed <sgmltag>remark</sgmltag> in DocBook V4.0,
+not XML comments (&lt;-- like this --&gt;) which are unavailable.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="show.revisionflag">
+<refmeta>
+<refentrytitle>show.revisionflag</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>show.revisionflag</refname>
+<refpurpose>Enable decoration of elements that have a revisionflag</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="show.revisionflag.frag">&lt;xsl:param name="show.revisionflag"&gt;0&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+If <literal moreinfo="none">show.revisionflag</literal> is turned on, then the stylesheets
+may produce additional markup designed to allow a CSS stylesheet to
+highlight elements that have specific revisionflag settings.</para>
+
+<para>The markup inserted will be usually be either a &lt;span&gt; or &lt;div&gt;
+with an appropriate <literal moreinfo="none">class</literal> attribute. (The value of
+the class attribute will be the same as the value of the revisionflag
+attribute). In some contexts, for example tables, where extra markup
+would be structurally illegal, the class attribute will be added to the
+appropriate container element.</para>
+
+<para>In general, the stylesheets only test for revisionflag in contexts
+where an importing stylesheet would have to redefine whole templates.
+Most of the revisionflag processing is expected to be done by another
+stylesheet, for example <filename moreinfo="none">changebars.xsl</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim">
+<refmeta>
+<refentrytitle>shade.verbatim</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim</refname>
+<refpurpose>Should verbatim environments be shaded?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.frag">&lt;xsl:param name="shade.verbatim" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>In the FO stylesheet, if this parameter is non-zero then the
+<property moreinfo="none">shade.verbatim.style</property> properties will be applied
+to verbatim environments.</para>
+
+<para>In the HTML stylesheet, this parameter is now deprecated. Use
+CSS instead.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="shade.verbatim.style">
+<refmeta>
+<refentrytitle>shade.verbatim.style</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>shade.verbatim.style</refname>
+<refpurpose>Properties that specify the style of shaded verbatim listings</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="shade.verbatim.style.frag">
+&lt;xsl:attribute-set name="shade.verbatim.style"&gt;
+ &lt;xsl:attribute name="border"&gt;0&lt;/xsl:attribute&gt;
+ &lt;xsl:attribute name="bgcolor"&gt;#E0E0E0&lt;/xsl:attribute&gt;
+&lt;/xsl:attribute-set&gt;
+
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="punct.honorific">
+<refmeta>
+<refentrytitle>punct.honorific</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>punct.honorific</refname>
+<refpurpose>Punctuation after an honorific in a personal name.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="punct.honorific.frag">
+&lt;xsl:param name="punct.honorific" select="'.'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the punctuation that should be added after an
+honorific in a personal name.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="segmentedlist.as.table">
+<refmeta>
+<refentrytitle>segmentedlist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>segmentedlist.as.table</refname>
+<refpurpose>Format segmented lists as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="segmentedlist.as.table.frag">
+&lt;xsl:param name="segmentedlist.as.table" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>segmentedlist</sgmltag>s will be formatted as
+tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="variablelist.as.table">
+<refmeta>
+<refentrytitle>variablelist.as.table</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>variablelist.as.table</refname>
+<refpurpose>Format <sgmltag>variablelist</sgmltag>s as tables?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="variablelist.as.table.frag">
+&lt;xsl:param name="variablelist.as.table" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, <sgmltag>variablelist</sgmltag>s will be formatted as
+tables.</para>
+
+<para>This parameter only applys to the HTML transformations. In the
+FO case, proper list markup is robust enough to handle the formatting.
+But see also <parameter moreinfo="none">variablelist.as.blocks</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.in.alt">
+<refmeta>
+<refentrytitle>tex.math.in.alt</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.in.alt</refname>
+<refpurpose>TeX notation used for equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.in.alt.frag">
+&lt;xsl:param name="tex.math.in.alt" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want type math directly in TeX notation in equations,
+this parameter specifies notation used. Currently are supported two
+values -- <literal moreinfo="none">plain</literal> and <literal moreinfo="none">latex</literal>. Empty
+value means that you are not using TeX math at all.</para>
+
+<para>Preferred way for including TeX alternative of math is inside of
+<sgmltag>textobject</sgmltag> element. Eg.:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;inlinemediaobject&gt;
+&lt;imageobject&gt;
+&lt;imagedata fileref="eq1.gif"/&gt;
+&lt;/imageobject&gt;
+&lt;textobject&gt;&lt;phrase&gt;E=mc squared&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;textobject role="tex"&gt;&lt;phrase&gt;E=mc^2&lt;/phrase&gt;&lt;/textobject&gt;
+&lt;/inlinemediaobject&gt;
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you are using <sgmltag>graphic</sgmltag> element, you can
+store TeX inside <sgmltag>alt</sgmltag> element:</para>
+
+<programlisting format="linespecific">&lt;inlineequation&gt;
+&lt;alt role="tex"&gt;a^2+b^2=c^2&lt;/alt&gt;
+&lt;graphic fileref="a2b2c2.gif"/&gt;
+&lt;/inlineequation&gt;</programlisting>
+
+<para>If you want use this feature, you should process your FO with
+PassiveTeX, which only supports TeX math notation. When calling
+stylsheet, don't forget to specify also
+passivetex.extensions=1.</para>
+
+<para>If you want equations in HTML, just process generated file
+<filename moreinfo="none">tex-math-equations.tex</filename> by TeX or LaTeX. Then run
+dvi2bitmap program on result DVI file. You will get images for
+equations in your document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.file">
+<refmeta>
+<refentrytitle>tex.math.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.file</refname>
+<refpurpose>Name of temporary file for generating images from equations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.file.frag">
+&lt;xsl:param name="tex.math.file" select="'tex-math-equations.tex'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of auxiliary file for TeX equations. This file can be
+processed by dvi2bitmap to get bitmap versions of equations for HTML
+output.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="tex.math.delims">
+<refmeta>
+<refentrytitle>tex.math.delims</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>tex.math.delims</refname>
+<refpurpose>Should be equations outputed for processing by TeX
+automatically surrounded by math mode delimiters</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="tex.math.delims.frag">
+&lt;xsl:param name="tex.math.delims" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>For compatibility with DSSSL based DBTeXMath from Allin Cottrell
+you should set this parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="pixels.per.inch">
+<refmeta>
+<refentrytitle>pixels.per.inch</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>pixels.per.inch</refname>
+<refpurpose>How many pixels are there per inch?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="pixels.per.inch.frag">
+&lt;xsl:param name="pixels.per.inch" select="90"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When lengths are converted to pixels, this value is used to
+determine the size of a pixel. The default value is taken from the
+<ulink url="http://www.w3.org/TR/xsl/slice5.html#pixels">XSL
+Recommendation</ulink>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="points.per.em">
+<refmeta>
+<refentrytitle>points.per.em</refentrytitle>
+<refmiscinfo role="type">number</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>points.per.em</refname>
+<refpurpose>Specify the nominal size of an em-space in points</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="points.per.em.frag">
+&lt;xsl:param name="points.per.em" select="10"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.svg">
+<refmeta>
+<refentrytitle>use.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.svg</refname>
+<refpurpose>Allow SVG in the result tree?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.svg.frag">
+&lt;xsl:param name="use.svg" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, SVG will be considered an acceptable image format. SVG
+is passed through to the result tree, so correct rendering of the resulting
+diagram depends on the formatter (FO processor or web browser) that is used
+to process the output from the stylesheet.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.role.as.xrefstyle">
+<refmeta>
+<refentrytitle>use.role.as.xrefstyle</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.as.xrefstyle</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute for
+<sgmltag class="attribute">xrefstyle</sgmltag> on <sgmltag>xref</sgmltag>?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.as.xrefstyle.frag">
+&lt;xsl:param name="use.role.as.xrefstyle" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>xref</sgmltag> will be used to select the cross reference style.
+The <ulink url="http://www.oasis-open.org/docbook/">DocBook
+Technical Committee</ulink> recently added an
+<sgmltag class="attribute">xrefstyle</sgmltag> attribute for this purpose.
+If the <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+is present, <sgmltag class="attribute">role</sgmltag> will be ignored, regardless
+of this setting.</para>
+
+<para>Until an official DocBook release that includes the new
+attribute, this flag allows <sgmltag class="attribute">role</sgmltag>
+to serve that purpose.</para>
+
+</refsect1>
+
+<refsect1><title>Example</title>
+
+<para>The following small stylesheet shows how to configure the stylesheets to make
+use of the cross reference style:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0"?&gt;
+&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0"&gt;
+
+&lt;xsl:import href="../xsl/html/docbook.xsl"/&gt;
+
+&lt;xsl:output method="html"/&gt;
+
+&lt;xsl:param name="local.l10n.xml" select="document('')"/&gt;
+&lt;l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"&gt;
+ &lt;l:l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="en"&gt;
+ &lt;l:context name="xref"&gt;
+ &lt;l:template name="chapter" style="title" text="Chapter %n, %t"/&gt;
+ &lt;l:template name="chapter" text="Chapter %n"/&gt;
+ &lt;/l:context&gt;
+ &lt;/l:l10n&gt;
+&lt;/l:i18n&gt;
+
+&lt;/xsl:stylesheet&gt;</programlisting>
+
+<para>With this stylesheet, the cross references in the following document:</para>
+
+<programlisting format="linespecific">&lt;?xml version="1.0" encoding="utf-8"?&gt;
+&lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"&gt;
+&lt;book id="book"&gt;&lt;title&gt;Book&lt;/title&gt;
+
+&lt;preface&gt;
+&lt;title&gt;Preface&lt;/title&gt;
+
+&lt;para&gt;Normal: &lt;xref linkend="ch1"/&gt;.&lt;/para&gt;
+&lt;para&gt;Title: &lt;xref xrefstyle="title" linkend="ch1"/&gt;.&lt;/para&gt;
+
+&lt;/preface&gt;
+
+&lt;chapter id="ch1"&gt;
+&lt;title&gt;First Chapter&lt;/title&gt;
+
+&lt;para&gt;Irrelevant.&lt;/para&gt;
+
+&lt;/chapter&gt;
+&lt;/book&gt;</programlisting>
+
+<para>will appear as:</para>
+
+<informalexample>
+<para>Normal: Chapter 1.</para>
+<para>Title: Chapter 1, <emphasis>First Chapter</emphasis>.</para>
+</informalexample>
+</refsect1>
+
+</refentry>
+
+<refentry id="menuchoice.separator">
+<refmeta>
+<refentrytitle>menuchoice.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.separator</refname>
+<refpurpose>Separator between items of a <sgmltag>menuchoice</sgmltag>
+other than <sgmltag>guimenuitem</sgmltag> and
+<sgmltag>guisubmenu</sgmltag></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.separator.frag">
+&lt;xsl:param name="menuchoice.separator" select="'+'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> other
+than <sgmltag>guimenuitem</sgmltag> and <sgmltag>guisubmenu</sgmltag>. The latter
+elements are linked with <parameter moreinfo="none">menuchoice.menu.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="menuchoice.menu.separator">
+<refmeta>
+<refentrytitle>menuchoice.menu.separator</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>menuchoice.menu.separator</refname>
+<refpurpose>Separator between items of a <sgmltag>menuchoice</sgmltag>
+with <sgmltag>guimenuitem</sgmltag> or
+<sgmltag>guisubmenu</sgmltag></refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="menuchoice.menu.separator.frag">
+&lt;xsl:param name="menuchoice.menu.separator" select="'-&gt;'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator used to connect items of a <sgmltag>menuchoice</sgmltag> with
+<sgmltag>guimenuitem</sgmltag> or <sgmltag>guisubmenu</sgmltag>. Other elements
+are linked with <parameter moreinfo="none">menuchoice.separator</parameter>.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.float.class">
+<refmeta>
+<refentrytitle>default.float.class</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.float.class</refname>
+<refpurpose>Specifies the default float class</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.float.class.frag">
+&lt;xsl:param name="default.float.class" select="'before'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.format">
+<refmeta>
+<refentrytitle>footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.format.frag">
+&lt;xsl:param name="footnote.number.format" select="'1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.format">
+<refmeta>
+<refentrytitle>table.footnote.number.format</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.format</refname>
+<refpurpose>Identifies the format used for footnote numbers in tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.format.frag">
+&lt;xsl:param name="table.footnote.number.format" select="'a'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">table.footnote.number.format</parameter> specifies the format
+to use for footnote numeration (1, i, I, a, or A) in tables.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="footnote.number.symbols">
+<refmeta>
+<refentrytitle>footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>footnote.number.symbols</refname>
+<refpurpose>Special characters to use as footnote markers</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="footnote.number.symbols.frag">
+&lt;xsl:param name="footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">footnote.number.symbols</parameter> is not the empty string,
+footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="table.footnote.number.symbols">
+<refmeta>
+<refentrytitle>table.footnote.number.symbols</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>table.footnote.number.symbols</refname>
+<refpurpose>Special characters to use a footnote markers in tables</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="table.footnote.number.symbols.frag">
+&lt;xsl:param name="table.footnote.number.symbols" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If <parameter moreinfo="none">table.footnote.number.symbols</parameter> is not the empty string,
+table footnotes will use the characters it contains as footnote symbols. For example,
+<quote>*&amp;#x2020;&amp;#x2021;&amp;#x25CA;&amp;#x2720;</quote> will identify
+footnotes with <quote>*</quote>, <quote>†</quote>, <quote>‡</quote>,
+<quote>◊</quote>, and <quote>✠</quote>. If there are more footnotes
+than symbols, the stylesheets will fall back to numbered footnotes using
+<parameter moreinfo="none">table.footnote.number.format</parameter>.</para>
+
+<para>The use of symbols for footnotes depends on the ability of your
+processor (or browser) to render the symbols you select. Not all systems are
+capable of displaying the full range of Unicode characters. If the quoted characters
+in the preceding paragraph are not displayed properly, that's a good indicator
+that you may have trouble using those symbols for footnotes.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.with.number.and.title">
+<refmeta>
+<refentrytitle>xref.with.number.and.title</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.with.number.and.title</refname>
+<refpurpose>Use number and title in cross references</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.with.number.and.title.frag">
+&lt;xsl:param name="xref.with.number.and.title" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>FIXME:</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-page.separator">
+<refmeta>
+<refentrytitle>xref.label-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-page.separator</refname>
+<refpurpose>Punctuation or space separating label from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-page.separator.frag">&lt;xsl:param name="xref.label-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an
+<sgmltag class="element">xref</sgmltag> or
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and page
+but no title,
+then the value of this parameter is inserted between
+label and page number in the output.
+If a title is included, then other separators are used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.label-title.separator">
+<refmeta>
+<refentrytitle>xref.label-title.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.label-title.separator</refname>
+<refpurpose>Punctuation or space separating label from title in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.label-title.separator.frag">&lt;xsl:param name="xref.label-title.separator"&gt;: &lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an
+<sgmltag class="element">xref</sgmltag> or
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both label and title,
+then the value of this parameter is inserted between
+label and title in the output.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="xref.title-page.separator">
+<refmeta>
+<refentrytitle>xref.title-page.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>xref.title-page.separator</refname>
+<refpurpose>Punctuation or space separating title from page number in xref</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="xref.title-page.separator.frag">&lt;xsl:param name="xref.title-page.separator"&gt;&lt;xsl:text&gt; &lt;/xsl:text&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>
+This parameter allows you to control the punctuation of certain
+types of generated cross reference text.
+When cross reference text is generated for an
+<sgmltag class="element">xref</sgmltag> or
+<sgmltag class="element">olink</sgmltag> element
+using an <sgmltag class="attribute">xrefstyle</sgmltag> attribute
+that makes use of the <literal moreinfo="none">select:</literal> feature,
+and the selected components include both title and page number,
+then the value of this parameter is inserted between
+title and page number in the output.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="insert.xref.page.number">
+<refmeta>
+<refentrytitle>insert.xref.page.number</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>insert.xref.page.number</refname>
+<refpurpose>Turns page numbers in xrefs on and off</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="insert.xref.page.number.frag">
+&lt;xsl:param name="insert.xref.page.number"&gt;no&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of this parameter determines if
+cross references (<sgmltag>xref</sgmltag>s) in
+printed output will
+include page number citations.
+It has three possible values.
+</para>
+<variablelist>
+<varlistentry>
+<term>no</term>
+<listitem><para>No page number references will be generated.
+</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>yes</term>
+<listitem><para>Page number references will be generated
+for all <sgmltag>xref</sgmltag> elements.
+The style of page reference may be changed
+if an <sgmltag class="attribute">xrefstyle</sgmltag>
+attribute is used.
+</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>maybe</term>
+<listitem><para>Page number references will not be generated
+for an <sgmltag>xref</sgmltag> element unless
+it has an
+<sgmltag class="attribute">xrefstyle</sgmltag>
+attribute whose value specifies a page reference.
+</para></listitem>
+</varlistentry>
+</variablelist>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Graphics</title>
+<refentry id="img.src.path">
+<refmeta>
+<refentrytitle>img.src.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>img.src.path</refname>
+<refpurpose>Path to HTML image files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="img.src.path.frag">&lt;xsl:param name="img.src.path"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Add a path prefix to each HTML
+<sgmltag class="element">img</sgmltag> element's
+<sgmltag class="attribute">src</sgmltag> attribute.
+This path could relative to the directory where the HTML
+files are created, or it could be an absolute URI.
+The default value is empty.
+Be sure to include a trailing slash if needed.
+</para>
+<para>This prefix is not applied to any filerefs that start
+with "/" or contain "//:".
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="graphic.default.extension">
+<refmeta>
+<refentrytitle>graphic.default.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>graphic.default.extension</refname>
+<refpurpose>Default extension for graphic filenames</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="graphic.default.extension.frag">&lt;xsl:param name="graphic.default.extension"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If a <sgmltag>graphic</sgmltag> or <sgmltag>mediaobject</sgmltag>
+includes a reference to a filename that does not include an extension,
+and the <sgmltag class="attribute">format</sgmltag> attribute is
+<emphasis>unspecified</emphasis>, the default extension will be used.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="default.image.width">
+<refmeta>
+<refentrytitle>default.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>default.image.width</refname>
+<refpurpose>The default width of images</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="default.image.width.frag">
+&lt;xsl:param name="default.image.width" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, this value will be used for the
+<sgmltag class="attribute">width</sgmltag> attribute on
+images that do not specify any
+<ulink url="http://docbook.org/tdg/en/html/imagedata.html#viewport.area">viewport
+dimensions</ulink>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.image.width">
+<refmeta>
+<refentrytitle>nominal.image.width</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.width</refname>
+<refpurpose>The nominal image width</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.image.width.frag">
+&lt;xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Graphic widths expressed as a percentage are problematic. In the
+following discussion, we speak of width and contentwidth, but
+the same issues apply to depth and contentdepth.</para>
+
+<para>A width of 50% means "half of the available space for the image."
+That's fine. But note that in HTML, this is a dynamic property and
+the image size will vary if the browser window is resized.</para>
+
+<para>A contentwidth of 50% means "half of the actual image width".
+But what does that mean if the stylesheets cannot assess the image's
+actual size? Treating this as a width of 50% is one possibility, but
+it produces behavior (dynamic scaling) that seems entirely out of
+character with the meaning.</para>
+
+<para>Instead, the stylesheets define a
+<parameter moreinfo="none">nominal.image.width</parameter> and convert percentages to
+actual values based on that nominal size.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="nominal.image.depth">
+<refmeta>
+<refentrytitle>nominal.image.depth</refentrytitle>
+<refmiscinfo role="type">length</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>nominal.image.depth</refname>
+<refpurpose>Nominal image depth</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="nominal.image.depth.frag">
+&lt;xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>See <parameter moreinfo="none">nominal.image.width</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="use.embed.for.svg">
+<refmeta>
+<refentrytitle>use.embed.for.svg</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.embed.for.svg</refname>
+<refpurpose>Use HTML <sgmltag>embed</sgmltag> for SVG?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.embed.for.svg.frag">
+&lt;xsl:param name="use.embed.for.svg" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, an <sgmltag>embed</sgmltag> element will be created for
+SVG figures. An <sgmltag>object</sgmltag> is <emphasis>always</emphasis> created,
+this parameter merely controls whether or not an additional <sgmltag>embed</sgmltag>
+is generated inside the <sgmltag>object</sgmltag>.</para>
+
+<para>On the plus side, this may be more portable among browsers and plug-ins.
+On the minus side, it isn't valid HTML.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="make.graphic.viewport">
+<refmeta>
+<refentrytitle>make.graphic.viewport</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>make.graphic.viewport</refname>
+<refpurpose>Use tables in HTML to make viewports for graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="make.graphic.viewport.frag">
+&lt;xsl:param name="make.graphic.viewport" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The HTML <sgmltag>img</sgmltag> element only supports the notion
+of content-area scaling; it doesn't support the distinction between a
+content-area and a viewport-area, so we have to make some compromises.</para>
+
+<para>If <parameter moreinfo="none">make.graphic.viewport</parameter> is non-zero, a table
+will be used to frame the image. This creates an effective viewport-area.
+</para>
+
+<para>Tables and alignment don't work together, so this parameter is ignored
+if alignment is specified on an image.</para>
+</refsect1>
+</refentry>
+
+<refentry id="preferred.mediaobject.role">
+<refmeta>
+<refentrytitle>preferred.mediaobject.role</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>preferred.mediaobject.role</refname>
+<refpurpose>Select which mediaobject to use based on
+this value of an object's <sgmltag class="attribute">role</sgmltag> attribute.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="preferred.mediaobject.role.frag">
+&lt;xsl:param name="preferred.mediaobject.role"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>A mediaobject may contain several objects such as imageobjects.
+If the parameter <parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is non-zero, then the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s and other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used. If one of the objects has a role value that matches the
+preferred.mediaobject.role parameter, then it has first
+priority for selection. If more than one has such a
+role value, the first one is used.
+</para>
+<para>
+See the <parameter moreinfo="none">use.role.for.mediaobject</parameter> parameter
+for the sequence of selection.</para>
+</refsect1>
+</refentry>
+
+<refentry id="use.role.for.mediaobject">
+<refmeta>
+<refentrytitle>use.role.for.mediaobject</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>use.role.for.mediaobject</refname>
+<refpurpose>Use <sgmltag class="attribute">role</sgmltag> attribute
+value for selecting which of several objects within a mediaobject to use.
+</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="use.role.for.mediaobject.frag">
+&lt;xsl:param name="use.role.for.mediaobject" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the <sgmltag class="attribute">role</sgmltag> attribute on
+<sgmltag>imageobject</sgmltag>s or other objects within a <sgmltag>mediaobject</sgmltag> container will be used to select which object will be
+used.
+</para>
+<para>
+The order of selection when then parameter is non-zero is:
+</para>
+<orderedlist inheritnum="ignore" continuation="restarts">
+<listitem>
+ <para>If the stylesheet parameter <parameter moreinfo="none">preferred.mediaobject.role</parameter> has a value, then the object whose role equals that value is selected.</para>
+</listitem>
+<listitem>
+<para>Else if an object's role attribute has a value of
+<literal moreinfo="none">html</literal> for HTML processing or
+<literal moreinfo="none">fo</literal> for FO output, then the first
+of such objects is selected.
+</para>
+</listitem>
+<listitem>
+<para>Else the first suitable object is selected.</para>
+</listitem>
+</orderedlist>
+<para>
+If the value of
+<parameter moreinfo="none">use.role.for.mediaobject</parameter>
+is zero, then role attributes are not considered
+and the first suitable object
+with or without a role value is used.
+</para>
+</refsect1>
+</refentry>
+
+<refentry id="ignore.image.scaling">
+<refmeta>
+<refentrytitle>ignore.image.scaling</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>ignore.image.scaling</refname>
+<refpurpose>Tell the stylesheets to ignore the author's image scaling attributes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="ignore.image.scaling.frag">
+&lt;xsl:param name="ignore.image.scaling" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the scaling attributes on graphics and media objects are
+ignored.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Chunking</title>
+<refentry id="chunker.output.cdata-section-elements">
+<refmeta>
+<refentrytitle>chunker.output.cdata-section-elements</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.cdata-section-elements</refname>
+<refpurpose>List of elements to escape with CDATA sections</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.cdata-section-elements" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the list of elements that should be escaped
+as CDATA sections by the chunking stylesheet. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.doctype-public">
+<refmeta>
+<refentrytitle>chunker.output.doctype-public</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-public</refname>
+<refpurpose>Public identifer to use in the document type of generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-public" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the public identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.doctype-system">
+<refmeta>
+<refentrytitle>chunker.output.doctype-system</refentrytitle>
+<refmiscinfo role="type">uri</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.doctype-system</refname>
+<refpurpose>System identifier to use for the document type in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.doctype-system" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the system identifier that should be used by
+the chunking stylesheet in the document type declaration of chunked pages.
+Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.encoding">
+<refmeta>
+<refentrytitle>chunker.output.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.encoding</refname>
+<refpurpose>Encoding used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the encoding to be used in files
+generated by the chunking stylesheet. Not all processors support
+specification of this parameter.
+</para>
+
+<para>This parameter used to be named <literal moreinfo="none">default.encoding</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.indent">
+<refmeta>
+<refentrytitle>chunker.output.indent</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.indent</refname>
+<refpurpose>Specification of indentation on generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.indent" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the indent
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.media-type">
+<refmeta>
+<refentrytitle>chunker.output.media-type</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.media-type</refname>
+<refpurpose>Media type to use in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.media-type" select="''"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the media type that should be used by
+the chunking stylesheet. Not all processors support specification of
+this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.method">
+<refmeta>
+<refentrytitle>chunker.output.method</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+<refmiscinfo role="value">html</refmiscinfo>
+<refmiscinfo role="value">xml</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.method</refname>
+<refpurpose>Method used in generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.method" select="'html'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the output method to be used in files
+generated by the chunking stylesheet.
+</para>
+
+<para>This parameter used to be named <literal moreinfo="none">output.method</literal>.</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.omit-xml-declaration">
+<refmeta>
+<refentrytitle>chunker.output.omit-xml-declaration</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.omit-xml-declaration</refname>
+<refpurpose>Omit-xml-declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.omit-xml-declaration" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the omit-xml-declaration
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunker.output.standalone">
+<refmeta>
+<refentrytitle>chunker.output.standalone</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunker.output.standalone</refname>
+<refpurpose>Standalone declaration for generated pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="chunker.output.standalone" select="'no'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies the value of the standalone
+specification for generated pages. Not all processors support
+specification of this parameter.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="saxon.character.representation">
+<refmeta>
+<refentrytitle>saxon.character.representation</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>saxon.character.representation</refname>
+<refpurpose>Saxon character representation used in generated HTML pages</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>&lt;xsl:param name="saxon.character.representation" select="'entity;decimal'"/&gt;
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This character representation is used in files generated by chunking stylesheet. If
+you want to suppress entity references for characters with direct representation
+in default.encoding, set this parameter to value <literal moreinfo="none">native</literal>.
+</para>
+
+<note>
+<para>This parameter is documented here, but the declaration is actually
+in the <filename moreinfo="none">chunker.xsl</filename> stylesheet module.</para>
+</note>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.ext">
+<refmeta>
+<refentrytitle>html.ext</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>html.ext</refname>
+<refpurpose>Identifies the extension of generated HTML files</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.ext.frag">
+&lt;xsl:param name="html.ext" select="'.html'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The extension identified by <parameter moreinfo="none">html.ext</parameter> will
+be used as the filename extension for chunks created by this stylesheet.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="html.extra.head.links">
+<refmeta>
+<refentrytitle>html.extra.head.links</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>html.extra.head.links</refname>
+<refpurpose>Toggle extra HTML head link information</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="html.extra.head.links.frag">
+&lt;xsl:param name="html.extra.head.links" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, extra <sgmltag>link</sgmltag> elements will be
+generated in the <sgmltag>head</sgmltag> of chunked HTML files. These
+extra links point to chapters, appendixes, sections, etc. as supported
+by the <quote>Site Navigation Bar</quote> in Mozilla 1.0 (as of CR1, at least).
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="root.filename">
+<refmeta>
+<refentrytitle>root.filename</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>root.filename</refname>
+<refpurpose>Identifies the name of the root HTML file when chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="root.filename.frag">&lt;xsl:param name="root.filename" select="'index'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">root.filename</parameter> is the base filename for
+the chunk created for the root of each document processed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="base.dir">
+<refmeta>
+<refentrytitle>base.dir</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>base.dir</refname>
+<refpurpose>The base directory of chunks</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="base.dir.frag">&lt;xsl:param name="base.dir" select="''"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If specified, the <literal moreinfo="none">base.dir</literal> identifies
+the output directory for chunks. (If not specified, the output directory
+is system dependent.)</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="generate.manifest">
+ <refmeta>
+ <refentrytitle>generate.manifest</refentrytitle>
+ <refmiscinfo role="type">boolean</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>generate.manifest</refname>
+ <refpurpose>Generate a manifest file?</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <programlisting id="generate.manifest.frag">&lt;xsl:param name="generate.manifest" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+ </refsynopsisdiv>
+
+ <refsect1><title>Description</title>
+
+ <para>If non-zero, a list of HTML files generated by the
+ stylesheet transformation is written to the file named by
+ the <parameter moreinfo="none">manifest</parameter> parameter.</para>
+
+ </refsect1>
+</refentry>
+
+<refentry id="manifest">
+ <refmeta>
+ <refentrytitle>manifest</refentrytitle>
+ <refmiscinfo role="type">string</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+ <refname>manifest</refname>
+ <refpurpose>Name of manifest file</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <programlisting id="manifest.frag">&lt;xsl:param name="manifest" select="'HTML.manifest'"&gt;&lt;/xsl:param&gt;</programlisting>
+ </refsynopsisdiv>
+
+ <refsect1><title>Description</title>
+
+ <para>The name of the file to which a manifest is written (if the
+ value of the <parameter moreinfo="none">generate.manifest</parameter> parameter
+ is non-zero).</para>
+
+ </refsect1>
+</refentry>
+
+<refentry id="manifest.in.base.dir">
+<refmeta>
+<refentrytitle>manifest.in.base.dir</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>manifest.in.base.dir</refname>
+<refpurpose>Should be manifest file written in $base.dir?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="manifest.in.base.dir.frag">
+&lt;xsl:param name="manifest.in.base.dir" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero manifest file and project files for HTML Help and
+Eclipse Help are written into <parameter moreinfo="none">base.dir</parameter> instead
+of current directory.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="chunk.toc">
+<refmeta>
+<refentrytitle>chunk.toc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.toc</refname>
+<refpurpose>An explicit TOC to be used for chunking</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.toc.frag">
+&lt;xsl:param name="chunk.toc" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The <parameter moreinfo="none">chunk.toc</parameter> identifies an explicit TOC that
+will be used for chunking. This parameter is only used by the
+<filename moreinfo="none">chunktoc.xsl</filename> stylesheet (and customization layers built
+from it).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.tocs.and.lots">
+<refmeta>
+<refentrytitle>chunk.tocs.and.lots</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.tocs.and.lots</refname>
+<refpurpose>Should ToC and LoTs be in separate chunks?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.tocs.and.lots.frag">
+&lt;xsl:param name="chunk.tocs.and.lots" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, ToC and LoT (List of Examples, List of Figures, etc.)
+will be put in a separate chunk. At the moment, this chunk is not in the
+normal forward/backward navigation list. Instead, a new link is added to the
+navigation footer.</para>
+
+<para>This feature is still somewhat experimental. Feedback welcome.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.separate.lots">
+<refmeta>
+<refentrytitle>chunk.separate.lots</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.separate.lots</refname>
+<refpurpose>Should each LoT be in its own separate chunk?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.separate.lots.frag">
+&lt;xsl:param name="chunk.separate.lots" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, each of the ToC and LoTs
+(List of Examples, List of Figures, etc.)
+will be put in its own separate chunk.
+The title page includes generated links to each of the separate files.
+</para>
+<para>
+This feature depends on the
+<literal moreinfo="none">chunk.tocs.and.lots</literal>
+parameter also being non-zero.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.section.depth">
+<refmeta>
+<refentrytitle>chunk.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>chunk.section.depth</refname>
+<refpurpose>Depth to which sections should be chunked</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.section.depth.frag">
+&lt;xsl:param name="chunk.section.depth" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter sets the depth of section chunking.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.first.sections">
+<refmeta>
+<refentrytitle>chunk.first.sections</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.first.sections</refname>
+<refpurpose>Chunk the first top-level section?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.first.sections.frag">
+&lt;xsl:param name="chunk.first.sections" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, a chunk will be created for the first top-level
+<sgmltag>sect1</sgmltag> or <sgmltag>section</sgmltag> elements in
+each component. Otherwise, that section will be part of the chunk for
+its parent.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="chunk.quietly">
+<refmeta>
+<refentrytitle>chunk.quietly</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>chunk.quietly</refname>
+<refpurpose>Omit the chunked filename messages.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="chunk.quietly.frag">
+&lt;xsl:param name="chunk.quietly" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If zero (the default), the XSL processor emits a message naming
+each separate chunk filename as it is being output.
+If nonzero, then the messages are suppressed.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics">
+<refmeta>
+<refentrytitle>navig.graphics</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics</refname>
+<refpurpose>Use graphics in navigational headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.frag">&lt;xsl:param name="navig.graphics" select="0"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero), the navigational headers and footers in chunked
+HTML are presented in an alternate style that uses
+graphical icons for Next, Previous, Up, and Home.
+Default graphics are provided in the distribution.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics.extension">
+<refmeta>
+<refentrytitle>navig.graphics.extension</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.extension</refname>
+<refpurpose>Extension for navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.extension.frag">&lt;xsl:param name="navig.graphics.extension" select="'.gif'"&gt;&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the filename extension to use on navigational graphics used
+in the headers and footers of chunked HTML.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.graphics.path">
+<refmeta>
+<refentrytitle>navig.graphics.path</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.graphics.path</refname>
+<refpurpose>Path to navigational graphics</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.graphics.path.frag">&lt;xsl:param name="navig.graphics.path"&gt;images/&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the path, probably relative to the directory where the HTML
+files are created, to the navigational graphics used in the
+headers and footers of chunked HTML.
+</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="navig.showtitles">
+<refmeta>
+<refentrytitle>navig.showtitles</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>navig.showtitles</refname>
+<refpurpose>Display titles in HTML headers and footers?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="navig.showtitles.frag">&lt;xsl:param name="navig.showtitles"&gt;1&lt;/xsl:param&gt;</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If true (non-zero),
+the headers and footers of chunked HTML
+display the titles of the next and previous chunks,
+along with the words 'Next' and 'Previous' (or the
+equivalent graphical icons if navig.graphics is true).
+If false (zero), then only the words 'Next' and 'Previous'
+(or the icons) are displayed.
+</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+<refentry id="profile.arch">
+<refmeta>
+<refentrytitle>profile.arch</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.arch</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">arch</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.arch.frag">
+&lt;xsl:param name="profile.arch" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.condition">
+<refmeta>
+<refentrytitle>profile.condition</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.condition</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">condition</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.condition.frag">
+&lt;xsl:param name="profile.condition" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.conformance">
+<refmeta>
+<refentrytitle>profile.conformance</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.conformance</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">conformance</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.conformance.frag">
+&lt;xsl:param name="profile.conformance" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.lang">
+<refmeta>
+<refentrytitle>profile.lang</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.lang</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">lang</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.lang.frag">
+&lt;xsl:param name="profile.lang" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.os">
+<refmeta>
+<refentrytitle>profile.os</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.os</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">os</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.os.frag">
+&lt;xsl:param name="profile.os" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revision">
+<refmeta>
+<refentrytitle>profile.revision</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revision</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revision</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revision.frag">
+&lt;xsl:param name="profile.revision" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.revisionflag">
+<refmeta>
+<refentrytitle>profile.revisionflag</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.revisionflag</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">revisionflag</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.revisionflag.frag">
+&lt;xsl:param name="profile.revisionflag" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.role">
+<refmeta>
+<refentrytitle>profile.role</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.role</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">role</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.role.frag">
+&lt;xsl:param name="profile.role" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+<warning>
+<para>Note that <sgmltag class="attribute">role</sgmltag> is often
+used for other purposes than profiling. For example it is commonly
+used to get emphasize in bold font:</para>
+
+<programlisting format="linespecific">&lt;emphasis role="bold"&gt;very important&lt;/emphasis&gt;</programlisting>
+
+<para>If you are using <sgmltag class="attribute">role</sgmltag> for
+these purposes do not forget to add values like <literal moreinfo="none">bold</literal> to
+value of this parameter. If you forgot you will get document with
+small pieces missing which are very hard to track.</para>
+
+<para>For this reason it is not recommended to use <sgmltag class="attribute">role</sgmltag> attribute for profiling. You should
+rather use profiling specific attributes like <sgmltag class="attribute">userlevel</sgmltag>, <sgmltag class="attribute">os</sgmltag>, <sgmltag class="attribute">arch</sgmltag>, <sgmltag class="attribute">condition</sgmltag>, etc.</para>
+</warning>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.security">
+<refmeta>
+<refentrytitle>profile.security</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.security</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">security</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.security.frag">
+&lt;xsl:param name="profile.security" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.userlevel">
+<refmeta>
+<refentrytitle>profile.userlevel</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.userlevel</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">userlevel</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.userlevel.frag">
+&lt;xsl:param name="profile.userlevel" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.vendor">
+<refmeta>
+<refentrytitle>profile.vendor</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.vendor</refname>
+<refpurpose>Target profile for <sgmltag class="attribute">vendor</sgmltag>
+attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.vendor.frag">
+&lt;xsl:param name="profile.vendor" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.attribute">
+<refmeta>
+<refentrytitle>profile.attribute</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.attribute</refname>
+<refpurpose>Name of user-specified profiling attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.attribute.frag">
+&lt;xsl:param name="profile.attribute" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter is used in conjuction with <link linkend="profile.value"><parameter moreinfo="none">profile.value</parameter></link>.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.value">
+<refmeta>
+<refentrytitle>profile.value</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.value</refname>
+<refpurpose>Target profile for user-specified attribute</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.value.frag">
+&lt;xsl:param name="profile.value" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When you are using this parameter you must also specify name of
+profiling attribute with parameter <link linkend="profile.attribute"><parameter moreinfo="none">profile.attribute</parameter></link>.</para>
+
+<para>Value of this parameter specifies profiles which should be
+included in the output. You can specify multiple profiles by
+separating them by semicolon. You can change separator character by
+<link linkend="profile.separator"><parameter moreinfo="none">profile.separator</parameter></link>
+parameter.</para>
+
+<para>This parameter has effect only when you are using profiling
+stylesheets (<filename moreinfo="none">profile-docbook.xsl</filename>,
+<filename moreinfo="none">profile-chunk.xsl</filename>, …) instead of normal
+ones (<filename moreinfo="none">docbook.xsl</filename>,
+<filename moreinfo="none">chunk.xsl</filename>, …).</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="profile.separator">
+<refmeta>
+<refentrytitle>profile.separator</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>profile.separator</refname>
+<refpurpose>Separator character for compound profile values</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="profile.separator.frag">
+&lt;xsl:param name="profile.separator" select="';'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Separator character for compound profile values.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>HTML Help</title>
+<refentry id="htmlhelp.encoding">
+<refmeta>
+<refentrytitle>htmlhelp.encoding</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.encoding</refname>
+<refpurpose>Character encoding to use in files for HTML Help compiler.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.encoding.frag">
+&lt;xsl:param name="htmlhelp.encoding" select="'iso-8859-1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>HTML Help Compiler is not UTF-8 aware, so you should always use
+apropriate single-byte encoding here.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.autolabel">
+<refmeta>
+<refentrytitle>htmlhelp.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.autolabel.frag">
+&lt;xsl:param name="htmlhelp.autolabel" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.chm">
+<refmeta>
+<refentrytitle>htmlhelp.chm</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.chm</refname>
+<refpurpose>Filename of output HTML Help file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.chm.frag">
+&lt;xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of result
+CHM file than htmlhelp.chm.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.default.topic">
+<refmeta>
+<refentrytitle>htmlhelp.default.topic</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.default.topic</refname>
+<refpurpose>Name of file with default topic</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.default.topic.frag">
+&lt;xsl:param name="htmlhelp.default.topic" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Normally first chunk of document is displayed when you open HTML
+Help file. If you want to display another topic, simply set its
+filename by this parameter.</para>
+
+<para>This is useful especially if you don't generate ToC in front of
+your document and you also hide root element in ToC. E.g.:</para>
+
+<programlisting format="linespecific">&lt;xsl:param name="generate.book.toc" select="0"/&gt;
+&lt;xsl:param name="htmlhelp.hhc.show.root" select="0"/&gt;
+&lt;xsl:param name="htmlhelp.default.topic" select="'pr01.html'"/&gt;</programlisting>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.display.progress">
+<refmeta>
+<refentrytitle>htmlhelp.display.progress</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.display.progress</refname>
+<refpurpose>Display compile progress?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.display.progress.frag">
+&lt;xsl:param name="htmlhelp.display.progress" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can swith off display of compile progress by setting this
+parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.hhp">
+<refmeta>
+<refentrytitle>htmlhelp.hhp</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp</refname>
+<refpurpose>Filename of project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.frag">
+&lt;xsl:param name="htmlhelp.hhp" select="'htmlhelp.hhp'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of project
+file than htmlhelp.hhp.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc">
+<refmeta>
+<refentrytitle>htmlhelp.hhc</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc</refname>
+<refpurpose>Filename of TOC file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.frag">
+&lt;xsl:param name="htmlhelp.hhc" select="'toc.hhc'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of TOC file
+than toc.hhc.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.hhk</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhk</refname>
+<refpurpose>Filename of index file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhk.frag">
+&lt;xsl:param name="htmlhelp.hhk" select="'index.hhk'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of index file
+than index.hhk.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.tail">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.tail</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.tail</refname>
+<refpurpose>Additional content for project file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.tail.frag">
+&lt;xsl:param name="htmlhelp.hhp.tail"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include some additional parameters into project file,
+store appropriate part of project file into this parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.window">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.window</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.window</refname>
+<refpurpose>Name of default window.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.window.frag">
+&lt;xsl:param name="htmlhelp.hhp.window" select="'Main'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Name of default window. If empty no [WINDOWS] section will be
+added to project file.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhp.windows">
+<refmeta>
+<refentrytitle>htmlhelp.hhp.windows</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhp.windows</refname>
+<refpurpose>Definition of additional windows</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhp.windows.frag">
+&lt;xsl:param name="htmlhelp.hhp.windows"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter is placed at the end of [WINDOWS]
+section of project file. You can use it for defining your own
+addtional windows.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.enhanced.decompilation">
+<refmeta>
+<refentrytitle>htmlhelp.enhanced.decompilation</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enhanced.decompilation</refname>
+<refpurpose>Allow enhanced decompilation of CHM?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.enhanced.decompilation.frag">
+&lt;xsl:param name="htmlhelp.enhanced.decompilation" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>When set to 1 this parameter enables enhanced decompilation of CHM.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.enumerate.images">
+<refmeta>
+<refentrytitle>htmlhelp.enumerate.images</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.enumerate.images</refname>
+<refpurpose>Should be paths to all used images added to project file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.enumerate.images.frag">
+&lt;xsl:param name="htmlhelp.enumerate.images" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you insert images into your documents
+as external binary entities or if you are using absolute path in image names.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.force.map.and.alias">
+<refmeta>
+<refentrytitle>htmlhelp.force.map.and.alias</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.force.map.and.alias</refname>
+<refpurpose>Should be [MAP] and [ALIAS] section added to project file unconditionaly?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.force.map.and.alias.frag">
+&lt;xsl:param name="htmlhelp.force.map.and.alias" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You should turn on this flag, if you have your own
+<filename moreinfo="none">alias.h</filename> and <filename moreinfo="none">contex.h</filename> files
+and you want include reference to them in project file.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.map.file">
+<refmeta>
+<refentrytitle>htmlhelp.map.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.map.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.map.file.frag">
+&lt;xsl:param name="htmlhelp.map.file" select="'context.h'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename moreinfo="none">context.h</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.alias.file">
+<refmeta>
+<refentrytitle>htmlhelp.alias.file</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.alias.file</refname>
+<refpurpose>Filename of map file.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.alias.file.frag">
+&lt;xsl:param name="htmlhelp.alias.file" select="'alias.h'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want different name of map file
+than <filename moreinfo="none">alias.h</filename>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.section.depth">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.section.depth</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.section.depth</refname>
+<refpurpose>Depth of TOC for sections in a left pane.</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.section.depth.frag">
+&lt;xsl:param name="htmlhelp.hhc.section.depth" select="5"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Change this parameter if you want shallower ToC in a left pane
+of HTML Help viewer.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.show.root">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.show.root</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.show.root</refname>
+<refpurpose>Should be entry for root element shown in ToC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.show.root.frag">
+&lt;xsl:param name="htmlhelp.hhc.show.root" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If set to 0, there will be no entry for root element in
+ToC. This is useful when you want provide user with expanded ToC as
+a default.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.folders.instead.books">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.folders.instead.books</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.folders.instead.books</refname>
+<refpurpose>Use folder icons in ToC (instead of book icons)?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.folders.instead.books.frag">
+&lt;xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter controls whether there should be folder-like
+icons (1) or book-like icons (0) in ToC. If you want to use
+folder-like icons you must swith off binary ToC using
+<parameter moreinfo="none">htmlhelp.hhc.binary</parameter>.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.binary">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.binary</refentrytitle>
+<refmiscinfo role="type"/>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.binary</refname>
+<refpurpose>Generate binary ToC?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.binary.frag">
+&lt;xsl:param name="htmlhelp.hhc.binary" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parametr controls whether binary TOC will be generated. You
+must create binary TOC if you want to add Prev/Next buttons to toolbar
+(which is default behaviour). Files with binary TOC can't be merged.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.hhc.width">
+<refmeta>
+<refentrytitle>htmlhelp.hhc.width</refentrytitle>
+<refmiscinfo role="type">integer</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.hhc.width</refname>
+<refpurpose>Width of navigation (ToC) pane</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.hhc.width.frag">
+&lt;xsl:param name="htmlhelp.hhc.width"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies width of ToC pane in pixels.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.title">
+<refmeta>
+<refentrytitle>htmlhelp.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.title</refname>
+<refpurpose>Title of HTML Help</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.title.frag">
+&lt;xsl:param name="htmlhelp.title" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Content of this parameter will be used as a title for generated
+HTML Help. If empty, title will be automatically taken from document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.menu">
+<refmeta>
+<refentrytitle>htmlhelp.show.menu</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.menu</refname>
+<refpurpose>Should be menu shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.menu.frag">
+&lt;xsl:param name="htmlhelp.show.menu" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want application menu in your HTML Help file, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.toolbar.text">
+<refmeta>
+<refentrytitle>htmlhelp.show.toolbar.text</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.toolbar.text</refname>
+<refpurpose>Show text under toolbar buttons?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.toolbar.text.frag">
+&lt;xsl:param name="htmlhelp.show.toolbar.text" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>You can switch off display of texts under toolbar buttons by
+setting this parameter to 0.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.show.advanced.search">
+<refmeta>
+<refentrytitle>htmlhelp.show.advanced.search</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.advanced.search</refname>
+<refpurpose>Should be advanced search available?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.advanced.search.frag">
+&lt;xsl:param name="htmlhelp.show.advanced.search" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want advanced search features in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.show.favorities">
+<refmeta>
+<refentrytitle>htmlhelp.show.favorities</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.show.favorities</refname>
+<refpurpose>Should be favorities tab shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.show.favorities.frag">
+&lt;xsl:param name="htmlhelp.show.favorities" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want favorities tab shown in your help, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.hideshow">
+<refmeta>
+<refentrytitle>htmlhelp.button.hideshow</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.hideshow</refname>
+<refpurpose>Should be Hide/Show button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.hideshow.frag">
+&lt;xsl:param name="htmlhelp.button.hideshow" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Hide/Show button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.back">
+<refmeta>
+<refentrytitle>htmlhelp.button.back</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.back</refname>
+<refpurpose>Should be Back button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.back.frag">
+&lt;xsl:param name="htmlhelp.button.back" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Back button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.forward">
+<refmeta>
+<refentrytitle>htmlhelp.button.forward</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.forward</refname>
+<refpurpose>Should be Forward button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.forward.frag">
+&lt;xsl:param name="htmlhelp.button.forward" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Forward button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.stop">
+<refmeta>
+<refentrytitle>htmlhelp.button.stop</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.stop</refname>
+<refpurpose>Should be Stop button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.stop.frag">
+&lt;xsl:param name="htmlhelp.button.stop" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Stop button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.refresh">
+<refmeta>
+<refentrytitle>htmlhelp.button.refresh</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.refresh</refname>
+<refpurpose>Should be Refresh button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.refresh.frag">
+&lt;xsl:param name="htmlhelp.button.refresh" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Refresh button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.home">
+<refmeta>
+<refentrytitle>htmlhelp.button.home</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home</refname>
+<refpurpose>Should be Home button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.home.frag">
+&lt;xsl:param name="htmlhelp.button.home" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Home button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.home.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.home.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.home.url</refname>
+<refpurpose>URL address of page accessible by Home button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.home.url.frag">
+&lt;xsl:param name="htmlhelp.button.home.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Home button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.options">
+<refmeta>
+<refentrytitle>htmlhelp.button.options</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.options</refname>
+<refpurpose>Should be Options button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.options.frag">
+&lt;xsl:param name="htmlhelp.button.options" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Options button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.print">
+<refmeta>
+<refentrytitle>htmlhelp.button.print</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.print</refname>
+<refpurpose>Should be Print button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.print.frag">
+&lt;xsl:param name="htmlhelp.button.print" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Print button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.locate">
+<refmeta>
+<refentrytitle>htmlhelp.button.locate</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.locate</refname>
+<refpurpose>Should be Locate button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.locate.frag">
+&lt;xsl:param name="htmlhelp.button.locate" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Locate button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1</refname>
+<refpurpose>Should be Jump1 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.frag">
+&lt;xsl:param name="htmlhelp.button.jump1" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump1 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.url</refname>
+<refpurpose>URL address of page accessible by Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.url.frag">
+&lt;xsl:param name="htmlhelp.button.jump1.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump1 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump1.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump1.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump1.title</refname>
+<refpurpose>Title of Jump1 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump1.title.frag">
+&lt;xsl:param name="htmlhelp.button.jump1.title" select="'User1'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump1 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2</refname>
+<refpurpose>Should be Jump2 button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.frag">
+&lt;xsl:param name="htmlhelp.button.jump2" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Jump2 button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2.url">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.url</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.url</refname>
+<refpurpose>URL address of page accessible by Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.url.frag">
+&lt;xsl:param name="htmlhelp.button.jump2.url"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>URL address of page accessible by Jump2 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.jump2.title">
+<refmeta>
+<refentrytitle>htmlhelp.button.jump2.title</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.jump2.title</refname>
+<refpurpose>Title of Jump2 button</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.jump2.title.frag">
+&lt;xsl:param name="htmlhelp.button.jump2.title" select="'User2'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Title of Jump2 button.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.next">
+<refmeta>
+<refentrytitle>htmlhelp.button.next</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.next</refname>
+<refpurpose>Should be Next button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.next.frag">
+&lt;xsl:param name="htmlhelp.button.next" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Next button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.prev">
+<refmeta>
+<refentrytitle>htmlhelp.button.prev</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.prev</refname>
+<refpurpose>Should be Prev button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.prev.frag">
+&lt;xsl:param name="htmlhelp.button.prev" select="1"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Prev button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.button.zoom">
+<refmeta>
+<refentrytitle>htmlhelp.button.zoom</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.button.zoom</refname>
+<refpurpose>Should be Zoom button shown?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.button.zoom.frag">
+&lt;xsl:param name="htmlhelp.button.zoom" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want Zoom button shown on toolbar, turn this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.remember.window.position">
+<refmeta>
+<refentrytitle>htmlhelp.remember.window.position</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.remember.window.position</refname>
+<refpurpose>Remember help window position?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.remember.window.position.frag">
+&lt;xsl:param name="htmlhelp.remember.window.position" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>To remember help window position between starts set this
+parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.window.geometry">
+<refmeta>
+<refentrytitle>htmlhelp.window.geometry</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.window.geometry</refname>
+<refpurpose>Set initial geometry of help window</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.window.geometry.frag">
+&lt;xsl:param name="htmlhelp.window.geometry"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This parameter specifies initial position of help
+window. E.g.</para>
+
+<programlisting format="linespecific">&lt;xsl:param name="htmlhelp.window.geometry"&gt;[160,64,992,704]&lt;/xsl:param&gt;</programlisting>
+
+</refsect1>
+</refentry>
+
+
+<refentry id="htmlhelp.use.hhk">
+<refmeta>
+<refentrytitle>htmlhelp.use.hhk</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.use.hhk</refname>
+<refpurpose>Should be index built using HHK file?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.use.hhk.frag">
+&lt;xsl:param name="htmlhelp.use.hhk" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, index is created using HHK file. This provides some
+new features.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="htmlhelp.only">
+<refmeta>
+<refentrytitle>htmlhelp.only</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>htmlhelp.only</refname>
+<refpurpose>Should be only project files generated?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="htmlhelp.only.frag">
+&lt;xsl:param name="htmlhelp.only" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to play with various HTML Help parameters and you
+don't need to regenerate all HTML files, you can set this parameter to
+1. This setting will not process whole document, only project files
+(hhp, hhc, hhk,...) will be generated.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Eclipse Help Platform</title>
+<refentry id="eclipse.autolabel">
+<refmeta>
+<refentrytitle>eclipse.autolabel</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.autolabel</refname>
+<refpurpose>Should tree-like ToC use autonumbering feature?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.autolabel.frag">
+&lt;xsl:param name="eclipse.autolabel" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If you want to include chapter and section numbers into ToC in
+the left panel, set this parameter to 1.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.name">
+<refmeta>
+<refentrytitle>eclipse.plugin.name</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.name</refname>
+<refpurpose>Eclipse Help plugin name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.name.frag">
+&lt;xsl:param name="eclipse.plugin.name"&gt;DocBook Online Help Sample&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin name.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.id">
+<refmeta>
+<refentrytitle>eclipse.plugin.id</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.id</refname>
+<refpurpose>Eclipse Help plugin id</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.id.frag">
+&lt;xsl:param name="eclipse.plugin.id"&gt;com.example.help&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin id. You should change this id to something
+unique for each help.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="eclipse.plugin.provider">
+<refmeta>
+<refentrytitle>eclipse.plugin.provider</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>eclipse.plugin.provider</refname>
+<refpurpose>Eclipse Help plugin provider name</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="eclipse.plugin.provider.frag">
+&lt;xsl:param name="eclipse.plugin.provider"&gt;Example provider&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Eclipse Help plugin provider name.</para>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<reference><title>Localization</title>
+<refentry id="l10n.gentext.language">
+<refmeta>
+<refentrytitle>l10n.gentext.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.language</refname>
+<refpurpose>Sets the gentext language</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.language.frag">
+&lt;xsl:param name="l10n.gentext.language" select="''"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If this parameter is set to any value other than the empty string, its
+value will be used as the value for the language when generating text. Setting
+<parameter moreinfo="none">l10n.gentext.language</parameter> overrides any settings within the
+document being formatted.</para>
+
+<para>It's much more likely that you might want to set the
+<parameter moreinfo="none">l10n.gentext.default.language</parameter> parameter.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.default.language">
+<refmeta>
+<refentrytitle>l10n.gentext.default.language</refentrytitle>
+<refmiscinfo role="type">string</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.default.language</refname>
+<refpurpose>Sets the default language for generated text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.default.language.frag">
+&lt;xsl:param name="l10n.gentext.default.language" select="'en'"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The value of the <parameter moreinfo="none">l10n.gentext.default.language</parameter>
+parameter is used as the language for generated text if no setting is provided
+in the source document.</para>
+
+</refsect1>
+</refentry>
+
+<refentry id="l10n.gentext.use.xref.language">
+<refmeta>
+<refentrytitle>l10n.gentext.use.xref.language</refentrytitle>
+<refmiscinfo role="type">boolean</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>l10n.gentext.use.xref.language</refname>
+<refpurpose>Use the language of target when generating cross-reference text?</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<programlisting id="l10n.gentext.use.xref.language.frag">
+&lt;xsl:param name="l10n.gentext.use.xref.language" select="0"&gt;&lt;/xsl:param&gt;
+</programlisting>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>If non-zero, the language of the target will be used when
+generating cross reference text. Usually, the <quote>current</quote>
+language is used when generating text (that is, the language of the
+element that contains the cross-reference element). But setting this parameter
+allows the language of the element <emphasis>pointed to</emphasis> to control
+the generated text.</para>
+
+<para>Consider the following example:</para>
+
+<informalexample>
+<programlisting format="linespecific">&lt;para lang="en"&gt;See also &lt;xref linkend="chap3"/&gt;.&lt;/para&gt;
+</programlisting>
+</informalexample>
+
+<para>Suppose that Chapter 3 happens to be written in German.
+If <parameter moreinfo="none">l10n.gentext.use.xref.language</parameter> is non-zero, the
+resulting text will be something like this:</para>
+
+<blockquote>
+<para>See also Kapital 3.</para>
+</blockquote>
+
+<para>Where the more traditional rendering would be:</para>
+
+<blockquote>
+<para>See also Chapter 3.</para>
+</blockquote>
+
+</refsect1>
+</refentry>
+
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename moreinfo="none">param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<programlisting id="top">
+
+&lt;!-- This file is generated from param.xweb; do not edit this file! --&gt;
+
+&lt;xsl:stylesheet exclude-result-prefixes="src" version="1.0"&gt;
+
+&lt;!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** --&gt;
+
+&lt;src:fragref linkend="admon.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="admon.textlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="annotate.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="appendix.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="author.othername.in.middle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="autotoc.label.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="base.dir.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="biblioentry.item.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bibliography.numbered.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="bridgehead.in.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.defaultcolumn.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.list.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.number.limit.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callout.unicode.start.character.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="callouts.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chapter.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.first.sections.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.quietly.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.tocs.and.lots.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="chunk.separate.lots.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="citerefentry.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="collect.xref.targets.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="component.label.includes.part.label.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="css.decoration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="current.docid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.float.class.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.image.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="default.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.mode.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="draft.watermark.image.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.table.bgcolor.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.table.border.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.assignment.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ebnf.statement.terminator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.name.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.id.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="eclipse.plugin.provider.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="emphasis.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="entry.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="firstterm.only.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footer.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.procedures.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="formal.title.placement.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.decoration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="funcsynopsis.tabular.threshold.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="function.parens.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.id.attributes.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.index.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.legalnotice.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.manifest.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.meta.abstract.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.section.toc.level.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="generate.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossary.collection.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossentry.show.acronym.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="glossterm.auto.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="graphic.default.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="graphicsize.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="header.rule.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.base.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cellpadding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cellspacing.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.cleanup.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.ext.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.extra.head.links.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.longdesc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.longdesc.link.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.stylesheet.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="html.stylesheet.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.alias.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.back.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.forward.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.hideshow.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.home.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.home.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump1.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.jump2.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.locate.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.next.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.options.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.prev.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.print.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.refresh.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.stop.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.button.zoom.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.chm.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.default.topic.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.display.progress.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.encoding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.enhanced.decompilation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.enumerate.images.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.force.map.and.alias.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.binary.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.folders.instead.books.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.show.root.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhc.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhk.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.tail.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.window.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.hhp.windows.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.map.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.only.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.remember.window.position.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.advanced.search.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.favorities.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.menu.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.show.toolbar.text.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.use.hhk.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="htmlhelp.window.geometry.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="img.src.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="index.on.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="index.on.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="index.prefer.titleabbrev.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ignore.image.scaling.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="inherit.keywords.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.default.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="l10n.gentext.use.xref.language.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="label.from.part.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.everyNth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="linenumbering.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="link.mailto.url.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.graphic.viewport.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.single.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.valid.html.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="make.year.ranges.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manifest.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manifest.in.base.dir.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="manual.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.menu.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="menuchoice.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.graphics.path.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="navig.showtitles.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.image.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.image.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="nominal.table.width.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.base.uri.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.debug.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.properties.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="insert.olink.page.number.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="insert.olink.pdf.frag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="prefer.internal.olink.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.lang.fallback.sequence.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.doctitle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.fragid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.outline.ext.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.pubid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.resolver.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="olink.sysid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="para.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="part.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="phrase.propagates.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="pixels.per.inch.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="points.per.em.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preface.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="preferred.mediaobject.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.empty.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="process.source.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.arch.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.attribute.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.condition.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.conformance.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.lang.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.os.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revision.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.revisionflag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.role.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.security.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.userlevel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.value.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="profile.vendor.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="punct.honorific.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.defaultlabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qanda.inherit.numeration.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="qandadiv.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.name.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.generate.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="refentry.xref.manvolnum.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="root.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="rootid.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.default.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="runinhead.title.end.punct.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.autolabel.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.autolabel.max.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="section.label.includes.component.label.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="segmentedlist.as.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="shade.verbatim.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="show.comments.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="show.revisionflag.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="simplesect.in.toc.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="spacing.paras.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.footer.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.header.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="suppress.navigation.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.borders.with.css.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.cell.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.format.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.footnote.number.symbols.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.color.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="table.frame.border.thickness.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tablecolumns.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="target.database.document.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="targets.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="textdata.default.encoding.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.delims.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.file.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="tex.math.in.alt.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="textinsert.extension.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.list.type.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.section.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="toc.max.depth.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="ulink.target.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.embed.for.svg.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.extensions.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.id.as.filename.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.local.olink.style.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.as.xrefstyle.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.role.for.mediaobject.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="use.svg.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="variablelist.as.table.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.with.number.and.title.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-title.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.label-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="xref.title-page.separator.frag"&gt;&lt;/src:fragref&gt;
+&lt;src:fragref linkend="insert.xref.page.number.frag"&gt;&lt;/src:fragref&gt;
+
+&lt;/xsl:stylesheet&gt;
+</programlisting>
+
+</appendix>
+
+</book> \ No newline at end of file
diff --git a/kdoctools/docbook/xsl/html/param.xsl b/kdoctools/docbook/xsl/html/param.xsl
new file mode 100644
index 000000000..b1d7ef8ad
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/param.xsl
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" exclude-result-prefixes="src" version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:param name="admon.graphics.extension" select="'.png'"/>
+<xsl:param name="admon.graphics" select="0"/>
+<xsl:param name="admon.graphics.path">images/</xsl:param>
+<xsl:param name="admon.style">
+ <xsl:text>margin-left: 0.5in; margin-right: 0.5in;</xsl:text>
+</xsl:param>
+<xsl:param name="admon.textlabel" select="1"/>
+<xsl:param name="annotate.toc" select="1"/>
+<xsl:param name="appendix.autolabel" select="1"/>
+<xsl:param name="author.othername.in.middle" select="1"/>
+<xsl:param name="autotoc.label.separator" select="'. '"/>
+<xsl:param name="base.dir" select="''"/>
+<xsl:param name="biblioentry.item.separator">. </xsl:param>
+<xsl:param name="bibliography.collection" select="'http://docbook.sourceforge.net/release/bibliography/bibliography.xml'"/>
+<xsl:param name="bibliography.numbered" select="0"/>
+<xsl:param name="bridgehead.in.toc" select="0"/>
+<xsl:param name="callout.defaultcolumn" select="'60'"/>
+<xsl:param name="callout.graphics.extension" select="'.png'"/>
+<xsl:param name="callout.graphics" select="'1'"/>
+<xsl:param name="callout.graphics.number.limit" select="'15'"/>
+<xsl:param name="callout.graphics.path" select="'images/callouts/'"/>
+<xsl:param name="callout.list.table" select="'1'"/>
+<xsl:param name="callout.unicode" select="0"/>
+<xsl:param name="callout.unicode.number.limit" select="'10'"/>
+<xsl:param name="callout.unicode.start.character" select="10102"/>
+<xsl:param name="callouts.extension" select="'1'"/>
+<xsl:param name="chapter.autolabel" select="1"/>
+<xsl:param name="chunk.first.sections" select="0"/>
+<xsl:param name="chunk.quietly" select="0"/>
+<xsl:param name="chunk.section.depth" select="1"/>
+<xsl:param name="chunk.toc" select="''"/>
+<xsl:param name="chunk.tocs.and.lots" select="0"/>
+<xsl:param name="chunk.separate.lots" select="0"/>
+<xsl:param name="citerefentry.link" select="'0'"/>
+<xsl:param name="collect.xref.targets" select="'no'"/>
+<xsl:param name="component.label.includes.part.label" select="0"/>
+<xsl:param name="css.decoration" select="1"/>
+<xsl:param name="current.docid" select="''"/>
+<xsl:param name="default.float.class" select="'before'"/>
+<xsl:param name="default.image.width" select="''"/>
+<xsl:param name="default.table.width" select="''"/>
+<xsl:param name="draft.mode" select="'maybe'"/>
+<xsl:param name="draft.watermark.image" select="'http://docbook.sourceforge.net/release/images/draft.png'"/>
+<xsl:param name="ebnf.table.bgcolor" select="'#F5DCB3'"/>
+<xsl:param name="ebnf.table.border" select="1"/>
+<xsl:param name="ebnf.assignment">
+<code>::=</code>
+</xsl:param>
+
+<xsl:param name="ebnf.statement.terminator"/>
+
+<xsl:param name="eclipse.autolabel" select="0"/>
+<xsl:param name="eclipse.plugin.name">DocBook Online Help Sample</xsl:param>
+<xsl:param name="eclipse.plugin.id">com.example.help</xsl:param>
+<xsl:param name="eclipse.plugin.provider">Example provider</xsl:param>
+<xsl:param name="emphasis.propagates.style" select="1"/>
+<xsl:param name="entry.propagates.style" select="1"/>
+<xsl:param name="firstterm.only.link" select="0"/>
+<xsl:param name="footer.rule" select="1"/>
+<xsl:param name="footnote.number.format" select="'1'"/>
+<xsl:param name="footnote.number.symbols" select="''"/>
+<xsl:param name="formal.procedures" select="1"/>
+<xsl:param name="formal.title.placement">
+figure before
+example before
+equation before
+table before
+procedure before
+task before
+</xsl:param>
+<xsl:param name="funcsynopsis.decoration" select="1"/>
+<xsl:param name="funcsynopsis.style">kr</xsl:param>
+<xsl:param name="funcsynopsis.tabular.threshold" select="40"/>
+<xsl:param name="function.parens">0</xsl:param>
+<xsl:param name="generate.id.attributes" select="0"/>
+<xsl:param name="generate.index" select="1"/>
+<xsl:param name="generate.legalnotice.link" select="0"/>
+<xsl:param name="generate.manifest" select="0"/>
+<xsl:param name="generate.meta.abstract" select="1"/>
+<xsl:param name="generate.section.toc.level" select="0"/>
+<xsl:param name="generate.toc">
+appendix toc,title
+article/appendix nop
+article toc,title
+book toc,title,figure,table,example,equation
+chapter toc,title
+part toc,title
+preface toc,title
+qandadiv toc
+qandaset toc
+reference toc,title
+sect1 toc
+sect2 toc
+sect3 toc
+sect4 toc
+sect5 toc
+section toc
+set toc,title
+</xsl:param>
+
+<xsl:param name="glossary.collection" select="''"/>
+<xsl:param name="glossentry.show.acronym" select="'no'"/>
+<xsl:param name="glossterm.auto.link" select="0"/>
+<xsl:param name="graphic.default.extension"/>
+<xsl:param name="graphicsize.extension" select="1"/>
+<xsl:param name="header.rule" select="1"/>
+<xsl:param name="html.base"/>
+<xsl:param name="html.cellpadding" select="''"/>
+<xsl:param name="html.cellspacing" select="''"/>
+<xsl:param name="html.cleanup" select="1"/>
+<xsl:param name="html.ext" select="'.html'"/>
+<xsl:param name="html.extra.head.links" select="0"/>
+<xsl:param name="html.longdesc" select="1"/>
+<xsl:param name="html.longdesc.link" select="$html.longdesc"/>
+<xsl:param name="html.stylesheet" select="''"/>
+<xsl:param name="html.stylesheet.type">text/css</xsl:param>
+<xsl:param name="htmlhelp.alias.file" select="'alias.h'"/>
+<xsl:param name="htmlhelp.autolabel" select="0"/>
+<xsl:param name="htmlhelp.button.back" select="1"/>
+<xsl:param name="htmlhelp.button.forward" select="0"/>
+<xsl:param name="htmlhelp.button.hideshow" select="1"/>
+<xsl:param name="htmlhelp.button.home" select="0"/>
+<xsl:param name="htmlhelp.button.home.url"/>
+<xsl:param name="htmlhelp.button.jump1" select="0"/>
+<xsl:param name="htmlhelp.button.jump1.title" select="'User1'"/>
+<xsl:param name="htmlhelp.button.jump1.url"/>
+<xsl:param name="htmlhelp.button.jump2" select="0"/>
+<xsl:param name="htmlhelp.button.jump2.title" select="'User2'"/>
+<xsl:param name="htmlhelp.button.jump2.url"/>
+<xsl:param name="htmlhelp.button.locate" select="0"/>
+<xsl:param name="htmlhelp.button.next" select="1"/>
+<xsl:param name="htmlhelp.button.options" select="1"/>
+<xsl:param name="htmlhelp.button.prev" select="1"/>
+<xsl:param name="htmlhelp.button.print" select="1"/>
+<xsl:param name="htmlhelp.button.refresh" select="0"/>
+<xsl:param name="htmlhelp.button.stop" select="0"/>
+<xsl:param name="htmlhelp.button.zoom" select="0"/>
+<xsl:param name="htmlhelp.chm" select="'htmlhelp.chm'"/>
+<xsl:param name="htmlhelp.default.topic" select="''"/>
+<xsl:param name="htmlhelp.display.progress" select="1"/>
+<xsl:param name="htmlhelp.encoding" select="'iso-8859-1'"/>
+<xsl:param name="htmlhelp.enhanced.decompilation" select="0"/>
+<xsl:param name="htmlhelp.enumerate.images" select="0"/>
+<xsl:param name="htmlhelp.force.map.and.alias" select="0"/>
+<xsl:param name="htmlhelp.hhc.binary" select="1"/>
+<xsl:param name="htmlhelp.hhc.folders.instead.books" select="1"/>
+<xsl:param name="htmlhelp.hhc" select="'toc.hhc'"/>
+<xsl:param name="htmlhelp.hhc.section.depth" select="5"/>
+<xsl:param name="htmlhelp.hhc.show.root" select="1"/>
+<xsl:param name="htmlhelp.hhc.width"/>
+<xsl:param name="htmlhelp.hhk" select="'index.hhk'"/>
+<xsl:param name="htmlhelp.hhp" select="'htmlhelp.hhp'"/>
+<xsl:param name="htmlhelp.hhp.tail"/>
+<xsl:param name="htmlhelp.hhp.window" select="'Main'"/>
+<xsl:param name="htmlhelp.hhp.windows"/>
+<xsl:param name="htmlhelp.map.file" select="'context.h'"/>
+<xsl:param name="htmlhelp.only" select="0"/>
+<xsl:param name="htmlhelp.remember.window.position" select="0"/>
+<xsl:param name="htmlhelp.show.advanced.search" select="0"/>
+<xsl:param name="htmlhelp.show.favorities" select="0"/>
+<xsl:param name="htmlhelp.show.menu" select="0"/>
+<xsl:param name="htmlhelp.show.toolbar.text" select="1"/>
+<xsl:param name="htmlhelp.title" select="''"/>
+<xsl:param name="htmlhelp.use.hhk" select="0"/>
+<xsl:param name="htmlhelp.window.geometry"/>
+<xsl:param name="img.src.path"/>
+<xsl:param name="index.on.role" select="0"/>
+<xsl:param name="index.on.type" select="0"/>
+<xsl:param name="index.prefer.titleabbrev" select="0"/>
+<xsl:param name="ignore.image.scaling" select="0"/>
+<xsl:param name="inherit.keywords" select="'1'"/>
+<xsl:param name="l10n.gentext.default.language" select="'en'"/>
+<xsl:param name="l10n.gentext.language" select="''"/>
+<xsl:param name="l10n.gentext.use.xref.language" select="0"/>
+<xsl:param name="label.from.part" select="'0'"/>
+<xsl:param name="linenumbering.everyNth" select="'5'"/>
+<xsl:param name="linenumbering.extension" select="'1'"/>
+<xsl:param name="linenumbering.separator" select="' '"/>
+<xsl:param name="linenumbering.width" select="'3'"/>
+<xsl:param name="link.mailto.url"/>
+<xsl:param name="make.graphic.viewport" select="1"/>
+<xsl:param name="make.single.year.ranges" select="0"/>
+<xsl:param name="make.valid.html" select="0"/>
+<xsl:param name="make.year.ranges" select="0"/>
+<xsl:param name="manifest" select="'HTML.manifest'"/>
+<xsl:param name="manifest.in.base.dir" select="0"/>
+<xsl:param name="manual.toc" select="''"/>
+<xsl:param name="menuchoice.menu.separator" select="'-&gt;'"/>
+<xsl:param name="menuchoice.separator" select="'+'"/>
+<xsl:param name="navig.graphics.extension" select="'.gif'"/>
+<xsl:param name="navig.graphics" select="0"/>
+<xsl:param name="navig.graphics.path">images/</xsl:param>
+<xsl:param name="navig.showtitles">1</xsl:param>
+<xsl:param name="nominal.image.depth" select="4 * $pixels.per.inch"/>
+<xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"/>
+<xsl:param name="nominal.table.width" select="'6in'"/>
+<xsl:param name="olink.base.uri" select="''"/>
+<xsl:param name="olink.debug" select="0"/>
+<xsl:attribute-set name="olink.properties">
+</xsl:attribute-set>
+<xsl:param name="insert.olink.page.number">no</xsl:param>
+<xsl:param name="insert.olink.pdf.frag" select="0"/>
+<xsl:param name="prefer.internal.olink" select="0"/>
+<xsl:param name="olink.lang.fallback.sequence" select="''"/>
+<xsl:param name="olink.doctitle" select="no"/>
+<xsl:param name="olink.fragid" select="'fragid='"/>
+<xsl:param name="olink.outline.ext" select="'.olink'"/>
+<xsl:param name="olink.pubid" select="'pubid='"/>
+<xsl:param name="olink.resolver" select="'/cgi-bin/olink'"/>
+<xsl:param name="olink.sysid" select="'sysid='"/>
+<xsl:param name="para.propagates.style" select="1"/>
+<xsl:param name="part.autolabel" select="1"/>
+<xsl:param name="phrase.propagates.style" select="1"/>
+<xsl:param name="pixels.per.inch" select="90"/>
+<xsl:param name="points.per.em" select="10"/>
+<xsl:param name="preface.autolabel" select="0"/>
+<xsl:param name="preferred.mediaobject.role"/>
+<xsl:param name="process.empty.source.toc" select="0"/>
+<xsl:param name="process.source.toc" select="0"/>
+<xsl:param name="profile.arch" select="''"/>
+<xsl:param name="profile.attribute" select="''"/>
+<xsl:param name="profile.condition" select="''"/>
+<xsl:param name="profile.conformance" select="''"/>
+<xsl:param name="profile.lang" select="''"/>
+<xsl:param name="profile.os" select="''"/>
+<xsl:param name="profile.revision" select="''"/>
+<xsl:param name="profile.revisionflag" select="''"/>
+<xsl:param name="profile.role" select="''"/>
+<xsl:param name="profile.security" select="''"/>
+<xsl:param name="profile.separator" select="';'"/>
+<xsl:param name="profile.userlevel" select="''"/>
+<xsl:param name="profile.value" select="''"/>
+<xsl:param name="profile.vendor" select="''"/>
+<xsl:param name="punct.honorific" select="'.'"/>
+<xsl:param name="qanda.defaultlabel">number</xsl:param>
+<xsl:param name="qanda.inherit.numeration" select="1"/>
+<xsl:param name="qandadiv.autolabel" select="1"/>
+<xsl:param name="refentry.generate.name" select="1"/>
+<xsl:param name="refentry.generate.title" select="0"/>
+<xsl:param name="refentry.separator" select="'1'"/>
+<xsl:param name="refentry.xref.manvolnum" select="1"/>
+<xsl:param name="root.filename" select="'index'"/>
+<xsl:param name="rootid" select="''"/>
+<xsl:param name="runinhead.default.title.end.punct" select="'.'"/>
+<xsl:param name="runinhead.title.end.punct" select="'.!?:'"/>
+<xsl:param name="section.autolabel" select="0"/>
+<xsl:param name="section.autolabel.max.depth" select="8"/>
+<xsl:param name="section.label.includes.component.label" select="0"/>
+<xsl:param name="segmentedlist.as.table" select="0"/>
+<xsl:param name="shade.verbatim" select="0"/>
+<xsl:attribute-set name="shade.verbatim.style">
+ <xsl:attribute name="border">0</xsl:attribute>
+ <xsl:attribute name="bgcolor">#E0E0E0</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:param name="show.comments">1</xsl:param>
+<xsl:param name="show.revisionflag">0</xsl:param>
+<xsl:param name="simplesect.in.toc" select="0"/>
+<xsl:param name="spacing.paras" select="'0'"/>
+<xsl:param name="suppress.footer.navigation">0</xsl:param>
+<xsl:param name="suppress.header.navigation">0</xsl:param>
+<xsl:param name="suppress.navigation">0</xsl:param>
+<xsl:param name="table.borders.with.css" select="0"/>
+<xsl:param name="table.cell.border.color" select="''"/>
+
+<xsl:param name="table.cell.border.style" select="'solid'"/>
+<xsl:param name="table.cell.border.thickness" select="'0.5pt'"/>
+<xsl:param name="table.footnote.number.format" select="'a'"/>
+<xsl:param name="table.footnote.number.symbols" select="''"/>
+<xsl:param name="table.frame.border.color" select="''"/>
+
+<xsl:param name="table.frame.border.style" select="'solid'"/>
+<xsl:param name="table.frame.border.thickness" select="'0.5pt'"/>
+<xsl:param name="tablecolumns.extension" select="'1'"/>
+<xsl:param name="target.database.document" select="''"/>
+<xsl:param name="targets.filename" select="'target.db'"/>
+<xsl:param name="textdata.default.encoding" select="''"/>
+<xsl:param name="tex.math.delims" select="'1'"/>
+<xsl:param name="tex.math.file" select="'tex-math-equations.tex'"/>
+<xsl:param name="tex.math.in.alt" select="''"/>
+<xsl:param name="textinsert.extension" select="'1'"/>
+<xsl:param name="toc.list.type">dl</xsl:param>
+<xsl:param name="toc.section.depth">2</xsl:param>
+<xsl:param name="toc.max.depth">8</xsl:param>
+<xsl:param name="ulink.target" select="'_top'"/>
+<xsl:param name="use.embed.for.svg" select="0"/>
+<xsl:param name="use.extensions" select="'0'"/>
+<xsl:param name="use.id.as.filename" select="'0'"/>
+<xsl:param name="use.local.olink.style" select="0"/>
+<xsl:param name="use.role.as.xrefstyle" select="1"/>
+<xsl:param name="use.role.for.mediaobject" select="1"/>
+<xsl:param name="use.svg" select="1"/>
+<xsl:param name="variablelist.as.table" select="0"/>
+<xsl:param name="xref.with.number.and.title" select="1"/>
+<xsl:param name="xref.label-title.separator">: </xsl:param>
+<xsl:param name="xref.label-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="xref.title-page.separator"><xsl:text> </xsl:text></xsl:param>
+<xsl:param name="insert.xref.page.number">no</xsl:param>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/kdoctools/docbook/xsl/html/param.xweb b/kdoctools/docbook/xsl/html/param.xweb
new file mode 100644
index 000000000..ecdab3cdf
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/param.xweb
@@ -0,0 +1,697 @@
+<!DOCTYPE book [
+<!ENTITY % param.ent SYSTEM "param.ent">
+%param.ent;
+]>
+<book xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<bookinfo>
+<title>HTML Parameter Reference</title>
+<releaseinfo role="meta">
+$Id$
+</releaseinfo>
+<author>
+ <surname>Walsh</surname>
+ <firstname>Norman</firstname>
+</author>
+<copyright>
+ <year>1999</year>
+ <year>2000</year>
+ <year>2001</year>
+ <holder>Norman Walsh</holder>
+</copyright>
+</bookinfo>
+
+<preface><title>Introduction</title>
+
+<para>This is technical reference documentation for the DocBook XSL
+Stylesheets; it documents (some of) the parameters, templates, and
+other elements of the stylesheets.</para>
+
+<para>This reference describes each of the HTML Stylesheet parameters.
+These are the <quote>easily customizable</quote> parts of the stylesheet.
+If you want to specify an alternate value for one or more of these
+parameters, you can do so in a <quote>driver</quote> stylesheet.</para>
+
+<para>For example, if you want to change the <literal>html.stylesheet</literal>
+to <filename>reference.css</filename>, you might create a driver
+stylesheet like this:</para>
+
+<programlisting><![CDATA[<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+ <xsl:import href="http://docbook.sourceforge.net/release/xsl/snapshot/html/docbook.xsl"/>
+
+ <xsl:param name="html.stylesheet">reference.css</xsl:param>
+
+</xsl:stylesheet>]]></programlisting>
+
+<para>Naturally, you have to change the
+<sgmltag class='attribute'>href</sgmltag> attribute on
+<literal>&lt;xsl:import&gt;</literal> to point to
+<filename>docbook.xsl</filename> on your system. (Or
+<filename>chunk.xsl</filename>, if you're using chunking.)</para>
+
+<para>This is not intended to be <quote>user</quote> documentation.
+It is provided for developers writing customization layers for the
+stylesheets, and for anyone who's interested in <quote>how it
+works</quote>.</para>
+
+<para>Although I am trying to be thorough, this documentation is known
+to be incomplete. Don't forget to read the source, too :-)</para>
+</preface>
+
+<reference><title>Admonitions</title>
+&admon.graphics.extension;
+&admon.graphics.path;
+&admon.graphics;
+&admon.textlabel;
+&admon.style;
+</reference>
+
+<reference><title>Callouts</title>
+&callout.defaultcolumn;
+&callout.graphics.extension;
+&callout.graphics.number.limit;
+&callout.graphics.path;
+&callout.graphics;
+&callout.list.table;
+&callout.unicode.number.limit;
+&callout.unicode.start.character;
+&callout.unicode;
+&callouts.extension;
+</reference>
+
+<reference><title>EBNF</title>
+&ebnf.table.bgcolor;
+&ebnf.table.border;
+&ebnf.assignment;
+&ebnf.statement.terminator;
+</reference>
+
+<reference><title>ToC/LoT/Index Generation</title>
+&annotate.toc;
+&autotoc.label.separator;
+&process.source.toc;
+&process.empty.source.toc;
+&bridgehead.in.toc;
+&simplesect.in.toc;
+&manual.toc;
+&toc.list.type;
+&toc.section.depth;
+&toc.max.depth;
+&generate.toc;
+&generate.section.toc.level;
+&generate.index;
+&index.on.type;
+&index.on.role;
+&index.prefer.titleabbrev;
+</reference>
+
+<reference><title>Extensions</title>
+&linenumbering.everyNth;
+&linenumbering.extension;
+&linenumbering.separator;
+&linenumbering.width;
+&tablecolumns.extension;
+&textinsert.extension;
+&textdata.default.encoding;
+&graphicsize.extension;
+&use.extensions;
+</reference>
+
+<reference><title>Automatic labelling</title>
+&chapter.autolabel;
+&appendix.autolabel;
+&part.autolabel;
+&preface.autolabel;
+&qandadiv.autolabel;
+&section.autolabel;
+&section.autolabel.max.depth;
+&section.label.includes.component.label;
+&label.from.part;
+&component.label.includes.part.label;
+</reference>
+
+<!--
+<reference><title></title>
+</reference>
+-->
+
+<reference><title>HTML</title>
+&html.base;
+&html.stylesheet.type;
+&html.stylesheet;
+&use.id.as.filename;
+&css.decoration;
+&spacing.paras;
+&emphasis.propagates.style;
+&para.propagates.style;
+&phrase.propagates.style;
+&entry.propagates.style;
+&html.longdesc;
+&html.longdesc.link;
+&make.valid.html;
+&html.cleanup;
+&draft.mode;
+&draft.watermark.image;
+&generate.id.attributes;
+&generate.meta.abstract;
+</reference>
+
+<reference><title>XSLT Processing</title>
+&rootid;
+&suppress.navigation;
+&suppress.header.navigation;
+&suppress.footer.navigation;
+&header.rule;
+&footer.rule;
+</reference>
+
+<reference><title>Meta/*Info</title>
+&inherit.keywords;
+&make.single.year.ranges;
+&make.year.ranges;
+&author.othername.in.middle;
+&generate.legalnotice.link;
+</reference>
+
+<reference><title>Reference Pages</title>
+&funcsynopsis.decoration;
+&funcsynopsis.style;
+&funcsynopsis.tabular.threshold;
+&function.parens;
+&refentry.generate.name;
+&refentry.generate.title;
+&refentry.xref.manvolnum;
+&citerefentry.link;
+&refentry.separator;
+</reference>
+
+<reference><title>Tables</title>
+&default.table.width;
+&nominal.table.width;
+&table.borders.with.css;
+&table.cell.border.style;
+&table.cell.border.thickness;
+&table.cell.border.color;
+&table.frame.border.style;
+&table.frame.border.thickness;
+&table.frame.border.color;
+&html.cellspacing;
+&html.cellpadding;
+</reference>
+
+<reference><title>QAndASet</title>
+&qanda.defaultlabel;
+&qanda.inherit.numeration;
+</reference>
+
+<reference><title>Linking</title>
+&target.database.document;
+&targets.filename;
+&collect.xref.targets;
+&olink.base.uri;
+&use.local.olink.style;
+&current.docid;
+&olink.doctitle;
+&olink.debug;
+&olink.properties;
+&olink.lang.fallback.sequence;
+&insert.olink.page.number;
+&insert.olink.pdf.frag;
+&prefer.internal.olink;
+&link.mailto.url;
+&ulink.target;
+&olink.fragid;
+&olink.outline.ext;
+&olink.pubid;
+&olink.sysid;
+&olink.resolver;
+</reference>
+
+<reference><title>Bibliography</title>
+&biblioentry.item.separator;
+&bibliography.collection;
+&bibliography.numbered;
+</reference>
+
+<reference><title>Glossary</title>
+&glossterm.auto.link;
+&firstterm.only.link;
+&glossary.collection;
+&glossentry.show.acronym;
+</reference>
+
+<reference><title>Miscellaneous</title>
+&formal.procedures;
+&formal.title.placement;
+&runinhead.default.title.end.punct;
+&runinhead.title.end.punct;
+&show.comments;
+&show.revisionflag;
+&shade.verbatim;
+&shade.verbatim.style;
+&punct.honorific;
+&segmentedlist.as.table;
+&variablelist.as.table;
+&tex.math.in.alt;
+&tex.math.file;
+&tex.math.delims;
+&pixels.per.inch;
+&points.per.em;
+&use.svg;
+&use.role.as.xrefstyle;
+&menuchoice.separator;
+&menuchoice.menu.separator;
+&default.float.class;
+&footnote.number.format;
+&table.footnote.number.format;
+&footnote.number.symbols;
+&table.footnote.number.symbols;
+&xref.with.number.and.title;
+&xref.label-page.separator;
+&xref.label-title.separator;
+&xref.title-page.separator;
+&insert.xref.page.number;
+</reference>
+
+<reference><title>Graphics</title>
+&img.src.path;
+&graphic.default.extension;
+&default.image.width;
+&nominal.image.width;
+&nominal.image.depth;
+&use.embed.for.svg;
+&make.graphic.viewport;
+&preferred.mediaobject.role;
+&use.role.for.mediaobject;
+&ignore.image.scaling;
+</reference>
+
+<reference><title>Chunking</title>
+&chunker.output.cdata-section-elements;
+&chunker.output.doctype-public;
+&chunker.output.doctype-system;
+&chunker.output.encoding;
+&chunker.output.indent;
+&chunker.output.media-type;
+&chunker.output.method;
+&chunker.output.omit-xml-declaration;
+&chunker.output.standalone;
+&saxon.character.representation;
+&html.ext;
+&html.extra.head.links;
+&root.filename;
+&base.dir;
+&generate.manifest;
+&manifest;
+&manifest.in.base.dir;
+&chunk.toc;
+&chunk.tocs.and.lots;
+&chunk.separate.lots;
+&chunk.section.depth;
+&chunk.first.sections;
+&chunk.quietly;
+&navig.graphics;
+&navig.graphics.extension;
+&navig.graphics.path;
+&navig.showtitles;
+</reference>
+
+<reference><title>Profiling</title>
+<partintro>
+<para>Following parameters can be used for attribute value based
+profiling of your document. For more info about profiling look at
+<ulink
+url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html</ulink>.</para>
+</partintro>
+&profile.arch;
+&profile.condition;
+&profile.conformance;
+&profile.lang;
+&profile.os;
+&profile.revision;
+&profile.revisionflag;
+&profile.role;
+&profile.security;
+&profile.userlevel;
+&profile.vendor;
+&profile.attribute;
+&profile.value;
+&profile.separator;
+</reference>
+
+<reference><title>HTML Help</title>
+&htmlhelp.encoding;
+&htmlhelp.autolabel;
+&htmlhelp.chm;
+&htmlhelp.default.topic;
+&htmlhelp.display.progress;
+&htmlhelp.hhp;
+&htmlhelp.hhc;
+&htmlhelp.hhk;
+&htmlhelp.hhp.tail;
+&htmlhelp.hhp.window;
+&htmlhelp.hhp.windows;
+&htmlhelp.enhanced.decompilation;
+&htmlhelp.enumerate.images;
+&htmlhelp.force.map.and.alias;
+&htmlhelp.map.file;
+&htmlhelp.alias.file;
+&htmlhelp.hhc.section.depth;
+&htmlhelp.hhc.show.root;
+&htmlhelp.hhc.folders.instead.books;
+&htmlhelp.hhc.binary;
+&htmlhelp.hhc.width;
+&htmlhelp.title;
+&htmlhelp.show.menu;
+&htmlhelp.show.toolbar.text;
+&htmlhelp.show.advanced.search;
+&htmlhelp.show.favorities;
+&htmlhelp.button.hideshow;
+&htmlhelp.button.back;
+&htmlhelp.button.forward;
+&htmlhelp.button.stop;
+&htmlhelp.button.refresh;
+&htmlhelp.button.home;
+&htmlhelp.button.home.url;
+&htmlhelp.button.options;
+&htmlhelp.button.print;
+&htmlhelp.button.locate;
+&htmlhelp.button.jump1;
+&htmlhelp.button.jump1.url;
+&htmlhelp.button.jump1.title;
+&htmlhelp.button.jump2;
+&htmlhelp.button.jump2.url;
+&htmlhelp.button.jump2.title;
+&htmlhelp.button.next;
+&htmlhelp.button.prev;
+&htmlhelp.button.zoom;
+&htmlhelp.remember.window.position;
+&htmlhelp.window.geometry;
+&htmlhelp.use.hhk;
+&htmlhelp.only;
+</reference>
+
+<reference><title>Eclipse Help Platform</title>
+&eclipse.autolabel;
+&eclipse.plugin.name;
+&eclipse.plugin.id;
+&eclipse.plugin.provider;
+</reference>
+
+<reference><title>Localization</title>
+&l10n.gentext.language;
+&l10n.gentext.default.language;
+&l10n.gentext.use.xref.language;
+</reference>
+
+<appendix><title>The Stylesheet</title>
+
+<para>The <filename>param.xsl</filename> stylesheet is just a wrapper
+around all these parameters.</para>
+
+<src:fragment id="top" mundane-result-prefixes="xsl">
+
+<!-- This file is generated from param.xweb; do not edit this file! -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ exclude-result-prefixes="src"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<src:fragref linkend="admon.graphics.extension.frag"/>
+<src:fragref linkend="admon.graphics.frag"/>
+<src:fragref linkend="admon.graphics.path.frag"/>
+<src:fragref linkend="admon.style.frag"/>
+<src:fragref linkend="admon.textlabel.frag"/>
+<src:fragref linkend="annotate.toc.frag"/>
+<src:fragref linkend="appendix.autolabel.frag"/>
+<src:fragref linkend="author.othername.in.middle.frag"/>
+<src:fragref linkend="autotoc.label.separator.frag"/>
+<src:fragref linkend="base.dir.frag"/>
+<src:fragref linkend="biblioentry.item.separator.frag"/>
+<src:fragref linkend="bibliography.collection.frag"/>
+<src:fragref linkend="bibliography.numbered.frag"/>
+<src:fragref linkend="bridgehead.in.toc.frag"/>
+<src:fragref linkend="callout.defaultcolumn.frag"/>
+<src:fragref linkend="callout.graphics.extension.frag"/>
+<src:fragref linkend="callout.graphics.frag"/>
+<src:fragref linkend="callout.graphics.number.limit.frag"/>
+<src:fragref linkend="callout.graphics.path.frag"/>
+<src:fragref linkend="callout.list.table.frag"/>
+<src:fragref linkend="callout.unicode.frag"/>
+<src:fragref linkend="callout.unicode.number.limit.frag"/>
+<src:fragref linkend="callout.unicode.start.character.frag"/>
+<src:fragref linkend="callouts.extension.frag"/>
+<src:fragref linkend="chapter.autolabel.frag"/>
+<src:fragref linkend="chunk.first.sections.frag"/>
+<src:fragref linkend="chunk.quietly.frag"/>
+<src:fragref linkend="chunk.section.depth.frag"/>
+<src:fragref linkend="chunk.toc.frag"/>
+<src:fragref linkend="chunk.tocs.and.lots.frag"/>
+<src:fragref linkend="chunk.separate.lots.frag"/>
+<src:fragref linkend="citerefentry.link.frag"/>
+<src:fragref linkend="collect.xref.targets.frag"/>
+<src:fragref linkend="component.label.includes.part.label.frag"/>
+<src:fragref linkend="css.decoration.frag"/>
+<src:fragref linkend="current.docid.frag"/>
+<src:fragref linkend="default.float.class.frag"/>
+<src:fragref linkend="default.image.width.frag"/>
+<src:fragref linkend="default.table.width.frag"/>
+<src:fragref linkend="draft.mode.frag"/>
+<src:fragref linkend="draft.watermark.image.frag"/>
+<src:fragref linkend="ebnf.table.bgcolor.frag"/>
+<src:fragref linkend="ebnf.table.border.frag"/>
+<src:fragref linkend="ebnf.assignment.frag"/>
+<src:fragref linkend="ebnf.statement.terminator.frag"/>
+<src:fragref linkend="eclipse.autolabel.frag"/>
+<src:fragref linkend="eclipse.plugin.name.frag"/>
+<src:fragref linkend="eclipse.plugin.id.frag"/>
+<src:fragref linkend="eclipse.plugin.provider.frag"/>
+<src:fragref linkend="emphasis.propagates.style.frag"/>
+<src:fragref linkend="entry.propagates.style.frag"/>
+<src:fragref linkend="firstterm.only.link.frag"/>
+<src:fragref linkend="footer.rule.frag"/>
+<src:fragref linkend="footnote.number.format.frag"/>
+<src:fragref linkend="footnote.number.symbols.frag"/>
+<src:fragref linkend="formal.procedures.frag"/>
+<src:fragref linkend="formal.title.placement.frag"/>
+<src:fragref linkend="funcsynopsis.decoration.frag"/>
+<src:fragref linkend="funcsynopsis.style.frag"/>
+<src:fragref linkend="funcsynopsis.tabular.threshold.frag"/>
+<src:fragref linkend="function.parens.frag"/>
+<src:fragref linkend="generate.id.attributes.frag"/>
+<src:fragref linkend="generate.index.frag"/>
+<src:fragref linkend="generate.legalnotice.link.frag"/>
+<src:fragref linkend="generate.manifest.frag"/>
+<src:fragref linkend="generate.meta.abstract.frag"/>
+<src:fragref linkend="generate.section.toc.level.frag"/>
+<src:fragref linkend="generate.toc.frag"/>
+<src:fragref linkend="glossary.collection.frag"/>
+<src:fragref linkend="glossentry.show.acronym.frag"/>
+<src:fragref linkend="glossterm.auto.link.frag"/>
+<src:fragref linkend="graphic.default.extension.frag"/>
+<src:fragref linkend="graphicsize.extension.frag"/>
+<src:fragref linkend="header.rule.frag"/>
+<src:fragref linkend="html.base.frag"/>
+<src:fragref linkend="html.cellpadding.frag"/>
+<src:fragref linkend="html.cellspacing.frag"/>
+<src:fragref linkend="html.cleanup.frag"/>
+<src:fragref linkend="html.ext.frag"/>
+<src:fragref linkend="html.extra.head.links.frag"/>
+<src:fragref linkend="html.longdesc.frag"/>
+<src:fragref linkend="html.longdesc.link.frag"/>
+<src:fragref linkend="html.stylesheet.frag"/>
+<src:fragref linkend="html.stylesheet.type.frag"/>
+<src:fragref linkend="htmlhelp.alias.file.frag"/>
+<src:fragref linkend="htmlhelp.autolabel.frag"/>
+<src:fragref linkend="htmlhelp.button.back.frag"/>
+<src:fragref linkend="htmlhelp.button.forward.frag"/>
+<src:fragref linkend="htmlhelp.button.hideshow.frag"/>
+<src:fragref linkend="htmlhelp.button.home.frag"/>
+<src:fragref linkend="htmlhelp.button.home.url.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.title.frag"/>
+<src:fragref linkend="htmlhelp.button.jump1.url.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.title.frag"/>
+<src:fragref linkend="htmlhelp.button.jump2.url.frag"/>
+<src:fragref linkend="htmlhelp.button.locate.frag"/>
+<src:fragref linkend="htmlhelp.button.next.frag"/>
+<src:fragref linkend="htmlhelp.button.options.frag"/>
+<src:fragref linkend="htmlhelp.button.prev.frag"/>
+<src:fragref linkend="htmlhelp.button.print.frag"/>
+<src:fragref linkend="htmlhelp.button.refresh.frag"/>
+<src:fragref linkend="htmlhelp.button.stop.frag"/>
+<src:fragref linkend="htmlhelp.button.zoom.frag"/>
+<src:fragref linkend="htmlhelp.chm.frag"/>
+<src:fragref linkend="htmlhelp.default.topic.frag"/>
+<src:fragref linkend="htmlhelp.display.progress.frag"/>
+<src:fragref linkend="htmlhelp.encoding.frag"/>
+<src:fragref linkend="htmlhelp.enhanced.decompilation.frag"/>
+<src:fragref linkend="htmlhelp.enumerate.images.frag"/>
+<src:fragref linkend="htmlhelp.force.map.and.alias.frag"/>
+<src:fragref linkend="htmlhelp.hhc.binary.frag"/>
+<src:fragref linkend="htmlhelp.hhc.folders.instead.books.frag"/>
+<src:fragref linkend="htmlhelp.hhc.frag"/>
+<src:fragref linkend="htmlhelp.hhc.section.depth.frag"/>
+<src:fragref linkend="htmlhelp.hhc.show.root.frag"/>
+<src:fragref linkend="htmlhelp.hhc.width.frag"/>
+<src:fragref linkend="htmlhelp.hhk.frag"/>
+<src:fragref linkend="htmlhelp.hhp.frag"/>
+<src:fragref linkend="htmlhelp.hhp.tail.frag"/>
+<src:fragref linkend="htmlhelp.hhp.window.frag"/>
+<src:fragref linkend="htmlhelp.hhp.windows.frag"/>
+<src:fragref linkend="htmlhelp.map.file.frag"/>
+<src:fragref linkend="htmlhelp.only.frag"/>
+<src:fragref linkend="htmlhelp.remember.window.position.frag"/>
+<src:fragref linkend="htmlhelp.show.advanced.search.frag"/>
+<src:fragref linkend="htmlhelp.show.favorities.frag"/>
+<src:fragref linkend="htmlhelp.show.menu.frag"/>
+<src:fragref linkend="htmlhelp.show.toolbar.text.frag"/>
+<src:fragref linkend="htmlhelp.title.frag"/>
+<src:fragref linkend="htmlhelp.use.hhk.frag"/>
+<src:fragref linkend="htmlhelp.window.geometry.frag"/>
+<src:fragref linkend="img.src.path.frag"/>
+<src:fragref linkend="index.on.role.frag"/>
+<src:fragref linkend="index.on.type.frag"/>
+<src:fragref linkend="index.prefer.titleabbrev.frag"/>
+<src:fragref linkend="ignore.image.scaling.frag"/>
+<src:fragref linkend="inherit.keywords.frag"/>
+<src:fragref linkend="l10n.gentext.default.language.frag"/>
+<src:fragref linkend="l10n.gentext.language.frag"/>
+<src:fragref linkend="l10n.gentext.use.xref.language.frag"/>
+<src:fragref linkend="label.from.part.frag"/>
+<src:fragref linkend="linenumbering.everyNth.frag"/>
+<src:fragref linkend="linenumbering.extension.frag"/>
+<src:fragref linkend="linenumbering.separator.frag"/>
+<src:fragref linkend="linenumbering.width.frag"/>
+<src:fragref linkend="link.mailto.url.frag"/>
+<src:fragref linkend="make.graphic.viewport.frag"/>
+<src:fragref linkend="make.single.year.ranges.frag"/>
+<src:fragref linkend="make.valid.html.frag"/>
+<src:fragref linkend="make.year.ranges.frag"/>
+<src:fragref linkend="manifest.frag"/>
+<src:fragref linkend="manifest.in.base.dir.frag"/>
+<src:fragref linkend="manual.toc.frag"/>
+<src:fragref linkend="menuchoice.menu.separator.frag"/>
+<src:fragref linkend="menuchoice.separator.frag"/>
+<src:fragref linkend="navig.graphics.extension.frag"/>
+<src:fragref linkend="navig.graphics.frag"/>
+<src:fragref linkend="navig.graphics.path.frag"/>
+<src:fragref linkend="navig.showtitles.frag"/>
+<src:fragref linkend="nominal.image.depth.frag"/>
+<src:fragref linkend="nominal.image.width.frag"/>
+<src:fragref linkend="nominal.table.width.frag"/>
+<src:fragref linkend="olink.base.uri.frag"/>
+<src:fragref linkend="olink.debug.frag"/>
+<src:fragref linkend="olink.properties.frag"/>
+<src:fragref linkend="insert.olink.page.number.frag"/>
+<src:fragref linkend="insert.olink.pdf.frag.frag"/>
+<src:fragref linkend="prefer.internal.olink.frag"/>
+<src:fragref linkend="olink.lang.fallback.sequence.frag"/>
+<src:fragref linkend="olink.doctitle.frag"/>
+<src:fragref linkend="olink.fragid.frag"/>
+<src:fragref linkend="olink.outline.ext.frag"/>
+<src:fragref linkend="olink.pubid.frag"/>
+<src:fragref linkend="olink.resolver.frag"/>
+<src:fragref linkend="olink.sysid.frag"/>
+<src:fragref linkend="para.propagates.style.frag"/>
+<src:fragref linkend="part.autolabel.frag"/>
+<src:fragref linkend="phrase.propagates.style.frag"/>
+<src:fragref linkend="pixels.per.inch.frag"/>
+<src:fragref linkend="points.per.em.frag"/>
+<src:fragref linkend="preface.autolabel.frag"/>
+<src:fragref linkend="preferred.mediaobject.role.frag"/>
+<src:fragref linkend="process.empty.source.toc.frag"/>
+<src:fragref linkend="process.source.toc.frag"/>
+<src:fragref linkend="profile.arch.frag"/>
+<src:fragref linkend="profile.attribute.frag"/>
+<src:fragref linkend="profile.condition.frag"/>
+<src:fragref linkend="profile.conformance.frag"/>
+<src:fragref linkend="profile.lang.frag"/>
+<src:fragref linkend="profile.os.frag"/>
+<src:fragref linkend="profile.revision.frag"/>
+<src:fragref linkend="profile.revisionflag.frag"/>
+<src:fragref linkend="profile.role.frag"/>
+<src:fragref linkend="profile.security.frag"/>
+<src:fragref linkend="profile.separator.frag"/>
+<src:fragref linkend="profile.userlevel.frag"/>
+<src:fragref linkend="profile.value.frag"/>
+<src:fragref linkend="profile.vendor.frag"/>
+<src:fragref linkend="punct.honorific.frag"/>
+<src:fragref linkend="qanda.defaultlabel.frag"/>
+<src:fragref linkend="qanda.inherit.numeration.frag"/>
+<src:fragref linkend="qandadiv.autolabel.frag"/>
+<src:fragref linkend="refentry.generate.name.frag"/>
+<src:fragref linkend="refentry.generate.title.frag"/>
+<src:fragref linkend="refentry.separator.frag"/>
+<src:fragref linkend="refentry.xref.manvolnum.frag"/>
+<src:fragref linkend="root.filename.frag"/>
+<src:fragref linkend="rootid.frag"/>
+<src:fragref linkend="runinhead.default.title.end.punct.frag"/>
+<src:fragref linkend="runinhead.title.end.punct.frag"/>
+<src:fragref linkend="section.autolabel.frag"/>
+<src:fragref linkend="section.autolabel.max.depth.frag"/>
+<src:fragref linkend="section.label.includes.component.label.frag"/>
+<src:fragref linkend="segmentedlist.as.table.frag"/>
+<src:fragref linkend="shade.verbatim.frag"/>
+<src:fragref linkend="shade.verbatim.style.frag"/>
+<src:fragref linkend="show.comments.frag"/>
+<src:fragref linkend="show.revisionflag.frag"/>
+<src:fragref linkend="simplesect.in.toc.frag"/>
+<src:fragref linkend="spacing.paras.frag"/>
+<src:fragref linkend="suppress.footer.navigation.frag"/>
+<src:fragref linkend="suppress.header.navigation.frag"/>
+<src:fragref linkend="suppress.navigation.frag"/>
+<src:fragref linkend="table.borders.with.css.frag"/>
+<src:fragref linkend="table.cell.border.color.frag"/>
+<src:fragref linkend="table.cell.border.style.frag"/>
+<src:fragref linkend="table.cell.border.thickness.frag"/>
+<src:fragref linkend="table.footnote.number.format.frag"/>
+<src:fragref linkend="table.footnote.number.symbols.frag"/>
+<src:fragref linkend="table.frame.border.color.frag"/>
+<src:fragref linkend="table.frame.border.style.frag"/>
+<src:fragref linkend="table.frame.border.thickness.frag"/>
+<src:fragref linkend="tablecolumns.extension.frag"/>
+<src:fragref linkend="target.database.document.frag"/>
+<src:fragref linkend="targets.filename.frag"/>
+<src:fragref linkend="textdata.default.encoding.frag"/>
+<src:fragref linkend="tex.math.delims.frag"/>
+<src:fragref linkend="tex.math.file.frag"/>
+<src:fragref linkend="tex.math.in.alt.frag"/>
+<src:fragref linkend="textinsert.extension.frag"/>
+<src:fragref linkend="toc.list.type.frag"/>
+<src:fragref linkend="toc.section.depth.frag"/>
+<src:fragref linkend="toc.max.depth.frag"/>
+<src:fragref linkend="ulink.target.frag"/>
+<src:fragref linkend="use.embed.for.svg.frag"/>
+<src:fragref linkend="use.extensions.frag"/>
+<src:fragref linkend="use.id.as.filename.frag"/>
+<src:fragref linkend="use.local.olink.style.frag"/>
+<src:fragref linkend="use.role.as.xrefstyle.frag"/>
+<src:fragref linkend="use.role.for.mediaobject.frag"/>
+<src:fragref linkend="use.svg.frag"/>
+<src:fragref linkend="variablelist.as.table.frag"/>
+<src:fragref linkend="xref.with.number.and.title.frag"/>
+<src:fragref linkend="xref.label-title.separator.frag"/>
+<src:fragref linkend="xref.label-page.separator.frag"/>
+<src:fragref linkend="xref.title-page.separator.frag"/>
+<src:fragref linkend="insert.xref.page.number.frag"/>
+
+</xsl:stylesheet>
+</src:fragment>
+
+</appendix>
+
+</book>
diff --git a/kdoctools/docbook/xsl/html/pi.xsl b/kdoctools/docbook/xsl/html/pi.xsl
new file mode 100644
index 000000000..064138c03
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/pi.xsl
@@ -0,0 +1,207 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<xsl:template match="processing-instruction()">
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbhtml')">
+ <!-- nop -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="dbhtml-attribute">
+ <xsl:param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:param name="attribute">filename</xsl:param>
+
+ <xsl:call-template name="pi-attribute">
+ <xsl:with-param name="pis" select="$pis"/>
+ <xsl:with-param name="attribute" select="$attribute"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="dbhtml-filename">
+ <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="$pis"/>
+ <xsl:with-param name="attribute">filename</xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!--
+<xsl:template name="dbhtml-dir">
+ <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="$pis"/>
+ <xsl:with-param name="attribute">dir</xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+-->
+
+<xsl:template name="dbhtml-dir">
+ <xsl:param name="context" select="."/>
+
+ <!-- directories are now inherited from previous levels -->
+
+ <xsl:variable name="ppath">
+ <xsl:if test="$context/parent::*">
+ <xsl:call-template name="dbhtml-dir">
+ <xsl:with-param name="context" select="$context/parent::*"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="path">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="$context/processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute">dir</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$path = ''">
+ <xsl:if test="$ppath != ''">
+ <xsl:value-of select="$ppath"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$ppath != ''">
+ <xsl:value-of select="$ppath"/>
+ <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
+ <xsl:text>/</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:value-of select="$path"/>
+ <xsl:text>/</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.cmdsynopsis.list">
+ <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
+ <xsl:param name="count" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="$count>count($cmdsynopses)"></xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
+
+ <dt>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$cmdsyn"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:choose>
+ <xsl:when test="$cmdsyn/@xreflabel">
+ <xsl:call-template name="xref.xreflabel">
+ <xsl:with-param name="target" select="$cmdsyn"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+ <xsl:with-param name="target" select="$cmdsyn"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </dt>
+
+ <xsl:call-template name="process.cmdsynopsis.list">
+ <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbcmdlist')">
+ <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
+
+ <xsl:if test="count($cmdsynopses)&lt;1">
+ <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <dl>
+ <xsl:call-template name="process.cmdsynopsis.list">
+ <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
+ </xsl:call-template>
+ </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.funcsynopsis.list">
+ <xsl:param name="funcsynopses"/><!-- empty node list by default -->
+ <xsl:param name="count" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="$count>count($funcsynopses)"></xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
+
+ <dt>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$cmdsyn"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:choose>
+ <xsl:when test="$cmdsyn/@xreflabel">
+ <xsl:call-template name="xref.xreflabel">
+ <xsl:with-param name="target" select="$cmdsyn"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$cmdsyn" mode="xref-to">
+ <xsl:with-param name="target" select="$cmdsyn"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </dt>
+
+ <xsl:call-template name="process.funcsynopsis.list">
+ <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="processing-instruction('dbfunclist')">
+ <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
+
+ <xsl:if test="count($funcsynopses)&lt;1">
+ <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <dl>
+ <xsl:call-template name="process.funcsynopsis.list">
+ <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
+ </xsl:call-template>
+ </dl>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/profile-chunk-code.xsl b/kdoctools/docbook/xsl/html/profile-chunk-code.xsl
new file mode 100644
index 000000000..edbd0ed16
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/profile-chunk-code.xsl
@@ -0,0 +1,732 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--This file was created automatically by xsl2profile-->
+<!--from the DocBook XSL stylesheets. Do not edit this file.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" version="1.0" exclude-result-prefixes="exsl exslt">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:param name="onechunk" select="0"/>
+<xsl:param name="refentry.separator" select="0"/>
+<xsl:param name="chunk.fast" select="0"/>
+
+<xsl:key name="genid" match="*" use="generate-id()"/>
+
+<!-- ==================================================================== -->
+
+<xsl:variable name="chunk.hierarchy">
+ <xsl:if test="$chunk.fast != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:message>Computing chunks...</xsl:message>
+ <xsl:apply-templates select="/*" mode="find.chunks"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Fast chunking requires exsl:node-set(). </xsl:text>
+ <xsl:text>Using "slow" chunking.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:variable>
+
+<xsl:template match="*" mode="find.chunks">
+ <xsl:variable name="chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$chunk != 0">
+ <div class="{local-name(.)}" id="{generate-id()}">
+ <xsl:apply-templates select="*" mode="find.chunks"/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*" mode="find.chunks"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process-chunk-element">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$chunk.fast != 0 and function-available('exsl:node-set')">
+ <xsl:variable name="chunks" select="exsl:node-set($chunk.hierarchy)//div"/>
+ <xsl:variable name="genid" select="generate-id()"/>
+
+ <xsl:variable name="div" select="$chunks[@id=$genid]"/>
+
+ <xsl:variable name="prevdiv" select="($div/preceding-sibling::div|$div/preceding::div|$div/parent::div)[last()]"/>
+ <xsl:variable name="prev" select="key('genid', $prevdiv/@id)"/>
+
+ <xsl:variable name="nextdiv" select="($div/following-sibling::div|$div/following::div|$div/div)[1]"/>
+ <xsl:variable name="next" select="key('genid', $nextdiv/@id)"/>
+
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and not(parent::*)">
+ <xsl:call-template name="chunk-all-sections">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$onechunk != 0">
+ <xsl:copy-of select="$content"/>
+ </xsl:when>
+ <xsl:when test="$chunk.first.sections = 0">
+ <xsl:call-template name="chunk-first-section-with-parent">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="chunk-all-sections">
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process-chunk">
+ <xsl:param name="prev" select="."/>
+ <xsl:param name="next" select="."/>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:variable name="chunkfn">
+ <xsl:if test="$ischunk='1'">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:if test="$ischunk='0'">
+ <xsl:message>
+ <xsl:text>Error </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text> is not a chunk!</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name" select="$chunkfn"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-first-section-with-parent">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <!-- These xpath expressions are really hairy. The trick is to pick sections -->
+ <!-- that are not first children and are not the children of first children -->
+
+ <!-- Break these variables into pieces to work around
+ http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6063 -->
+
+ <xsl:variable name="prev-v1" select="(ancestor::sect1[$chunk.section.depth &gt; 0 and preceding-sibling::sect1][1] |ancestor::sect2[$chunk.section.depth &gt; 1 and preceding-sibling::sect2 and parent::sect1[preceding-sibling::sect1]][1] |ancestor::sect3[$chunk.section.depth &gt; 2 and preceding-sibling::sect3 and parent::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |ancestor::sect4[$chunk.section.depth &gt; 3 and preceding-sibling::sect4 and parent::sect3[preceding-sibling::sect2] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |ancestor::sect5[$chunk.section.depth &gt; 4 and preceding-sibling::sect5 and parent::sect4[preceding-sibling::sect4] and ancestor::sect3[preceding-sibling::sect3] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |ancestor::section[$chunk.section.depth &gt; count(ancestor::section) and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+ <xsl:variable name="prev-v2" select="(preceding::sect1[$chunk.section.depth &gt; 0 and preceding-sibling::sect1][1] |preceding::sect2[$chunk.section.depth &gt; 1 and preceding-sibling::sect2 and parent::sect1[preceding-sibling::sect1]][1] |preceding::sect3[$chunk.section.depth &gt; 2 and preceding-sibling::sect3 and parent::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |preceding::sect4[$chunk.section.depth &gt; 3 and preceding-sibling::sect4 and parent::sect3[preceding-sibling::sect2] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |preceding::sect5[$chunk.section.depth &gt; 4 and preceding-sibling::sect5 and parent::sect4[preceding-sibling::sect4] and ancestor::sect3[preceding-sibling::sect3] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |preceding::section[$chunk.section.depth &gt; count(ancestor::section) and preceding-sibling::section and not(ancestor::section[not(preceding-sibling::section)])][1])[last()]"/>
+
+ <xsl:variable name="prev" select="(preceding::book[1] |preceding::preface[1] |preceding::chapter[1] |preceding::appendix[1] |preceding::part[1] |preceding::reference[1] |preceding::refentry[1] |preceding::colophon[1] |preceding::article[1] |preceding::bibliography[parent::article or parent::book or parent::part][1] |preceding::glossary[parent::article or parent::book or parent::part][1] |preceding::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |preceding::setindex[$generate.index != 0][1] |ancestor::set |ancestor::book[1] |ancestor::preface[1] |ancestor::chapter[1] |ancestor::appendix[1] |ancestor::part[1] |ancestor::reference[1] |ancestor::article[1] |$prev-v1 |$prev-v2)[last()]"/>
+
+ <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0 and preceding-sibling::sect1][1] |following::sect2[$chunk.section.depth &gt; 1 and preceding-sibling::sect2 and parent::sect1[preceding-sibling::sect1]][1] |following::sect3[$chunk.section.depth &gt; 2 and preceding-sibling::sect3 and parent::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |following::sect4[$chunk.section.depth &gt; 3 and preceding-sibling::sect4 and parent::sect3[preceding-sibling::sect2] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |following::sect5[$chunk.section.depth &gt; 4 and preceding-sibling::sect5 and parent::sect4[preceding-sibling::sect4] and ancestor::sect3[preceding-sibling::sect3] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |following::section[$chunk.section.depth &gt; count(ancestor::section) and preceding-sibling::section and not(ancestor::section[not(preceding-sibling::section)])][1])[1]"/>
+
+ <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0 and preceding-sibling::sect1][1] |descendant::sect2[$chunk.section.depth &gt; 1 and preceding-sibling::sect2 and parent::sect1[preceding-sibling::sect1]][1] |descendant::sect3[$chunk.section.depth &gt; 2 and preceding-sibling::sect3 and parent::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |descendant::sect4[$chunk.section.depth &gt; 3 and preceding-sibling::sect4 and parent::sect3[preceding-sibling::sect2] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |descendant::sect5[$chunk.section.depth &gt; 4 and preceding-sibling::sect5 and parent::sect4[preceding-sibling::sect4] and ancestor::sect3[preceding-sibling::sect3] and ancestor::sect2[preceding-sibling::sect2] and ancestor::sect1[preceding-sibling::sect1]][1] |descendant::section[$chunk.section.depth &gt; count(ancestor::section) and preceding-sibling::section and not(ancestor::section[not(preceding-sibling::section)])])[1]"/>
+
+ <xsl:variable name="next" select="(following::book[1] |following::preface[1] |following::chapter[1] |following::appendix[1] |following::part[1] |following::reference[1] |following::refentry[1] |following::colophon[1] |following::bibliography[parent::article or parent::book or parent::part][1] |following::glossary[parent::article or parent::book or parent::part][1] |following::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |following::article[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] |descendant::preface[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::article[1] |descendant::bibliography[parent::article or parent::book or parent::part][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |descendant::colophon[1] |descendant::setindex[$generate.index != 0][1] |descendant::part[1] |descendant::reference[1] |descendant::refentry[1] |$next-v1 |$next-v2)[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="chunk-all-sections">
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
+
+ <xsl:variable name="prev-v1" select="(preceding::sect1[$chunk.section.depth &gt; 0][1] |preceding::sect2[$chunk.section.depth &gt; 1][1] |preceding::sect3[$chunk.section.depth &gt; 2][1] |preceding::sect4[$chunk.section.depth &gt; 3][1] |preceding::sect5[$chunk.section.depth &gt; 4][1] |preceding::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+ <xsl:variable name="prev-v2" select="(ancestor::sect1[$chunk.section.depth &gt; 0][1] |ancestor::sect2[$chunk.section.depth &gt; 1][1] |ancestor::sect3[$chunk.section.depth &gt; 2][1] |ancestor::sect4[$chunk.section.depth &gt; 3][1] |ancestor::sect5[$chunk.section.depth &gt; 4][1] |ancestor::section[$chunk.section.depth &gt; count(ancestor::section)][1])[last()]"/>
+
+ <xsl:variable name="prev" select="(preceding::book[1] |preceding::preface[1] |preceding::chapter[1] |preceding::appendix[1] |preceding::part[1] |preceding::reference[1] |preceding::refentry[1] |preceding::colophon[1] |preceding::article[1] |preceding::bibliography[parent::article or parent::book or parent::part][1] |preceding::glossary[parent::article or parent::book or parent::part][1] |preceding::index[$generate.index != 0] [parent::article or parent::book or parent::part][1] |preceding::setindex[$generate.index != 0][1] |ancestor::set |ancestor::book[1] |ancestor::preface[1] |ancestor::chapter[1] |ancestor::appendix[1] |ancestor::part[1] |ancestor::reference[1] |ancestor::article[1] |$prev-v1 |$prev-v2)[last()]"/>
+
+ <xsl:variable name="next-v1" select="(following::sect1[$chunk.section.depth &gt; 0][1] |following::sect2[$chunk.section.depth &gt; 1][1] |following::sect3[$chunk.section.depth &gt; 2][1] |following::sect4[$chunk.section.depth &gt; 3][1] |following::sect5[$chunk.section.depth &gt; 4][1] |following::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
+
+ <xsl:variable name="next-v2" select="(descendant::sect1[$chunk.section.depth &gt; 0][1] |descendant::sect2[$chunk.section.depth &gt; 1][1] |descendant::sect3[$chunk.section.depth &gt; 2][1] |descendant::sect4[$chunk.section.depth &gt; 3][1] |descendant::sect5[$chunk.section.depth &gt; 4][1] |descendant::section[$chunk.section.depth &gt; count(ancestor::section)][1])[1]"/>
+
+ <xsl:variable name="next" select="(following::book[1] |following::preface[1] |following::chapter[1] |following::appendix[1] |following::part[1] |following::reference[1] |following::refentry[1] |following::colophon[1] |following::bibliography[parent::article or parent::book or parent::part][1] |following::glossary[parent::article or parent::book or parent::part][1] |following::index[$generate.index != 0] [parent::article or parent::book][1] |following::article[1] |following::setindex[$generate.index != 0][1] |descendant::book[1] |descendant::preface[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::article[1] |descendant::bibliography[parent::article or parent::book][1] |descendant::glossary[parent::article or parent::book or parent::part][1] |descendant::index[$generate.index != 0] [parent::article or parent::book][1] |descendant::colophon[1] |descendant::setindex[$generate.index != 0][1] |descendant::part[1] |descendant::reference[1] |descendant::refentry[1] |$next-v1 |$next-v2)[1]"/>
+
+ <xsl:call-template name="process-chunk">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="content" select="$content"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+ <xsl:choose>
+ <xsl:when test="$rootid != ''">
+ <xsl:choose>
+ <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>ID '</xsl:text>
+ <xsl:value-of select="$rootid"/>
+ <xsl:text>' not found in document.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
+ </xsl:if>
+ <xsl:if test="$generate.manifest != 0">
+ <xsl:call-template name="generate.manifest">
+ <xsl:with-param name="node" select="key('id',$rootid)"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
+ </xsl:if>
+ <xsl:if test="$generate.manifest != 0">
+ <xsl:call-template name="generate.manifest"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template match="set|book|part|preface|chapter|appendix |article |reference|refentry |book/glossary|article/glossary|part/glossary |book/bibliography|article/bibliography|part/bibliography |colophon">
+ <xsl:choose>
+ <xsl:when test="$onechunk != 0 and parent::*">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="sect1|sect2|sect3|sect4|sect5|section">
+ <xsl:variable name="ischunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="not(parent::*)">
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:when>
+ <xsl:when test="$ischunk = 0">
+ <xsl:apply-imports/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="setindex |book/index |article/index |part/index">
+ <!-- some implementations use completely empty index tags to indicate -->
+ <!-- where an automatically generated index should be inserted. so -->
+ <!-- if the index is completely empty, skip it. -->
+ <xsl:if test="count(*)&gt;0 or $generate.index != '0'">
+ <xsl:call-template name="process-chunk-element"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="make.lots">
+ <xsl:param name="toc.params" select="''"/>
+ <xsl:param name="toc"/>
+
+ <xsl:variable name="lots">
+ <xsl:if test="contains($toc.params, 'toc')">
+ <xsl:copy-of select="$toc"/>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'figure')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'figure'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'figure'"/>
+ <xsl:with-param name="nodes" select=".//figure"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'figure'"/>
+ <xsl:with-param name="nodes" select=".//figure"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'table')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'table'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'table'"/>
+ <xsl:with-param name="nodes" select=".//table"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'table'"/>
+ <xsl:with-param name="nodes" select=".//table"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'example')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'example'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'example'"/>
+ <xsl:with-param name="nodes" select=".//example"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'example'"/>
+ <xsl:with-param name="nodes" select=".//example"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'equation')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'equation'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'equation'"/>
+ <xsl:with-param name="nodes" select=".//equation"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'equation'"/>
+ <xsl:with-param name="nodes" select=".//equation"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+
+ <xsl:if test="contains($toc.params, 'procedure')">
+ <xsl:choose>
+ <xsl:when test="$chunk.separate.lots != '0'">
+ <xsl:call-template name="make.lot.chunk">
+ <xsl:with-param name="type" select="'procedure'"/>
+ <xsl:with-param name="lot">
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'procedure'"/>
+ <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="list.of.titles">
+ <xsl:with-param name="titles" select="'procedure'"/>
+ <xsl:with-param name="nodes" select=".//procedure[title]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:if test="string($lots) != ''">
+ <xsl:choose>
+ <xsl:when test="$chunk.tocs.and.lots != 0 and not(parent::*)">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:apply-templates select="." mode="recursive-chunk-filename">
+ <xsl:with-param name="recursive" select="true()"/>
+ </xsl:apply-templates>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="/foo"/>
+ <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="nav.context" select="'toc'"/>
+ <xsl:with-param name="content">
+ <h1>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </h1>
+ <xsl:copy-of select="$lots"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$lots"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="make.lot.chunk">
+ <xsl:param name="type" select="''"/>
+ <xsl:param name="lot"/>
+
+ <xsl:if test="string($lot) != ''">
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:value-of select="$type"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="href">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.name">
+ <xsl:call-template name="dbhtml-dir"/>
+ <xsl:value-of select="$type"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="chunk-element-content">
+ <xsl:with-param name="prev" select="/foo"/>
+ <xsl:with-param name="next" select="/foo"/>
+ <xsl:with-param name="nav.context" select="'toc'"/>
+ <xsl:with-param name="content">
+ <xsl:copy-of select="$lot"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ </xsl:call-template>
+ <!-- And output a link to this file -->
+ <div>
+ <xsl:attribute name="class">
+ <xsl:text>ListofTitles</xsl:text>
+ </xsl:attribute>
+ <a href="{$href}">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key">
+ <xsl:choose>
+ <xsl:when test="$type='table'">ListofTables</xsl:when>
+ <xsl:when test="$type='figure'">ListofFigures</xsl:when>
+ <xsl:when test="$type='equation'">ListofEquations</xsl:when>
+ <xsl:when test="$type='example'">ListofExamples</xsl:when>
+ <xsl:when test="$type='procedure'">ListofProcedures</xsl:when>
+ <xsl:otherwise>ListofUnknown</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="in.other.chunk">
+ <xsl:param name="chunk" select="."/>
+ <xsl:param name="node" select="."/>
+
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+<!--
+ <xsl:message>
+ <xsl:text>in.other.chunk: </xsl:text>
+ <xsl:value-of select="name($chunk)"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="name($node)"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$chunk = $node"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$is.chunk"/>
+ </xsl:message>
+-->
+
+ <xsl:choose>
+ <xsl:when test="$chunk = $node">0</xsl:when>
+ <xsl:when test="$is.chunk = 1">1</xsl:when>
+ <xsl:when test="count($node) = 0">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$chunk"/>
+ <xsl:with-param name="node" select="$node/parent::*"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="count.footnotes.in.this.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnotes" select="$node//footnote"/>
+ <xsl:param name="count" select="0"/>
+
+<!--
+ <xsl:message>
+ <xsl:text>count.footnotes.in.this.chunk: </xsl:text>
+ <xsl:value-of select="name($node)"/>
+ </xsl:message>
+-->
+
+ <xsl:variable name="in.other.chunk">
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$node"/>
+ <xsl:with-param name="node" select="$footnotes[1]"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="count($footnotes) = 0">
+ <xsl:value-of select="$count"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$in.other.chunk != 0">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$footnotes[1]/ancestor::table |$footnotes[1]/ancestor::informaltable">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ <xsl:with-param name="count" select="$count + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes.in.this.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="footnotes" select="$node//footnote"/>
+
+<!--
+ <xsl:message>process.footnotes.in.this.chunk</xsl:message>
+-->
+
+ <xsl:variable name="in.other.chunk">
+ <xsl:call-template name="in.other.chunk">
+ <xsl:with-param name="chunk" select="$node"/>
+ <xsl:with-param name="node" select="$footnotes[1]"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="count($footnotes) = 0">
+ <!-- nop -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$in.other.chunk != 0">
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$footnotes[1]/ancestor::table |$footnotes[1]/ancestor::informaltable">
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$footnotes[1]" mode="process.footnote.mode"/>
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="footnotes" select="$footnotes[position() &gt; 1]"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="process.footnotes">
+ <xsl:variable name="footnotes" select=".//footnote"/>
+ <xsl:variable name="fcount">
+ <xsl:call-template name="count.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="footnotes" select="$footnotes"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+<!--
+ <xsl:message>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text> fcount: </xsl:text>
+ <xsl:value-of select="$fcount"/>
+ </xsl:message>
+-->
+
+ <!-- Only bother to do this if there's at least one non-table footnote -->
+ <xsl:if test="$fcount &gt; 0">
+ <div class="footnotes">
+ <br/>
+ <hr width="100" align="left"/>
+ <xsl:call-template name="process.footnotes.in.this.chunk">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="footnotes" select="$footnotes"/>
+ </xsl:call-template>
+ </div>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template name="process.chunk.footnotes">
+ <xsl:variable name="is.chunk">
+ <xsl:call-template name="chunk"/>
+ </xsl:variable>
+ <xsl:if test="$is.chunk = 1">
+ <xsl:call-template name="process.footnotes"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<!-- Resolve xml:base attributes -->
+<xsl:template match="@fileref">
+ <!-- need a check for absolute urls -->
+ <xsl:choose>
+ <xsl:when test="contains(., ':')">
+ <!-- it has a uri scheme so it is an absolute uri -->
+ <xsl:value-of select="."/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- its a relative uri -->
+ <xsl:call-template name="relative-uri">
+ <xsl:with-param name="destdir">
+ <xsl:call-template name="dbhtml-dir">
+ <xsl:with-param name="context" select=".."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/profile-chunk.xsl b/kdoctools/docbook/xsl/html/profile-chunk.xsl
new file mode 100644
index 000000000..918c7ba57
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/profile-chunk.xsl
@@ -0,0 +1,40 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0"
+ exclude-result-prefixes="exsl">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="docbook.xsl"/>
+<xsl:import href="chunk-common.xsl"/>
+<xsl:include href="manifest.xsl"/>
+
+<!-- Why is chunk-code now xsl:included?
+
+Suppose you want to customize *both* the chunking algorithm used *and* the
+presentation of some elements that may be chunks. In order to do that, you
+must get the order of imports "just right". The answer is to make your own
+copy of this file, where you replace the initial import of "docbook.xsl"
+with an import of your own base.xsl (that does its own import of docbook.xsl).
+
+Put the templates for changing the presentation of elements in your base.xsl.
+
+Put the templates that control chunking after the include of chunk-code.xsl.
+
+Voila! (Man I hope we can do this better in XSLT 2.0)
+
+-->
+
+<xsl:include href="profile-chunk-code.xsl"/>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/profile-docbook.xsl b/kdoctools/docbook/xsl/html/profile-docbook.xsl
new file mode 100644
index 000000000..47f4f6a3b
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/profile-docbook.xsl
@@ -0,0 +1,390 @@
+<?xml version="1.0" encoding="US-ASCII"?>
+<!--This file was created automatically by xsl2profile-->
+<!--from the DocBook XSL stylesheets. Do not edit this file.-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:exslt="http://exslt.org/common" exslt:dummy="dummy" extension-element-prefixes="exslt" exclude-result-prefixes="exsl exslt" version="1.0">
+
+<xsl:output method="html" encoding="ISO-8859-1" indent="no"/>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:include href="../VERSION"/>
+<xsl:include href="param.xsl"/>
+<xsl:include href="../lib/lib.xsl"/>
+<xsl:include href="../common/l10n.xsl"/>
+<xsl:include href="../common/common.xsl"/>
+<xsl:include href="../common/labels.xsl"/>
+<xsl:include href="../common/titles.xsl"/>
+<xsl:include href="../common/subtitles.xsl"/>
+<xsl:include href="../common/gentext.xsl"/>
+<xsl:include href="../common/targets.xsl"/>
+<xsl:include href="../common/olink.xsl"/>
+<xsl:include href="../common/pi.xsl"/>
+<xsl:include href="autotoc.xsl"/>
+<xsl:include href="autoidx.xsl"/>
+<xsl:include href="lists.xsl"/>
+<xsl:include href="callout.xsl"/>
+<xsl:include href="verbatim.xsl"/>
+<xsl:include href="graphics.xsl"/>
+<xsl:include href="xref.xsl"/>
+<xsl:include href="formal.xsl"/>
+<xsl:include href="table.xsl"/>
+<xsl:include href="htmltbl.xsl"/>
+<xsl:include href="sections.xsl"/>
+<xsl:include href="inline.xsl"/>
+<xsl:include href="footnote.xsl"/>
+<xsl:include href="html.xsl"/>
+<xsl:include href="info.xsl"/>
+<xsl:include href="keywords.xsl"/>
+<xsl:include href="division.xsl"/>
+<xsl:include href="toc.xsl"/>
+<xsl:include href="index.xsl"/>
+<xsl:include href="refentry.xsl"/>
+<xsl:include href="math.xsl"/>
+<xsl:include href="admon.xsl"/>
+<xsl:include href="component.xsl"/>
+<xsl:include href="biblio.xsl"/>
+<xsl:include href="glossary.xsl"/>
+<xsl:include href="block.xsl"/>
+<xsl:include href="task.xsl"/>
+<xsl:include href="qandaset.xsl"/>
+<xsl:include href="synop.xsl"/>
+<xsl:include href="titlepage.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
+<xsl:include href="pi.xsl"/>
+<xsl:include href="ebnf.xsl"/>
+<xsl:include href="chunker.xsl"/>
+<xsl:include href="html-rtf.xsl"/>
+<xsl:include href="docbookng.xsl"/>
+
+<xsl:param name="stylesheet.result.type" select="'html'"/>
+<xsl:param name="htmlhelp.output" select="0"/>
+
+<!-- ==================================================================== -->
+
+<xsl:key name="id" match="*" use="@id"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*">
+ <xsl:message>
+ <xsl:text>No template matches </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:if test="parent::*">
+ <xsl:text> in </xsl:text>
+ <xsl:value-of select="name(parent::*)"/>
+ </xsl:if>
+ <xsl:text>.</xsl:text>
+ </xsl:message>
+
+ <font color="red">
+ <xsl:text>&lt;</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>&gt;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>&lt;/</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>&gt;</xsl:text>
+ </font>
+</xsl:template>
+
+<xsl:template match="text()">
+ <xsl:value-of select="."/>
+</xsl:template>
+
+<xsl:template name="body.attributes">
+ <xsl:attribute name="bgcolor">white</xsl:attribute>
+ <xsl:attribute name="text">black</xsl:attribute>
+ <xsl:attribute name="link">#0000FF</xsl:attribute>
+ <xsl:attribute name="vlink">#840084</xsl:attribute>
+ <xsl:attribute name="alink">#0000FF</xsl:attribute>
+</xsl:template>
+
+<xsl:template name="head.content">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="title">
+ <xsl:apply-templates select="$node" mode="object.title.markup.textonly"/>
+ </xsl:param>
+
+ <title>
+ <xsl:copy-of select="$title"/>
+ </title>
+
+ <xsl:if test="$html.stylesheet != ''">
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="normalize-space($html.stylesheet)"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:if test="$link.mailto.url != ''">
+ <link rev="made" href="{$link.mailto.url}"/>
+ </xsl:if>
+
+ <xsl:if test="$html.base != ''">
+ <base href="{$html.base}"/>
+ </xsl:if>
+
+ <meta name="generator" content="DocBook XSL Stylesheets V{$VERSION}"/>
+
+ <xsl:if test="$generate.meta.abstract != 0">
+ <xsl:variable name="info" select="(articleinfo |bookinfo |prefaceinfo |chapterinfo |appendixinfo |sectioninfo |sect1info |sect2info |sect3info |sect4info |sect5info |referenceinfo |refentryinfo |partinfo |info |docinfo)[1]"/>
+ <xsl:if test="$info and $info/abstract">
+ <meta name="description">
+ <xsl:attribute name="content">
+ <xsl:for-each select="$info/abstract[1]/*">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() &lt; last()">
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:attribute>
+ </meta>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="($draft.mode = 'yes' or ($draft.mode = 'maybe' and ancestor-or-self::*[@status][1]/@status = 'draft')) and $draft.watermark.image != ''">
+ <style type="text/css"><xsl:text>
+body { background-image: url('</xsl:text>
+<xsl:value-of select="$draft.watermark.image"/><xsl:text>');
+ background-repeat: no-repeat;
+ background-position: top left;
+ /* The following properties make the watermark "fixed" on the page. */
+ /* I think that's just a bit too distracting for the reader... */
+ /* background-attachment: fixed; */
+ /* background-position: center center; */
+ }</xsl:text>
+ </style>
+ </xsl:if>
+ <xsl:apply-templates select="." mode="head.keywords.content"/>
+</xsl:template>
+
+<xsl:template name="output.html.stylesheets">
+ <xsl:param name="stylesheets" select="''"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($stylesheets, ' ')">
+ <link rel="stylesheet" href="{substring-before($stylesheets, ' ')}">
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ <xsl:call-template name="output.html.stylesheets">
+ <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="$stylesheets != ''">
+ <link rel="stylesheet" href="{$stylesheets}">
+ <xsl:if test="$html.stylesheet.type != ''">
+ <xsl:attribute name="type">
+ <xsl:value-of select="$html.stylesheet.type"/>
+ </xsl:attribute>
+ </xsl:if>
+ </link>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template match="*" mode="head.keywords.content">
+ <xsl:apply-templates select="chapterinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="appendixinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="prefaceinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="bookinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="setinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="articleinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="artheader/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect1info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect2info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect3info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect4info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="sect5info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect1info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect2info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refsect3info/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="bibliographyinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="glossaryinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="indexinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="refentryinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="partinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="referenceinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="docinfo/keywordset" mode="html.header"/>
+ <xsl:apply-templates select="info/keywordset" mode="html.header"/>
+
+ <xsl:if test="$inherit.keywords != 0 and parent::*">
+ <xsl:apply-templates select="parent::*" mode="head.keywords.content"/>
+ </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="system.head.content">
+ <xsl:param name="node" select="."/>
+
+ <!-- system.head.content is like user.head.content, except that
+ it is called before head.content. This is important because it
+ means, for example, that <style> elements output by system.head.content
+ have a lower CSS precedence than the users stylesheet. -->
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:template name="user.preroot">
+ <!-- Pre-root output, can be used to output comments and PIs. -->
+ <!-- This must not output any element content! -->
+</xsl:template>
+
+<xsl:template name="user.head.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.navigation">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.header.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.content">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xsl:template name="user.footer.navigation">
+ <xsl:param name="node" select="."/>
+</xsl:template>
+
+<xslo:include xmlns:xslo="http://www.w3.org/1999/XSL/Transform" href="../profiling/profile-mode.xsl"/><xsl:template match="/"><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-content"><xslo:apply-templates select="." mode="profile"/></xslo:variable><xslo:variable xmlns:xslo="http://www.w3.org/1999/XSL/Transform" name="profiled-nodes" select="exslt:node-set($profiled-content)"/>
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set') and namespace-uri(*[1]) = 'http://docbook.org/docbook-ng'">
+ <!-- Hack! If someone hands us a DocBook NG document, toss the namespace -->
+ <!-- and continue. Someday we may reverse this logic and add the namespace -->
+ <!-- to documents that don't have one. But not before the whole stylesheet -->
+ <!-- has been converted to use namespaces. i.e., don't hold your breath -->
+ <xsl:variable name="nons">
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:variable>
+ <xsl:apply-templates select="exsl:node-set($nons)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$rootid != ''">
+ <xsl:choose>
+ <xsl:when test="count($profiled-nodes//*[@id=$rootid]) = 0">
+ <xsl:message terminate="yes">
+ <xsl:text>ID '</xsl:text>
+ <xsl:value-of select="$rootid"/>
+ <xsl:text>' not found in document.</xsl:text>
+ </xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="key('id', $rootid)" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="$profiled-nodes//*[@id=$rootid]" mode="collect.tex.math"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$collect.xref.targets = 'yes' or $collect.xref.targets = 'only'">
+ <xsl:apply-templates select="$profiled-nodes" mode="collect.targets"/>
+ </xsl:if>
+ <xsl:if test="$collect.xref.targets != 'only'">
+ <xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
+ <xsl:if test="$tex.math.in.alt != ''">
+ <xsl:apply-templates select="$profiled-nodes" mode="collect.tex.math"/>
+ </xsl:if>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="process.root">
+ <xsl:variable name="doc" select="self::*"/>
+
+ <xsl:call-template name="user.preroot"/>
+ <xsl:call-template name="root.messages"/>
+
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:call-template name="head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:call-template name="user.head.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <xsl:call-template name="user.header.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="."/>
+ <xsl:call-template name="user.footer.content">
+ <xsl:with-param name="node" select="$doc"/>
+ </xsl:call-template>
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="root.messages">
+ <!-- redefine this any way you'd like to output messages -->
+ <!-- DO NOT OUTPUT ANYTHING FROM THIS TEMPLATE -->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="chunk">
+ <xsl:param name="node" select="."/>
+
+ <!-- The default is that we are not chunking... -->
+ <xsl:text>0</xsl:text>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="stripNS">
+ <xsl:choose>
+ <xsl:when test="namespace-uri(.) = 'http://docbook.org/docbook-ng'">
+ <xsl:element name="{local-name(.)}">
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates mode="stripNS"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="comment()|processing-instruction()|text()" mode="stripNS">
+ <xsl:copy/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/profile-onechunk.xsl b/kdoctools/docbook/xsl/html/profile-onechunk.xsl
new file mode 100644
index 000000000..42597c97f
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/profile-onechunk.xsl
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ version="1.0"
+ exclude-result-prefixes="doc">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:import href="profile-chunk.xsl"/>
+
+<!-- Ok, using the onechunk parameter makes this all work again. -->
+<!-- It does have the disadvantage that it only works for documents that have -->
+<!-- a root element that is considered a chunk by the chunk.xsl stylesheet. -->
+<!-- Ideally, onechunk would let anything be a chunk. But not today. -->
+
+<xsl:param name="onechunk" select="1"/>
+<xsl:param name="suppress.navigation">1</xsl:param>
+
+<xsl:template name="href.target.uri">
+ <xsl:param name="object" select="."/>
+ <xsl:text>#</xsl:text>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="$object"/>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/qandaset.xsl b/kdoctools/docbook/xsl/html/qandaset.xsl
new file mode 100644
index 000000000..2f3535150
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/qandaset.xsl
@@ -0,0 +1,360 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="doc"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="qandaset">
+ <xsl:variable name="title" select="(blockinfo/title|title)[1]"/>
+ <xsl:variable name="preamble" select="*[name(.) != 'title'
+ and name(.) != 'titleabbrev'
+ and name(.) != 'qandadiv'
+ and name(.) != 'qandaentry']"/>
+ <xsl:variable name="label-width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'label-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="table-summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="cellpadding">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'cellpadding'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="cellspacing">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'cellspacing'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="toc">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <xsl:apply-templates select="$title"/>
+ <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
+ <xsl:call-template name="process.qanda.toc"/>
+ </xsl:if>
+ <xsl:apply-templates select="$preamble"/>
+ <table border="0" summary="Q and A Set">
+ <xsl:if test="$table-summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$table-summary"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$cellpadding != ''">
+ <xsl:attribute name="cellpadding">
+ <xsl:value-of select="$cellpadding"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$cellspacing != ''">
+ <xsl:attribute name="cellspacing">
+ <xsl:value-of select="$cellspacing"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <col align="left">
+ <xsl:attribute name="width">
+ <xsl:choose>
+ <xsl:when test="$label-width != ''">
+ <xsl:value-of select="$label-width"/>
+ </xsl:when>
+ <xsl:otherwise>1%</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </col>
+ <tbody>
+ <xsl:apply-templates select="qandaentry|qandadiv"/>
+ </tbody>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo/title|qandaset/title">
+ <xsl:variable name="qalevel">
+ <xsl:call-template name="qanda.section.level"/>
+ </xsl:variable>
+ <xsl:element name="h{string(number($qalevel)+1)}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="qandaset/blockinfo">
+ <!-- what should this template really do? -->
+ <xsl:apply-templates select="legalnotice" mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="qandadiv">
+ <xsl:variable name="preamble" select="*[name(.) != 'title'
+ and name(.) != 'titleabbrev'
+ and name(.) != 'qandadiv'
+ and name(.) != 'qandaentry']"/>
+
+ <xsl:if test="blockinfo/title|title">
+ <tr class="qandadiv">
+ <td align="left" valign="top" colspan="2">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="(blockinfo/title|title)[1]"/>
+ </td>
+ </tr>
+ </xsl:if>
+
+ <xsl:variable name="toc">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'toc'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="(contains($toc.params, 'toc') and $toc != '0') or $toc = '1'">
+ <tr class="toc" colspan="2">
+ <td align="left" valign="top" colspan="2">
+ <xsl:call-template name="process.qanda.toc"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="$preamble">
+ <tr class="toc" colspan="2">
+ <td align="left" valign="top" colspan="2">
+ <xsl:apply-templates select="$preamble"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:apply-templates select="qandadiv|qandaentry"/>
+</xsl:template>
+
+<xsl:template match="qandadiv/blockinfo/title|qandadiv/title">
+ <xsl:variable name="qalevel">
+ <xsl:call-template name="qandadiv.section.level"/>
+ </xsl:variable>
+
+ <xsl:element name="h{string(number($qalevel)+1)}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select=".."/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+ <xsl:if test="$qandadiv.autolabel != 0">
+ <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="qandaentry">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="question">
+ <xsl:variable name="deflabel">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+ <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+ /@defaultlabel"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$qanda.defaultlabel"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <tr class="{name(.)}">
+ <td align="left" valign="top">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select=".."/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+
+ <b>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:if test="$deflabel = 'number' and not(label)">
+ <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+ </xsl:if>
+ </b>
+ </td>
+ <td align="left" valign="top">
+ <xsl:choose>
+ <xsl:when test="$deflabel = 'none' and not(label)">
+ <b><xsl:apply-templates select="*[name(.) != 'label']"/></b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="*[name(.) != 'label']"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="answer">
+ <xsl:variable name="deflabel">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+ <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+ /@defaultlabel"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$qanda.defaultlabel"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <tr class="{name(.)}">
+ <td align="left" valign="top">
+ <xsl:call-template name="anchor"/>
+ <b>
+ <xsl:variable name="answer.label">
+ <xsl:apply-templates select="." mode="label.markup"/>
+ </xsl:variable>
+ <xsl:copy-of select="$answer.label"/>
+ </b>
+ </td>
+ <td align="left" valign="top">
+ <xsl:apply-templates select="*[name(.) != 'label']"/>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="label">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="process.qanda.toc">
+ <dl>
+ <xsl:apply-templates select="qandadiv" mode="qandatoc.mode"/>
+ <xsl:apply-templates select="qandaentry" mode="qandatoc.mode"/>
+ </dl>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="qandatoc.mode">
+ <dt><xsl:apply-templates select="title" mode="qandatoc.mode"/></dt>
+ <dd><xsl:call-template name="process.qanda.toc"/></dd>
+</xsl:template>
+
+<xsl:template match="qandadiv/blockinfo/title|qandadiv/title" mode="qandatoc.mode">
+ <xsl:variable name="qalevel">
+ <xsl:call-template name="qandadiv.section.level"/>
+ </xsl:variable>
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="parent::*"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates select="parent::qandadiv" mode="label.markup"/>
+ <xsl:value-of select="$autotoc.label.separator"/>
+ <xsl:text> </xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="parent::*"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="qandatoc.mode">
+ <xsl:apply-templates select="question" mode="qandatoc.mode"/>
+</xsl:template>
+
+<xsl:template match="question" mode="qandatoc.mode">
+ <xsl:variable name="firstch" select="(*[name(.)!='label'])[1]"/>
+ <xsl:variable name="deflabel">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*[@defaultlabel]">
+ <xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
+ /@defaultlabel"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$qanda.defaultlabel"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <dt>
+ <xsl:apply-templates select="." mode="label.markup"/>
+ <xsl:if test="$deflabel = 'number' and not(label)">
+ <xsl:apply-templates select="." mode="intralabel.punctuation"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:value-of select="$firstch"/>
+ </a>
+ </dt>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="no.wrapper.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/refentry.xsl b/kdoctools/docbook/xsl/html/refentry.xsl
new file mode 100644
index 000000000..2020e1a75
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/refentry.xsl
@@ -0,0 +1,258 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="reference">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:call-template name="reference.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="not(partintro) and contains($toc.params, 'toc')">
+ <xsl:call-template name="division.toc"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="reference" mode="division.number">
+ <xsl:number from="book" count="reference" format="I."/>
+</xsl:template>
+
+<xsl:template match="reference/docinfo"></xsl:template>
+<xsl:template match="reference/referenceinfo"></xsl:template>
+<xsl:template match="reference/title"></xsl:template>
+<xsl:template match="reference/subtitle"></xsl:template>
+<xsl:template match="reference/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="refentry.title">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="refmeta" select="$node//refmeta"/>
+ <xsl:variable name="refentrytitle" select="$refmeta//refentrytitle"/>
+ <xsl:variable name="refnamediv" select="$node//refnamediv"/>
+ <xsl:variable name="refname" select="$refnamediv//refname"/>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="$refentrytitle">
+ <xsl:apply-templates select="$refentrytitle[1]" mode="title"/>
+ </xsl:when>
+ <xsl:when test="$refname">
+ <xsl:apply-templates select="$refname[1]" mode="title"/>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <h1 class="title">
+ <xsl:copy-of select="$title"/>
+ </h1>
+</xsl:template>
+
+<xsl:template match="refentry">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:if test="$refentry.separator != 0 and preceding-sibling::refentry">
+ <div class="refentry.separator">
+ <hr/>
+ </div>
+ </xsl:if>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:call-template name="refentry.titlepage"/>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="refentry/docinfo|refentry/refentryinfo"></xsl:template>
+
+<xsl:template match="refentrytitle|refname" mode="title">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refmeta">
+</xsl:template>
+
+<xsl:template match="manvolnum">
+ <xsl:if test="$refentry.xref.manvolnum != 0">
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="refmiscinfo">
+</xsl:template>
+
+<xsl:template match="refentrytitle">
+ <xsl:call-template name="inline.charseq"/>
+</xsl:template>
+
+<xsl:template match="refnamediv">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:choose>
+ <xsl:when test="$refentry.generate.name != 0">
+ <h2>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RefName'"/>
+ </xsl:call-template>
+ </h2>
+ </xsl:when>
+ <xsl:when test="$refentry.generate.title != 0">
+ <h2>
+ <xsl:choose>
+ <xsl:when test="../refmeta/refentrytitle">
+ <xsl:apply-templates select="../refmeta/refentrytitle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="refname[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </h2>
+ </xsl:when>
+ </xsl:choose>
+ <p>
+ <xsl:apply-templates/>
+ </p>
+ </div>
+</xsl:template>
+
+<xsl:template match="refname">
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::refname">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="refpurpose">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">em-dash</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refdescriptor">
+ <!-- todo: finish this -->
+</xsl:template>
+
+<xsl:template match="refclass">
+ <p>
+ <b>
+ <xsl:if test="@role">
+ <xsl:value-of select="@role"/>
+ <xsl:text>: </xsl:text>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </b>
+ </p>
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <h2>
+ <xsl:choose>
+ <xsl:when test="refsynopsisdiv/title|title">
+ <xsl:apply-templates select="(refsynopsisdiv/title|title)[1]"
+ mode="titlepage.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RefSynopsisDiv'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </h2>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="refsynopsisdivinfo"></xsl:template>
+
+<xsl:template match="refsynopsisdiv/title">
+</xsl:template>
+
+<xsl:template match="refsynopsisdiv/title" mode="titlepage.mode">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="refsection|refsect1|refsect2|refsect3">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="refsection/title">
+ <!-- the ID is output in the block.object call for refsect1 -->
+ <xsl:variable name="level" select="count(ancestor-or-self::refsection)"/>
+ <xsl:variable name="hlevel">
+ <xsl:choose>
+ <xsl:when test="$level &gt; 5">6</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$level+1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="h{$hlevel}">
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="refsect1/title">
+ <!-- the ID is output in the block.object call for refsect1 -->
+ <h2>
+ <xsl:apply-templates/>
+ </h2>
+</xsl:template>
+
+<xsl:template match="refsect2/title">
+ <!-- the ID is output in the block.object call for refsect2 -->
+ <h3>
+ <xsl:apply-templates/>
+ </h3>
+</xsl:template>
+
+<xsl:template match="refsect3/title">
+ <!-- the ID is output in the block.object call for refsect3 -->
+ <h4>
+ <xsl:apply-templates/>
+ </h4>
+</xsl:template>
+
+<xsl:template match="refsect1info"></xsl:template>
+<xsl:template match="refsect2info"></xsl:template>
+<xsl:template match="refsect3info"></xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/sections.xsl b/kdoctools/docbook/xsl/html/sections.xsl
new file mode 100644
index 000000000..5ad567954
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/sections.xsl
@@ -0,0 +1,551 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="section">
+ <xsl:variable name="depth" select="count(ancestor::section)+1"/>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:call-template name="section.titlepage"/>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $depth &lt;= $generate.section.toc.level">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template name="section.title">
+ <!-- the context node should be the title of a section when called -->
+ <xsl:variable name="section" select="(ancestor::section
+ |ancestor::simplesect
+ |ancestor::sect1
+ |ancestor::sect2
+ |ancestor::sect3
+ |ancestor::sect4
+ |ancestor::sect5)[last()]"/>
+
+ <xsl:variable name="renderas">
+ <xsl:choose>
+ <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when>
+ <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when>
+ <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when>
+ <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when>
+ <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when>
+ <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="level">
+ <xsl:choose>
+ <xsl:when test="$renderas != ''">
+ <xsl:value-of select="$renderas"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="section.level">
+ <xsl:with-param name="node" select="$section"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="section.heading">
+ <xsl:with-param name="section" select=".."/>
+ <xsl:with-param name="level" select="$level"/>
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="$section" mode="object.title.markup">
+ <xsl:with-param name="allow-anchors" select="1"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="section/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect1">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $generate.section.toc.level &gt;= 1">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sect1/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect2">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect1'">
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $generate.section.toc.level &gt;= 2">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sect2/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect3">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect1'">
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $generate.section.toc.level &gt;= 3">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sect3/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect4">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect1'">
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect5'">
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $generate.section.toc.level &gt;= 4">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sect4/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="sect5">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect1'">
+ <xsl:call-template name="sect1.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect2'">
+ <xsl:call-template name="sect2.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect3'">
+ <xsl:call-template name="sect3.titlepage"/>
+ </xsl:when>
+ <xsl:when test="@renderas = 'sect4'">
+ <xsl:call-template name="sect4.titlepage"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sect5.titlepage"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="toc.params">
+ <xsl:call-template name="find.path.params">
+ <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="contains($toc.params, 'toc')
+ and $generate.section.toc.level &gt;= 5">
+ <xsl:call-template name="section.toc">
+ <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+ </xsl:call-template>
+ <xsl:call-template name="section.toc.separator"/>
+ </xsl:if>
+ <xsl:apply-templates/>
+ <xsl:call-template name="process.chunk.footnotes"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="sect5/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="simplesect">
+ <div class="{name(.)}">
+ <xsl:call-template name="language.attribute"/>
+ <xsl:call-template name="simplesect.titlepage"/>
+ <xsl:apply-templates/>
+ </div>
+</xsl:template>
+
+<xsl:template match="simplesect/title" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.title"/>
+</xsl:template>
+
+<xsl:template match="section/title"></xsl:template>
+<xsl:template match="section/titleabbrev"></xsl:template>
+<xsl:template match="section/subtitle"></xsl:template>
+<xsl:template match="sectioninfo"></xsl:template>
+
+<xsl:template match="sect1/title"></xsl:template>
+<xsl:template match="sect1/titleabbrev"></xsl:template>
+<xsl:template match="sect1/subtitle"></xsl:template>
+<xsl:template match="sect1info"></xsl:template>
+
+<xsl:template match="sect2/title"></xsl:template>
+<xsl:template match="sect2/subtitle"></xsl:template>
+<xsl:template match="sect2/titleabbrev"></xsl:template>
+<xsl:template match="sect2info"></xsl:template>
+
+<xsl:template match="sect3/title"></xsl:template>
+<xsl:template match="sect3/subtitle"></xsl:template>
+<xsl:template match="sect3/titleabbrev"></xsl:template>
+<xsl:template match="sect3info"></xsl:template>
+
+<xsl:template match="sect4/title"></xsl:template>
+<xsl:template match="sect4/subtitle"></xsl:template>
+<xsl:template match="sect4/titleabbrev"></xsl:template>
+<xsl:template match="sect4info"></xsl:template>
+
+<xsl:template match="sect5/title"></xsl:template>
+<xsl:template match="sect5/subtitle"></xsl:template>
+<xsl:template match="sect5/titleabbrev"></xsl:template>
+<xsl:template match="sect5info"></xsl:template>
+
+<xsl:template match="simplesect/title"></xsl:template>
+<xsl:template match="simplesect/subtitle"></xsl:template>
+<xsl:template match="simplesect/titleabbrev"></xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="section.heading">
+ <xsl:param name="section" select="."/>
+ <xsl:param name="level" select="1"/>
+ <xsl:param name="allow-anchors" select="1"/>
+ <xsl:param name="title"/>
+ <xsl:param name="class" select="'title'"/>
+
+ <xsl:variable name="id">
+ <xsl:choose>
+ <!-- if title is in an *info wrapper, get the grandparent -->
+ <xsl:when test="contains(local-name(..), 'info')">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="../.."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- HTML H level is one higher than section level -->
+ <xsl:variable name="hlevel">
+ <xsl:choose>
+ <!-- highest valid HTML H level is H6; so anything nested deeper
+ than 5 levels down just becomes H6 -->
+ <xsl:when test="$level &gt; 5">6</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$level + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="h{$hlevel}">
+ <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute>
+ <xsl:if test="$css.decoration != '0'">
+ <xsl:if test="$hlevel&lt;3">
+ <xsl:attribute name="style">clear: both</xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="$allow-anchors != 0">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="$section"/>
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:copy-of select="$title"/>
+ </xsl:element>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="bridgehead">
+ <xsl:variable name="container"
+ select="(ancestor::appendix
+ |ancestor::article
+ |ancestor::bibliography
+ |ancestor::chapter
+ |ancestor::glossary
+ |ancestor::glossdiv
+ |ancestor::index
+ |ancestor::partintro
+ |ancestor::preface
+ |ancestor::refsect1
+ |ancestor::refsect2
+ |ancestor::refsect3
+ |ancestor::sect1
+ |ancestor::sect2
+ |ancestor::sect3
+ |ancestor::sect4
+ |ancestor::sect5
+ |ancestor::section
+ |ancestor::setindex
+ |ancestor::simplesect)[last()]"/>
+
+ <xsl:variable name="clevel">
+ <xsl:choose>
+ <xsl:when test="local-name($container) = 'appendix'
+ or local-name($container) = 'chapter'
+ or local-name($container) = 'article'
+ or local-name($container) = 'bibliography'
+ or local-name($container) = 'glossary'
+ or local-name($container) = 'index'
+ or local-name($container) = 'partintro'
+ or local-name($container) = 'preface'
+ or local-name($container) = 'setindex'">1</xsl:when>
+ <xsl:when test="local-name($container) = 'glossdiv'">
+ <xsl:value-of select="count(ancestor::glossdiv)+1"/>
+ </xsl:when>
+ <xsl:when test="local-name($container) = 'sect1'
+ or local-name($container) = 'sect2'
+ or local-name($container) = 'sect3'
+ or local-name($container) = 'sect4'
+ or local-name($container) = 'sect5'
+ or local-name($container) = 'refsect1'
+ or local-name($container) = 'refsect2'
+ or local-name($container) = 'refsect3'
+ or local-name($container) = 'section'
+ or local-name($container) = 'simplesect'">
+ <xsl:variable name="slevel">
+ <xsl:call-template name="section.level">
+ <xsl:with-param name="node" select="$container"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$slevel + 1"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- HTML H level is one higher than section level -->
+ <xsl:variable name="hlevel">
+ <xsl:choose>
+ <xsl:when test="@renderas = 'sect1'">1</xsl:when>
+ <xsl:when test="@renderas = 'sect2'">2</xsl:when>
+ <xsl:when test="@renderas = 'sect3'">3</xsl:when>
+ <xsl:when test="@renderas = 'sect4'">4</xsl:when>
+ <xsl:when test="@renderas = 'sect5'">5</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$clevel + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:element name="h{$hlevel}">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="conditional" select="0"/>
+ </xsl:call-template>
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="section/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="simplesect/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect1/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect2/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect3/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect4/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template match="sect5/subtitle" mode="titlepage.mode" priority="2">
+ <xsl:call-template name="section.subtitle"/>
+</xsl:template>
+
+<xsl:template name="section.subtitle">
+ <!-- the context node should be the subtitle of a section when called -->
+ <xsl:variable name="section" select="(ancestor::section
+ |ancestor::simplesect
+ |ancestor::sect1
+ |ancestor::sect2
+ |ancestor::sect3
+ |ancestor::sect4
+ |ancestor::sect5)[last()]"/>
+
+ <xsl:variable name="level">
+ <xsl:call-template name="section.level">
+ <xsl:with-param name="node" select="$section"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:call-template name="section.heading">
+ <xsl:with-param name="section" select=".."/>
+ <xsl:with-param name="allow-anchors" select="0"/>
+ <!-- subtitle heading level one higher than section level -->
+ <xsl:with-param name="level" select="$level + 1"/>
+ <xsl:with-param name="class" select="'subtitle'"/>
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="$section" mode="object.subtitle.markup">
+ <xsl:with-param name="allow-anchors" select="0"/>
+ </xsl:apply-templates>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/synop.xsl b/kdoctools/docbook/xsl/html/synop.xsl
new file mode 100644
index 000000000..f85b5320c
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/synop.xsl
@@ -0,0 +1,1363 @@
+<?xml version='1.0'?>
+<!DOCTYPE xsl:stylesheet [
+<!ENTITY nbsp "&#160;">
+]>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<!-- synopsis is in verbatim -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="cmdsynopsis">
+ <div class="{name(.)}">
+ <p>
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </p>
+ </div>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command">
+ <br/>
+ <xsl:call-template name="inline.monoseq"/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis/command[1]" priority="2">
+ <xsl:call-template name="inline.monoseq"/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="group|arg" name="group-or-arg">
+ <xsl:variable name="choice" select="@choice"/>
+ <xsl:variable name="rep" select="@rep"/>
+ <xsl:variable name="sepchar">
+ <xsl:choose>
+ <xsl:when test="ancestor-or-self::*/@sepchar">
+ <xsl:value-of select="ancestor-or-self::*/@sepchar"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="position()>1"><xsl:value-of select="$sepchar"/></xsl:if>
+ <xsl:choose>
+ <xsl:when test="$choice='plain'">
+ <xsl:value-of select="$arg.choice.plain.open.str"/>
+ </xsl:when>
+ <xsl:when test="$choice='req'">
+ <xsl:value-of select="$arg.choice.req.open.str"/>
+ </xsl:when>
+ <xsl:when test="$choice='opt'">
+ <xsl:value-of select="$arg.choice.opt.open.str"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$arg.choice.def.open.str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates/>
+ <xsl:choose>
+ <xsl:when test="$rep='repeat'">
+ <xsl:value-of select="$arg.rep.repeat.str"/>
+ </xsl:when>
+ <xsl:when test="$rep='norepeat'">
+ <xsl:value-of select="$arg.rep.norepeat.str"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$arg.rep.def.str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="$choice='plain'">
+ <xsl:value-of select="$arg.choice.plain.close.str"/>
+ </xsl:when>
+ <xsl:when test="$choice='req'">
+ <xsl:value-of select="$arg.choice.req.close.str"/>
+ </xsl:when>
+ <xsl:when test="$choice='opt'">
+ <xsl:value-of select="$arg.choice.opt.close.str"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$arg.choice.def.close.str"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="group/arg">
+ <xsl:variable name="choice" select="@choice"/>
+ <xsl:variable name="rep" select="@rep"/>
+ <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+ <xsl:call-template name="group-or-arg"/>
+</xsl:template>
+
+<xsl:template match="sbr">
+ <br/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="synopfragmentref">
+ <xsl:variable name="target" select="key('id',@linkend)"/>
+ <xsl:variable name="snum">
+ <xsl:apply-templates select="$target" mode="synopfragment.number"/>
+ </xsl:variable>
+ <i>
+ <a href="#{@linkend}">
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$snum"/>
+ <xsl:text>)</xsl:text>
+ </a>
+ <xsl:text>&#160;</xsl:text>
+ <xsl:apply-templates/>
+ </i>
+</xsl:template>
+
+<xsl:template match="synopfragment" mode="synopfragment.number">
+ <xsl:number format="1"/>
+</xsl:template>
+
+<xsl:template match="synopfragment">
+ <xsl:variable name="snum">
+ <xsl:apply-templates select="." mode="synopfragment.number"/>
+ </xsl:variable>
+ <p>
+ <a name="{@id}">
+ <xsl:text>(</xsl:text>
+ <xsl:value-of select="$snum"/>
+ <xsl:text>)</xsl:text>
+ </a>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ </p>
+</xsl:template>
+
+<xsl:template match="funcsynopsis">
+ <xsl:call-template name="informal.object"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsisinfo">
+ <pre class="{name(.)}"><xsl:apply-templates/></pre>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype -->
+<!--
+
+funcprototype ::= (funcdef,
+ (void|varargs|paramdef+))
+
+funcdef ::= (#PCDATA|type|replaceable|function)*
+
+paramdef ::= (#PCDATA|type|replaceable|parameter|funcparams)*
+-->
+
+<xsl:template match="funcprototype">
+ <xsl:variable name="html-style">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="ancestor::funcsynopsis//processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'funcsynopsis-style'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="style">
+ <xsl:choose>
+ <xsl:when test="$html-style != ''">
+ <xsl:value-of select="$html-style"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$funcsynopsis.style"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="tabular-p"
+ select="$funcsynopsis.tabular.threshold &gt; 0
+ and string-length(.) &gt; $funcsynopsis.tabular.threshold"/>
+
+ <xsl:choose>
+ <xsl:when test="$style = 'kr' and $tabular-p">
+ <xsl:apply-templates select="." mode="kr-tabular"/>
+ </xsl:when>
+ <xsl:when test="$style = 'kr'">
+ <xsl:apply-templates select="." mode="kr-nontabular"/>
+ </xsl:when>
+ <xsl:when test="$style = 'ansi' and $tabular-p">
+ <xsl:apply-templates select="." mode="ansi-tabular"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="." mode="ansi-nontabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: kr, non-tabular -->
+
+<xsl:template match="funcprototype" mode="kr-nontabular">
+ <p>
+ <xsl:apply-templates mode="kr-nontabular"/>
+ <xsl:if test="paramdef">
+ <br/>
+ <xsl:apply-templates select="paramdef" mode="kr-funcsynopsis-mode"/>
+ </xsl:if>
+ </p>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="kr-nontabular">
+ <code class="{name(.)}">
+ <xsl:apply-templates mode="kr-nontabular"/>
+ <xsl:text>(</xsl:text>
+ </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="kr-nontabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-nontabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="kr-nontabular">
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varargs" mode="kr-nontabular">
+ <xsl:text>...</xsl:text>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-nontabular">
+ <xsl:apply-templates select="parameter" mode="kr-nontabular"/>
+ <xsl:choose>
+ <xsl:when test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-nontabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <var class="pdparam">
+ <xsl:apply-templates mode="kr-nontabular"/>
+ </var>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-nontabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
+ <xsl:if test="preceding-sibling::paramdef"><br/></xsl:if>
+ <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="type|parameter|funcparams" mode="kr-funcsynopsis-mode">
+ <code>
+ <xsl:apply-templates mode="kr-funcsynopsis-mode"/>
+ </code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: kr, tabular -->
+
+<xsl:template match="funcprototype" mode="kr-tabular">
+ <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"
+ style="padding-bottom: 1em">
+ <tr>
+ <td>
+ <xsl:apply-templates select="funcdef" mode="kr-tabular"/>
+ </td>
+ <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="kr-tabular"/>
+ </tr>
+ <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
+ <tr>
+ <td>&#160;</td>
+ <xsl:apply-templates select="." mode="kr-tabular"/>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <xsl:if test="paramdef">
+ <table border="0" summary="Function argument synopsis"
+ cellspacing="0" cellpadding="0">
+ <xsl:if test="following-sibling::funcprototype">
+ <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="paramdef" mode="kr-tabular-funcsynopsis-mode"/>
+ </table>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="kr-tabular">
+ <code class="{name(.)}">
+ <xsl:apply-templates mode="kr-tabular"/>
+ <xsl:text>(</xsl:text>
+ </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="kr-tabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <b class="fsfunc"><xsl:apply-templates mode="kr-nontabular"/></b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="kr-tabular">
+ <td>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </td>
+ <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="varargs" mode="kr-tabular">
+ <td>
+ <xsl:text>...</xsl:text>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </td>
+ <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-tabular">
+ <td>
+ <xsl:apply-templates select="parameter" mode="kr-tabular"/>
+ <xsl:choose>
+ <xsl:when test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-tabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <var class="pdparam">
+ <xsl:apply-templates mode="kr-tabular"/>
+ </var>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="kr-tabular-funcsynopsis-mode">
+ <tr>
+ <xsl:choose>
+ <xsl:when test="type and funcparams">
+ <td>
+ <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td>
+ <xsl:apply-templates select="type/following-sibling::node()"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ </td>
+ </xsl:when>
+ <xsl:when test="funcparams">
+ <td colspan="2">
+ <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td>
+ <xsl:apply-templates select="parameter/preceding-sibling::node()"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td>
+ <xsl:apply-templates select="parameter"
+ mode="kr-tabular"/>
+ <xsl:apply-templates select="parameter/following-sibling::node()"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:text>;</xsl:text>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ </tr>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="kr-tabular-funcsynopsis-mode">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <var class="pdparam">
+ <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+ </var>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="kr-tabular-funcsynopsis-mode">
+ <code>(</code>
+ <xsl:apply-templates mode="kr-tabular-funcsynopsis-mode"/>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: ansi, non-tabular -->
+
+<xsl:template match="funcprototype" mode="ansi-nontabular">
+ <p>
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ </p>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="ansi-nontabular">
+ <code class="{name(.)}">
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ <xsl:text>(</xsl:text>
+ </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="ansi-nontabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="ansi-nontabular">
+ <code>void)</code>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="varargs" mode="ansi-nontabular">
+ <xsl:text>...</xsl:text>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="ansi-nontabular">
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ <xsl:choose>
+ <xsl:when test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="ansi-nontabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <var class="pdparam">
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ </var>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="ansi-nontabular">
+ <code>(</code>
+ <xsl:apply-templates mode="ansi-nontabular"/>
+ <code>)</code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+<!-- funcprototype: ansi, tabular -->
+
+<xsl:template match="funcprototype" mode="ansi-tabular">
+ <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0">
+ <xsl:if test="following-sibling::funcprototype">
+ <xsl:attribute name="style">padding-bottom: 1em</xsl:attribute>
+ </xsl:if>
+ <tr>
+ <td>
+ <xsl:apply-templates select="funcdef" mode="ansi-tabular"/>
+ </td>
+ <xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/>
+ </tr>
+ <xsl:for-each select="(void|varargs|paramdef)[position() &gt; 1]">
+ <tr>
+ <td>&#160;</td>
+ <xsl:apply-templates select="." mode="ansi-tabular"/>
+ </tr>
+ </xsl:for-each>
+ </table>
+</xsl:template>
+
+<xsl:template match="funcdef" mode="ansi-tabular">
+ <code class="{name(.)}">
+ <xsl:apply-templates mode="ansi-tabular"/>
+ <xsl:text>(</xsl:text>
+ </code>
+</xsl:template>
+
+<xsl:template match="funcdef/function" mode="ansi-tabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <b class="fsfunc"><xsl:apply-templates mode="ansi-nontabular"/></b>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="kr-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="void" mode="ansi-tabular">
+ <td>
+ <code>void)</code>
+ <xsl:text>;</xsl:text>
+ </td>
+ <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="varargs" mode="ansi-tabular">
+ <td>
+ <xsl:text>...</xsl:text>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </td>
+ <td>&#160;</td>
+</xsl:template>
+
+<xsl:template match="paramdef" mode="ansi-tabular">
+ <xsl:choose>
+ <xsl:when test="type and funcparams">
+ <td>
+ <xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td>
+ <xsl:apply-templates select="type/following-sibling::node()"
+ mode="kr-tabular-funcsynopsis-mode"/>
+ </td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td>
+ <xsl:apply-templates select="parameter/preceding-sibling::node()"
+ mode="ansi-tabular"/>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+ <td>
+ <xsl:apply-templates select="parameter"
+ mode="ansi-tabular"/>
+ <xsl:apply-templates select="parameter/following-sibling::node()"
+ mode="ansi-tabular"/>
+ <xsl:choose>
+ <xsl:when test="following-sibling::*">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <code>)</code>
+ <xsl:text>;</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paramdef/parameter" mode="ansi-tabular">
+ <xsl:choose>
+ <xsl:when test="$funcsynopsis.decoration != 0">
+ <var class="pdparam">
+ <xsl:apply-templates mode="ansi-tabular"/>
+ </var>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="ansi-tabular"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="funcparams" mode="ansi-tabular">
+ <code>(</code>
+ <xsl:apply-templates/>
+ <code>)</code>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:variable name="default-classsynopsis-language">java</xsl:variable>
+
+<xsl:template match="classsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |constructorsynopsis
+ |destructorsynopsis">
+ <xsl:param name="language">
+ <xsl:choose>
+ <xsl:when test="@language">
+ <xsl:value-of select="@language"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default-classsynopsis-language"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$language='java'">
+ <xsl:apply-templates select="." mode="java"/>
+ </xsl:when>
+ <xsl:when test="$language='perl'">
+ <xsl:apply-templates select="." mode="perl"/>
+ </xsl:when>
+ <xsl:when test="$language='idl'">
+ <xsl:apply-templates select="." mode="idl"/>
+ </xsl:when>
+ <xsl:when test="$language='cpp'">
+ <xsl:apply-templates select="." mode="cpp"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Unrecognized language on </xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="$language"/>
+ </xsl:message>
+ <xsl:apply-templates select=".">
+ <xsl:with-param name="language"
+ select="$default-classsynopsis-language"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="synop-break">
+ <xsl:if test="parent::classsynopsis
+ or (following-sibling::fieldsynopsis
+ |following-sibling::methodsynopsis
+ |following-sibling::constructorsynopsis
+ |following-sibling::destructorsynopsis)">
+ <br/>
+ </xsl:if>
+</xsl:template>
+
+
+<!-- ===== Java ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="java">
+ <pre class="{name(.)}">
+ <xsl:apply-templates select="ooclass[1]" mode="java"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text> extends</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="java"/>
+ <xsl:if test="oointerface|ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="oointerface">
+ <xsl:text>implements</xsl:text>
+ <xsl:apply-templates select="oointerface" mode="java"/>
+ <xsl:if test="ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="ooexception">
+ <xsl:text>throws</xsl:text>
+ <xsl:apply-templates select="ooexception" mode="java"/>
+ </xsl:if>
+ <xsl:text>&nbsp;{</xsl:text>
+ <br/>
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="java"/>
+ <xsl:text>}</xsl:text>
+ </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="java">
+ <xsl:apply-templates mode="java"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="java">
+ <xsl:choose>
+ <xsl:when test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="java">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="java">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="java">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="java">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="java">
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="java"/>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="java">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="java">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="java">
+ <span class="{name(.)}">
+ <xsl:text>=&nbsp;</xsl:text>
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="void" mode="java">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="java">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="java">
+ <xsl:param name="indent">0</xsl:param>
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>,</xsl:text>
+ <br/>
+ <xsl:if test="$indent &gt; 0">
+ <xsl:call-template name="copy-string">
+ <xsl:with-param name="string">&nbsp;</xsl:with-param>
+ <xsl:with-param name="count" select="$indent + 1"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="java">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="java"/>
+ </span>
+</xsl:template>
+
+<xsl:template mode="java"
+ match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+ <xsl:variable name="modifiers" select="modifier"/>
+ <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+ <xsl:variable name="decl">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="$modifiers" mode="java"/>
+
+ <!-- type -->
+ <xsl:if test="name($notmod[1]) != 'methodname'">
+ <xsl:apply-templates select="$notmod[1]" mode="java"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="methodname" mode="java"/>
+ </xsl:variable>
+
+ <code class="{name(.)}">
+ <xsl:copy-of select="$decl"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="java">
+ <xsl:with-param name="indent" select="string-length($decl)"/>
+ </xsl:apply-templates>
+ <xsl:text>)</xsl:text>
+ <xsl:if test="exceptionname">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+ <xsl:apply-templates select="exceptionname" mode="java"/>
+ </xsl:if>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== C++ ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="cpp">
+ <pre class="{name(.)}">
+ <xsl:apply-templates select="ooclass[1]" mode="cpp"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>: </xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="cpp"/>
+ <xsl:if test="oointerface|ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="oointerface">
+ <xsl:text> implements</xsl:text>
+ <xsl:apply-templates select="oointerface" mode="cpp"/>
+ <xsl:if test="ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="ooexception">
+ <xsl:text> throws</xsl:text>
+ <xsl:apply-templates select="ooexception" mode="cpp"/>
+ </xsl:if>
+ <xsl:text>&nbsp;{</xsl:text>
+ <br/>
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="cpp"/>
+ <xsl:text>}</xsl:text>
+ </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="cpp">
+ <xsl:apply-templates mode="cpp"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="cpp">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="cpp">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="cpp">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="cpp">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="cpp">
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="cpp"/>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:text>=&nbsp;</xsl:text>
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="void" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="cpp">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="cpp">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="cpp"/>
+ </span>
+</xsl:template>
+
+<xsl:template mode="cpp"
+ match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+ <xsl:variable name="modifiers" select="modifier"/>
+ <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="$modifiers" mode="cpp"/>
+
+ <!-- type -->
+ <xsl:if test="name($notmod[1]) != 'methodname'">
+ <xsl:apply-templates select="$notmod[1]" mode="cpp"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="methodname" mode="cpp"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="cpp"/>
+ <xsl:text>)</xsl:text>
+ <xsl:if test="exceptionname">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;throws&nbsp;</xsl:text>
+ <xsl:apply-templates select="exceptionname" mode="cpp"/>
+ </xsl:if>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== IDL ========================================================= -->
+
+<xsl:template match="classsynopsis" mode="idl">
+ <pre class="{name(.)}">
+ <xsl:text>interface </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="idl"/>
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>: </xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="idl"/>
+ <xsl:if test="oointerface|ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="oointerface">
+ <xsl:text> implements</xsl:text>
+ <xsl:apply-templates select="oointerface" mode="idl"/>
+ <xsl:if test="ooexception">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="ooexception">
+ <xsl:text> throws</xsl:text>
+ <xsl:apply-templates select="ooexception" mode="idl"/>
+ </xsl:if>
+ <xsl:text>&nbsp;{</xsl:text>
+ <br/>
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="idl"/>
+ <xsl:text>}</xsl:text>
+ </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="idl">
+ <xsl:apply-templates mode="idl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="idl">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="idl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="idl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="idl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="idl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="idl">
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="idl"/>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="idl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="idl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="idl">
+ <span class="{name(.)}">
+ <xsl:text>=&nbsp;</xsl:text>
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="void" mode="idl">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="idl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="idl">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="idl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="idl"/>
+ </span>
+</xsl:template>
+
+<xsl:template mode="idl"
+ match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+ <xsl:variable name="modifiers" select="modifier"/>
+ <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates select="$modifiers" mode="idl"/>
+
+ <!-- type -->
+ <xsl:if test="name($notmod[1]) != 'methodname'">
+ <xsl:apply-templates select="$notmod[1]" mode="idl"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="methodname" mode="idl"/>
+ <xsl:text>(</xsl:text>
+ <xsl:apply-templates select="methodparam" mode="idl"/>
+ <xsl:text>)</xsl:text>
+ <xsl:if test="exceptionname">
+ <br/>
+ <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;raises(</xsl:text>
+ <xsl:apply-templates select="exceptionname" mode="idl"/>
+ <xsl:text>)</xsl:text>
+ </xsl:if>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ===== Perl ======================================================== -->
+
+<xsl:template match="classsynopsis" mode="perl">
+ <pre class="{name(.)}">
+ <xsl:text>package </xsl:text>
+ <xsl:apply-templates select="ooclass[1]" mode="perl"/>
+ <xsl:text>;</xsl:text>
+ <br/>
+
+ <xsl:if test="ooclass[position() &gt; 1]">
+ <xsl:text>@ISA = (</xsl:text>
+ <xsl:apply-templates select="ooclass[position() &gt; 1]" mode="perl"/>
+ <xsl:text>);</xsl:text>
+ <br/>
+ </xsl:if>
+
+ <xsl:apply-templates select="constructorsynopsis
+ |destructorsynopsis
+ |fieldsynopsis
+ |methodsynopsis
+ |classsynopsisinfo" mode="perl"/>
+ </pre>
+</xsl:template>
+
+<xsl:template match="classsynopsisinfo" mode="perl">
+ <xsl:apply-templates mode="perl"/>
+</xsl:template>
+
+<xsl:template match="ooclass|oointerface|ooexception" mode="perl">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="modifier" mode="perl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="classname" mode="perl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'classname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="interfacename" mode="perl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'interfacename'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="exceptionname" mode="perl">
+ <xsl:if test="name(preceding-sibling::*[1]) = 'exceptionname'">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="fieldsynopsis" mode="perl">
+ <code class="{name(.)}">
+ <xsl:if test="parent::classsynopsis">
+ <xsl:text>&nbsp;&nbsp;</xsl:text>
+ </xsl:if>
+ <xsl:apply-templates mode="perl"/>
+ <xsl:text>;</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<xsl:template match="type" mode="perl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="varname" mode="perl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ <xsl:text>&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="initializer" mode="perl">
+ <span class="{name(.)}">
+ <xsl:text>=&nbsp;</xsl:text>
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="void" mode="perl">
+ <span class="{name(.)}">
+ <xsl:text>void&nbsp;</xsl:text>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodname" mode="perl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="methodparam" mode="perl">
+ <xsl:if test="position() &gt; 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="parameter" mode="perl">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="perl"/>
+ </span>
+</xsl:template>
+
+<xsl:template mode="perl"
+ match="constructorsynopsis|destructorsynopsis|methodsynopsis">
+ <xsl:variable name="modifiers" select="modifier"/>
+ <xsl:variable name="notmod" select="*[name(.) != 'modifier']"/>
+
+ <code class="{name(.)}">
+ <xsl:text>sub </xsl:text>
+
+ <xsl:apply-templates select="methodname" mode="perl"/>
+ <xsl:text> { ... };</xsl:text>
+ </code>
+ <xsl:call-template name="synop-break"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/table.xsl b/kdoctools/docbook/xsl/html/table.xsl
new file mode 100644
index 000000000..ddc0070e7
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/table.xsl
@@ -0,0 +1,1101 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ xmlns:stbl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Table"
+ xmlns:xtbl="com.nwalsh.xalan.Table"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:ptbl="http://nwalsh.com/xslt/ext/xsltproc/python/Table"
+ exclude-result-prefixes="doc stbl xtbl lxslt ptbl"
+ version='1.0'>
+
+<xsl:include href="../common/table.xsl"/>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<lxslt:component prefix="xtbl"
+ functions="adjustColumnWidths"/>
+
+<xsl:template name="empty.table.cell">
+ <xsl:param name="colnum" select="0"/>
+
+ <xsl:variable name="rowsep">
+ <xsl:choose>
+ <!-- If this is the last row, rowsep never applies. -->
+ <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+ or ancestor-or-self::thead/following-sibling::tbody
+ or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+ <xsl:value-of select="0"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="'rowsep'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:choose>
+ <!-- If this is the last column, colsep never applies. -->
+ <xsl:when test="$colnum &gt;= ancestor::tgroup/@cols">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="NOT-AN-ELEMENT-NAME"/>
+ <xsl:with-param name="row" select="ancestor-or-self::row[1]"/>
+ <xsl:with-param name="colnum" select="$colnum"/>
+ <xsl:with-param name="attribute" select="'colsep'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <td class="auto-generated">
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:attribute name="style">
+ <xsl:if test="$colsep &gt; 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$rowsep &gt; 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="border">
+ <xsl:param name="side" select="'left'"/>
+ <xsl:param name="padding" select="0"/>
+ <xsl:param name="style" select="$table.cell.border.style"/>
+ <xsl:param name="color" select="$table.cell.border.color"/>
+ <xsl:param name="thickness" select="$table.cell.border.thickness"/>
+
+ <!-- Note: Some browsers (mozilla) require at least a width and style. -->
+
+ <xsl:choose>
+ <xsl:when test="($thickness != ''
+ and $style != ''
+ and $color != '')
+ or ($thickness != ''
+ and $style != '')
+ or ($thickness != '')">
+ <!-- use the compound property if we can: -->
+ <!-- it saves space and probably works more reliably -->
+ <xsl:text>border-</xsl:text>
+ <xsl:value-of select="$side"/>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="$thickness"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$style"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$color"/>
+ <xsl:text>; </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- we need to specify the styles individually -->
+ <xsl:if test="$thickness != ''">
+ <xsl:text>border-</xsl:text>
+ <xsl:value-of select="$side"/>
+ <xsl:text>-width: </xsl:text>
+ <xsl:value-of select="$thickness"/>
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+
+ <xsl:if test="$style != ''">
+ <xsl:text>border-</xsl:text>
+ <xsl:value-of select="$side"/>
+ <xsl:text>-style: </xsl:text>
+ <xsl:value-of select="$style"/>
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+
+ <xsl:if test="$color != ''">
+ <xsl:text>border-</xsl:text>
+ <xsl:value-of select="$side"/>
+ <xsl:text>-color: </xsl:text>
+ <xsl:value-of select="$color"/>
+ <xsl:text>; </xsl:text>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="tgroup" name="tgroup">
+ <xsl:if test="not(@cols)">
+ <xsl:message terminate="yes">
+ <xsl:text>Error: CALS tables must specify the number of columns.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="cellspacing">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'cellspacing'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="cellpadding">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="processing-instruction('dbhtml')[1]"/>
+ <xsl:with-param name="attribute" select="'cellpadding'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <table>
+ <xsl:choose>
+ <!-- If there's a textobject/phrase for the table summary, use it -->
+ <xsl:when test="../textobject/phrase">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="../textobject/phrase"/>
+ </xsl:attribute>
+ </xsl:when>
+
+ <!-- If there's a <?dbhtml table-summary="foo"?> PI, use it for
+ the HTML table summary attribute -->
+ <xsl:when test="$summary != ''">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="$summary"/>
+ </xsl:attribute>
+ </xsl:when>
+
+ <!-- Otherwise, if there's a title, use that -->
+ <xsl:when test="../title">
+ <xsl:attribute name="summary">
+ <xsl:value-of select="string(../title)"/>
+ </xsl:attribute>
+ </xsl:when>
+
+ <!-- Otherwise, forget the whole idea -->
+ <xsl:otherwise><!-- nevermind --></xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:if test="$cellspacing != '' or $html.cellspacing != ''">
+ <xsl:attribute name="cellspacing">
+ <xsl:choose>
+ <xsl:when test="$cellspacing != ''">
+ <xsl:value-of select="$cellspacing"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$html.cellspacing"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$cellpadding != '' or $html.cellpadding != ''">
+ <xsl:attribute name="cellpadding">
+ <xsl:choose>
+ <xsl:when test="$cellpadding != ''">
+ <xsl:value-of select="$cellpadding"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$html.cellpadding"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="../@pgwide=1 or local-name(.) = 'entrytbl'">
+ <xsl:attribute name="width">100%</xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$table.borders.with.css != 0">
+ <xsl:attribute name="border">0</xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="../@frame='all'">
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'top'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'left'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@frame='topbot'">
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'top'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@frame='top'">
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'top'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@frame='bottom'">
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="../@frame='sides'">
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'left'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ <xsl:with-param name="style" select="$table.frame.border.style"/>
+ <xsl:with-param name="color" select="$table.frame.border.color"/>
+ <xsl:with-param name="thickness" select="$table.frame.border.thickness"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="style">
+ <xsl:text>border-collapse: collapse;</xsl:text>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:when test="../@frame='none' or local-name(.) = 'entrytbl'">
+ <xsl:attribute name="border">0</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="border">1</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:variable name="colgroup">
+ <colgroup>
+ <xsl:call-template name="generate.colgroup">
+ <xsl:with-param name="cols" select="@cols"/>
+ </xsl:call-template>
+ </colgroup>
+ </xsl:variable>
+
+ <xsl:variable name="explicit.table.width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="../processing-instruction('dbhtml')[1]"/>
+ <xsl:with-param name="attribute" select="'table-width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="table.width">
+ <xsl:choose>
+ <xsl:when test="$explicit.table.width != ''">
+ <xsl:value-of select="$explicit.table.width"/>
+ </xsl:when>
+ <xsl:when test="$default.table.width = ''">
+ <xsl:text>100%</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$default.table.width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:if test="$default.table.width != ''
+ or $explicit.table.width != ''">
+ <xsl:attribute name="width">
+ <xsl:choose>
+ <xsl:when test="contains($table.width, '%')">
+ <xsl:value-of select="$table.width"/>
+ </xsl:when>
+ <xsl:when test="$use.extensions != 0
+ and $tablecolumns.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('stbl:convertLength')">
+ <xsl:value-of select="stbl:convertLength($table.width)"/>
+ </xsl:when>
+ <xsl:when test="function-available('xtbl:convertLength')">
+ <xsl:value-of select="xtbl:convertLength($table.width)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No convertLength function available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$table.width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$use.extensions != 0
+ and $tablecolumns.extension != 0">
+ <xsl:choose>
+ <xsl:when test="function-available('stbl:adjustColumnWidths')">
+ <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when>
+ <xsl:when test="function-available('xtbl:adjustColumnWidths')">
+ <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when>
+ <xsl:when test="function-available('ptbl:adjustColumnWidths')">
+ <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No adjustColumnWidths function available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$colgroup"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:apply-templates select="thead"/>
+ <xsl:apply-templates select="tfoot"/>
+ <xsl:apply-templates select="tbody"/>
+
+ <xsl:if test=".//footnote">
+ <tbody class="footnotes">
+ <tr>
+ <td colspan="{@cols}">
+ <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
+ </td>
+ </tr>
+ </tbody>
+ </xsl:if>
+ </table>
+</xsl:template>
+
+<xsl:template match="tgroup/processing-instruction('dbhtml')">
+ <xsl:variable name="summary">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="."/>
+ <xsl:with-param name="attribute" select="'table-summary'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Suppress the table-summary PI -->
+ <xsl:if test="$summary = ''">
+ <xsl:processing-instruction name="dbhtml">
+ <xsl:value-of select="."/>
+ </xsl:processing-instruction>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="colspec"></xsl:template>
+
+<xsl:template match="spanspec"></xsl:template>
+
+<xsl:template match="thead|tfoot">
+ <xsl:element name="{name(.)}">
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="@align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@char">
+ <xsl:attribute name="char">
+ <xsl:value-of select="@char"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@charoff">
+ <xsl:attribute name="charoff">
+ <xsl:value-of select="@charoff"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@valign">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="@valign"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:apply-templates select="row[1]">
+ <xsl:with-param name="spans">
+ <xsl:call-template name="blank.spans">
+ <xsl:with-param name="cols" select="../@cols"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:apply-templates>
+
+ </xsl:element>
+</xsl:template>
+
+<xsl:template match="tbody">
+ <tbody>
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="@align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@char">
+ <xsl:attribute name="char">
+ <xsl:value-of select="@char"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@charoff">
+ <xsl:attribute name="charoff">
+ <xsl:value-of select="@charoff"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@valign">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="@valign"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:apply-templates select="row[1]">
+ <xsl:with-param name="spans">
+ <xsl:call-template name="blank.spans">
+ <xsl:with-param name="cols" select="../@cols"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:apply-templates>
+
+ </tbody>
+</xsl:template>
+
+<xsl:template match="row">
+ <xsl:param name="spans"/>
+
+ <xsl:variable name="row-height">
+ <xsl:if test="processing-instruction('dbhtml')">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'row-height'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="bgcolor">
+ <xsl:if test="processing-instruction('dbhtml')">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'bgcolor'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:variable name="class">
+ <xsl:if test="processing-instruction('dbhtml')">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'class'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <tr>
+ <xsl:call-template name="tr.attributes">
+ <xsl:with-param name="rownum">
+ <xsl:number from="tgroup" count="row"/>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:if test="$row-height != ''">
+ <xsl:attribute name="height">
+ <xsl:value-of select="$row-height"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$bgcolor != ''">
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="$bgcolor"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$class != ''">
+ <xsl:attribute name="class">
+ <xsl:value-of select="$class"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:if test="@rowsep = 1 and following-sibling::row">
+ <xsl:attribute name="style">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:if>
+
+ <xsl:if test="@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="@align"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@char">
+ <xsl:attribute name="char">
+ <xsl:value-of select="@char"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@charoff">
+ <xsl:attribute name="charoff">
+ <xsl:value-of select="@charoff"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@valign">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="@valign"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:apply-templates select="(entry|entrytbl)[1]">
+ <xsl:with-param name="spans" select="$spans"/>
+ </xsl:apply-templates>
+ </tr>
+
+ <xsl:if test="following-sibling::row">
+ <xsl:variable name="nextspans">
+ <xsl:apply-templates select="(entry|entrytbl)[1]" mode="span">
+ <xsl:with-param name="spans" select="$spans"/>
+ </xsl:apply-templates>
+ </xsl:variable>
+
+ <xsl:apply-templates select="following-sibling::row[1]">
+ <xsl:with-param name="spans" select="$nextspans"/>
+ </xsl:apply-templates>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="entry">
+ <xsl:param name="col" select="1"/>
+ <xsl:param name="spans"/>
+
+ <xsl:variable name="cellgi">
+ <xsl:choose>
+ <xsl:when test="ancestor::thead">th</xsl:when>
+ <xsl:when test="ancestor::tfoot">th</xsl:when>
+ <xsl:otherwise>td</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="empty.cell" select="count(node()) = 0"/>
+
+ <xsl:variable name="named.colnum">
+ <xsl:call-template name="entry.colnum"/>
+ </xsl:variable>
+
+ <xsl:variable name="entry.colnum">
+ <xsl:choose>
+ <xsl:when test="$named.colnum &gt; 0">
+ <xsl:value-of select="$named.colnum"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$col"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="entry.colspan">
+ <xsl:choose>
+ <xsl:when test="@spanname or @namest">
+ <xsl:call-template name="calculate.colspan"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="following.spans">
+ <xsl:call-template name="calculate.following.spans">
+ <xsl:with-param name="colspan" select="$entry.colspan"/>
+ <xsl:with-param name="spans" select="$spans"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="rowsep">
+ <xsl:choose>
+ <!-- If this is the last row, rowsep never applies. -->
+ <xsl:when test="ancestor::entrytbl
+ and not (ancestor-or-self::row[1]/following-sibling::row)">
+ <xsl:value-of select="0"/>
+ </xsl:when>
+ <xsl:when test="not(ancestor-or-self::row[1]/following-sibling::row
+ or ancestor-or-self::thead/following-sibling::tbody
+ or ancestor-or-self::tbody/preceding-sibling::tfoot)">
+ <xsl:value-of select="0"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'rowsep'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="colsep">
+ <xsl:choose>
+ <!-- If this is the last column, colsep never applies. -->
+ <xsl:when test="$following.spans = ''">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'colsep'"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="valign">
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'valign'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="align">
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'align'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="char">
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'char'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="charoff">
+ <xsl:call-template name="inherited.table.attribute">
+ <xsl:with-param name="entry" select="."/>
+ <xsl:with-param name="colnum" select="$entry.colnum"/>
+ <xsl:with-param name="attribute" select="'charoff'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+ <xsl:call-template name="entry">
+ <xsl:with-param name="col" select="$col+1"/>
+ <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="$entry.colnum &gt; $col">
+ <xsl:call-template name="empty.table.cell"/>
+ <xsl:call-template name="entry">
+ <xsl:with-param name="col" select="$col+1"/>
+ <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="bgcolor">
+ <xsl:if test="processing-instruction('dbhtml')">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'bgcolor'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:element name="{$cellgi}">
+ <xsl:if test="$bgcolor != ''">
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="$bgcolor"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$entry.propagates.style != 0 and @role">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@role"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$show.revisionflag and @revisionflag">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@revisionflag"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$table.borders.with.css != 0">
+ <xsl:attribute name="style">
+ <xsl:if test="$colsep &gt; 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'right'"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$rowsep &gt; 0">
+ <xsl:call-template name="border">
+ <xsl:with-param name="side" select="'bottom'"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="@morerows &gt; 0">
+ <xsl:attribute name="rowspan">
+ <xsl:value-of select="1+@morerows"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$entry.colspan &gt; 1">
+ <xsl:attribute name="colspan">
+ <xsl:value-of select="$entry.colspan"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$align != ''">
+ <xsl:attribute name="align">
+ <xsl:value-of select="$align"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$valign != ''">
+ <xsl:attribute name="valign">
+ <xsl:value-of select="$valign"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$char != ''">
+ <xsl:attribute name="char">
+ <xsl:value-of select="$char"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$charoff != ''">
+ <xsl:attribute name="charoff">
+ <xsl:value-of select="$charoff"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="not(preceding-sibling::*) and ancestor::row/@id">
+ <xsl:call-template name="anchor">
+ <xsl:with-param name="node" select="ancestor::row[1]"/>
+ </xsl:call-template>
+ </xsl:if>
+
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="$empty.cell">
+ <xsl:text>&#160;</xsl:text>
+ </xsl:when>
+ <xsl:when test="self::entrytbl">
+ <xsl:call-template name="tgroup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
+
+ <xsl:choose>
+ <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+ <xsl:apply-templates select="(following-sibling::entry
+ |following-sibling::entrytbl)[1]">
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
+ <xsl:with-param name="spans" select="$following.spans"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="finaltd">
+ <xsl:with-param name="spans" select="$following.spans"/>
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="entry|entrytbl" name="sentry" mode="span">
+ <xsl:param name="col" select="1"/>
+ <xsl:param name="spans"/>
+
+ <xsl:variable name="entry.colnum">
+ <xsl:call-template name="entry.colnum"/>
+ </xsl:variable>
+
+ <xsl:variable name="entry.colspan">
+ <xsl:choose>
+ <xsl:when test="@spanname or @namest">
+ <xsl:call-template name="calculate.colspan"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="following.spans">
+ <xsl:call-template name="calculate.following.spans">
+ <xsl:with-param name="colspan" select="$entry.colspan"/>
+ <xsl:with-param name="spans" select="$spans"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$spans != '' and not(starts-with($spans,'0:'))">
+ <xsl:value-of select="substring-before($spans,':')-1"/>
+ <xsl:text>:</xsl:text>
+ <xsl:call-template name="sentry">
+ <xsl:with-param name="col" select="$col+1"/>
+ <xsl:with-param name="spans" select="substring-after($spans,':')"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="$entry.colnum &gt; $col">
+ <xsl:text>0:</xsl:text>
+ <xsl:call-template name="sentry">
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
+ <xsl:with-param name="spans" select="$following.spans"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="copy-string">
+ <xsl:with-param name="count" select="$entry.colspan"/>
+ <xsl:with-param name="string">
+ <xsl:choose>
+ <xsl:when test="@morerows">
+ <xsl:value-of select="@morerows"/>
+ </xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>:</xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+
+ <xsl:choose>
+ <xsl:when test="following-sibling::entry|following-sibling::entrytbl">
+ <xsl:apply-templates select="(following-sibling::entry
+ |following-sibling::entrytbl)[1]"
+ mode="span">
+ <xsl:with-param name="col" select="$col+$entry.colspan"/>
+ <xsl:with-param name="spans" select="$following.spans"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="sfinaltd">
+ <xsl:with-param name="spans" select="$following.spans"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.colgroup">
+ <xsl:param name="cols" select="1"/>
+ <xsl:param name="count" select="1"/>
+ <xsl:choose>
+ <xsl:when test="$count &gt; $cols"></xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="generate.col">
+ <xsl:with-param name="countcol" select="$count"/>
+ </xsl:call-template>
+ <xsl:call-template name="generate.colgroup">
+ <xsl:with-param name="cols" select="$cols"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="generate.col">
+ <xsl:param name="countcol">1</xsl:param>
+ <xsl:param name="colspecs" select="./colspec"/>
+ <xsl:param name="count">1</xsl:param>
+ <xsl:param name="colnum">1</xsl:param>
+
+ <xsl:choose>
+ <xsl:when test="$count>count($colspecs)">
+ <col/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+ <xsl:variable name="colspec.colnum">
+ <xsl:choose>
+ <xsl:when test="$colspec/@colnum">
+ <xsl:value-of select="$colspec/@colnum"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$colnum"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$colspec.colnum=$countcol">
+ <col>
+ <xsl:if test="$colspec/@colwidth
+ and $use.extensions != 0
+ and $tablecolumns.extension != 0">
+ <xsl:attribute name="width">
+ <xsl:choose>
+ <xsl:when test="normalize-space($colspec/@colwidth) = '*'">
+ <xsl:value-of select="'1*'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$colspec/@colwidth"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$colspec/@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="$colspec/@align"/>
+ </xsl:attribute>
+ </xsl:when>
+ <!-- Suggested by Pavel ZAMPACH <zampach@nemcb.cz> -->
+ <xsl:when test="$colspecs/ancestor::tgroup/@align">
+ <xsl:attribute name="align">
+ <xsl:value-of select="$colspecs/ancestor::tgroup/@align"/>
+ </xsl:attribute>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:if test="$colspec/@char">
+ <xsl:attribute name="char">
+ <xsl:value-of select="$colspec/@char"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="$colspec/@charoff">
+ <xsl:attribute name="charoff">
+ <xsl:value-of select="$colspec/@charoff"/>
+ </xsl:attribute>
+ </xsl:if>
+ </col>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="generate.col">
+ <xsl:with-param name="countcol" select="$countcol"/>
+ <xsl:with-param name="colspecs" select="$colspecs"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ <xsl:with-param name="colnum">
+ <xsl:choose>
+ <xsl:when test="$colspec/@colnum">
+ <xsl:value-of select="$colspec/@colnum + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$colnum + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="colspec.colwidth">
+ <!-- when this macro is called, the current context must be an entry -->
+ <xsl:param name="colname"></xsl:param>
+ <!-- .. = row, ../.. = thead|tbody, ../../.. = tgroup -->
+ <xsl:param name="colspecs" select="../../../../tgroup/colspec"/>
+ <xsl:param name="count">1</xsl:param>
+ <xsl:choose>
+ <xsl:when test="$count>count($colspecs)"></xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
+ <xsl:choose>
+ <xsl:when test="$colspec/@colname=$colname">
+ <xsl:value-of select="$colspec/@colwidth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="colspec.colwidth">
+ <xsl:with-param name="colname" select="$colname"/>
+ <xsl:with-param name="colspecs" select="$colspecs"/>
+ <xsl:with-param name="count" select="$count+1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ====================================================================== -->
+
+<xsl:template name="tr.attributes">
+ <xsl:param name="row" select="."/>
+ <xsl:param name="rownum" select="0"/>
+
+ <!-- by default, do nothing. But you might want to say:
+
+ <xsl:if test="$rownum mod 2 = 0">
+ <xsl:attribute name="class">oddrow</xsl:attribute>
+ </xsl:if>
+
+ -->
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/kdoctools/docbook/xsl/html/task.xsl b/kdoctools/docbook/xsl/html/task.xsl
new file mode 100644
index 000000000..faa9fedde
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/task.xsl
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="task">
+ <xsl:variable name="param.placement"
+ select="substring-after(normalize-space($formal.title.placement),
+ concat(local-name(.), ' '))"/>
+
+ <xsl:variable name="placement">
+ <xsl:choose>
+ <xsl:when test="contains($param.placement, ' ')">
+ <xsl:value-of select="substring-before($param.placement, ' ')"/>
+ </xsl:when>
+ <xsl:when test="$param.placement = ''">before</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$param.placement"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="preamble"
+ select="*[not(self::title
+ or self::titleabbrev)]"/>
+
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+
+ <xsl:if test="title and $placement = 'before'">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+
+ <xsl:apply-templates select="$preamble"/>
+
+ <xsl:if test="title and $placement != 'before'">
+ <xsl:call-template name="formal.object.heading"/>
+ </xsl:if>
+ </div>
+</xsl:template>
+
+<xsl:template match="task/title">
+ <!-- nop -->
+</xsl:template>
+
+<xsl:template match="tasksummary">
+ <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskprerequisites">
+ <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+<xsl:template match="taskrelated">
+ <xsl:call-template name="semiformal.object"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/titlepage.templates.xml b/kdoctools/docbook/xsl/html/titlepage.templates.xml
new file mode 100644
index 000000000..42c94524a
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/titlepage.templates.xml
@@ -0,0 +1,659 @@
+<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
+ xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="article" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <hr/>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="set" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <hr/>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="book" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <hr/>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="part" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="partintro" t:wrapper="div">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="reference" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <hr/>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refentry" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+<!-- uncomment this if you want refentry titlepages
+ <title t:force="1"
+ t:named-template="refentry.title"
+ param:node="ancestor-or-self::refentry[1]"/>
+-->
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator/>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+ <t:titlepage t:element="dedication" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title
+ t:force="1"
+ t:named-template="component.title"
+ param:node="ancestor-or-self::dedication[1]"/>
+ <subtitle/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="preface" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="appendix" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="section" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect1" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect2" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect3" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect4" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect5" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="simplesect" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title/>
+ <subtitle/>
+ <corpauthor/>
+ <authorgroup/>
+ <author/>
+ <othercredit/>
+ <releaseinfo/>
+ <copyright/>
+ <legalnotice/>
+ <pubdate/>
+ <revision/>
+ <revhistory/>
+ <abstract/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="bibliography" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title
+ t:force="1"
+ t:named-template="component.title"
+ param:node="ancestor-or-self::bibliography[1]"/>
+ <subtitle/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="glossary" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title
+ t:force="1"
+ t:named-template="component.title"
+ param:node="ancestor-or-self::glossary[1]"/>
+ <subtitle/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="index" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title
+ t:force="1"
+ t:named-template="component.title"
+ param:node="ancestor-or-self::index[1]"/>
+ <subtitle/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="setindex" t:wrapper="div" class="titlepage">
+ <t:titlepage-content t:side="recto">
+ <title
+ t:force="1"
+ t:named-template="component.title"
+ param:node="ancestor-or-self::setindex[1]"/>
+ <subtitle/>
+ </t:titlepage-content>
+
+ <t:titlepage-content t:side="verso">
+ </t:titlepage-content>
+
+ <t:titlepage-separator>
+ </t:titlepage-separator>
+
+ <t:titlepage-before t:side="recto">
+ </t:titlepage-before>
+
+ <t:titlepage-before t:side="verso">
+ </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+</t:templates>
diff --git a/kdoctools/docbook/xsl/html/titlepage.templates.xsl b/kdoctools/docbook/xsl/html/titlepage.templates.xsl
new file mode 100644
index 000000000..cd2d15ce2
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/titlepage.templates.xsl
@@ -0,0 +1,3284 @@
+<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<!-- This stylesheet was created by template/titlepage.xsl; do not edit it by hand. -->
+
+<xsl:template name="article.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="articleinfo/title">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
+ </xsl:when>
+ <xsl:when test="artheader/title">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="articleinfo/subtitle">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="artheader/subtitle">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
+ <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="article.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="article.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="article.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="article.titlepage.before.recto"/>
+ <xsl:call-template name="article.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="article.titlepage.before.verso"/>
+ <xsl:call-template name="article.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="article.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="article.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="article.titlepage.recto.style">
+<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="set.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="setinfo/title">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="setinfo/subtitle">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
+ <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="set.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="set.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="set.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="set.titlepage.before.recto"/>
+ <xsl:call-template name="set.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="set.titlepage.before.verso"/>
+ <xsl:call-template name="set.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="set.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="set.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="set.titlepage.recto.style">
+<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="book.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="bookinfo/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="bookinfo/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
+ <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="book.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="book.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="book.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="book.titlepage.before.recto"/>
+ <xsl:call-template name="book.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="book.titlepage.before.verso"/>
+ <xsl:call-template name="book.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="book.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="book.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="book.titlepage.recto.style">
+<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="part.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="partinfo/title">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="partinfo/subtitle">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="part.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="part.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="part.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="part.titlepage.before.recto"/>
+ <xsl:call-template name="part.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="part.titlepage.before.verso"/>
+ <xsl:call-template name="part.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="part.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="part.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="part.titlepage.recto.style">
+<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="partintroinfo/title">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="partintroinfo/subtitle">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="partintro.titlepage">
+ <div>
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="partintro.titlepage.before.recto"/>
+ <xsl:call-template name="partintro.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="partintro.titlepage.before.verso"/>
+ <xsl:call-template name="partintro.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="partintro.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="partintro.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
+<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="referenceinfo/title">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="referenceinfo/subtitle">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.separator"><hr/>
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="reference.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="reference.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="reference.titlepage.before.recto"/>
+ <xsl:call-template name="reference.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="reference.titlepage.before.verso"/>
+ <xsl:call-template name="reference.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="reference.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="reference.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="reference.titlepage.recto.style">
+<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.recto">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="refentry.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="refentry.titlepage.before.recto"/>
+ <xsl:call-template name="refentry.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="refentry.titlepage.before.verso"/>
+ <xsl:call-template name="refentry.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="refentry.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="refentry.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="refentry.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.recto">
+ <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
+</xsl:call-template></div>
+ <xsl:choose>
+ <xsl:when test="dedicationinfo/subtitle">
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="dedication.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="dedication.titlepage.before.recto"/>
+ <xsl:call-template name="dedication.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="dedication.titlepage.before.verso"/>
+ <xsl:call-template name="dedication.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="dedication.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="dedication.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="dedication.titlepage.recto.style">
+<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="prefaceinfo/title">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="prefaceinfo/subtitle">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="preface.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="preface.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="preface.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="preface.titlepage.before.recto"/>
+ <xsl:call-template name="preface.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="preface.titlepage.before.verso"/>
+ <xsl:call-template name="preface.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="preface.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="preface.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="preface.titlepage.recto.style">
+<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="chapterinfo/title">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="chapterinfo/subtitle">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="chapter.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="chapter.titlepage.before.recto"/>
+ <xsl:call-template name="chapter.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="chapter.titlepage.before.verso"/>
+ <xsl:call-template name="chapter.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="chapter.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="chapter.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
+<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="appendixinfo/title">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="appendixinfo/subtitle">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="appendix.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="appendix.titlepage.before.recto"/>
+ <xsl:call-template name="appendix.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="appendix.titlepage.before.verso"/>
+ <xsl:call-template name="appendix.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="appendix.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="appendix.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
+<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="section.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sectioninfo/title">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sectioninfo/subtitle">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
+ <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="section.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="section.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="section.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="section.titlepage.before.recto"/>
+ <xsl:call-template name="section.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="section.titlepage.before.verso"/>
+ <xsl:call-template name="section.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="section.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="section.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="section.titlepage.recto.style">
+<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sect1info/title">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sect1info/subtitle">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
+ <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect1.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="sect1.titlepage.before.recto"/>
+ <xsl:call-template name="sect1.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="sect1.titlepage.before.verso"/>
+ <xsl:call-template name="sect1.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="sect1.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect1.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sect2info/title">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sect2info/subtitle">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
+ <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect2.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="sect2.titlepage.before.recto"/>
+ <xsl:call-template name="sect2.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="sect2.titlepage.before.verso"/>
+ <xsl:call-template name="sect2.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="sect2.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect2.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sect3info/title">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sect3info/subtitle">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
+ <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect3.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="sect3.titlepage.before.recto"/>
+ <xsl:call-template name="sect3.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="sect3.titlepage.before.verso"/>
+ <xsl:call-template name="sect3.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="sect3.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect3.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sect4info/title">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sect4info/subtitle">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
+ <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect4.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="sect4.titlepage.before.recto"/>
+ <xsl:call-template name="sect4.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="sect4.titlepage.before.verso"/>
+ <xsl:call-template name="sect4.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="sect4.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect4.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="sect5info/title">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="sect5info/subtitle">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
+ <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="sect5.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="sect5.titlepage.before.recto"/>
+ <xsl:call-template name="sect5.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="sect5.titlepage.before.verso"/>
+ <xsl:call-template name="sect5.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="sect5.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="sect5.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
+<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.recto">
+ <xsl:choose>
+ <xsl:when test="simplesectinfo/title">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
+ </xsl:when>
+ <xsl:when test="docinfo/title">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
+ </xsl:when>
+ <xsl:when test="info/title">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
+ </xsl:when>
+ <xsl:when test="title">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="simplesectinfo/subtitle">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
+ <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="simplesect.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="simplesect.titlepage.before.recto"/>
+ <xsl:call-template name="simplesect.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="simplesect.titlepage.before.verso"/>
+ <xsl:call-template name="simplesect.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="simplesect.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
+<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.recto">
+ <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
+</xsl:call-template></div>
+ <xsl:choose>
+ <xsl:when test="bibliographyinfo/subtitle">
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="bibliography.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="bibliography.titlepage.before.recto"/>
+ <xsl:call-template name="bibliography.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="bibliography.titlepage.before.verso"/>
+ <xsl:call-template name="bibliography.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="bibliography.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
+<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.recto">
+ <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
+</xsl:call-template></div>
+ <xsl:choose>
+ <xsl:when test="glossaryinfo/subtitle">
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="glossary.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="glossary.titlepage.before.recto"/>
+ <xsl:call-template name="glossary.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="glossary.titlepage.before.verso"/>
+ <xsl:call-template name="glossary.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="glossary.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="glossary.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="glossary.titlepage.recto.style">
+<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="index.titlepage.recto">
+ <div xsl:use-attribute-sets="index.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
+</xsl:call-template></div>
+ <xsl:choose>
+ <xsl:when test="indexinfo/subtitle">
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="index.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="index.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="index.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="index.titlepage.before.recto"/>
+ <xsl:call-template name="index.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="index.titlepage.before.verso"/>
+ <xsl:call-template name="index.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="index.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="index.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="index.titlepage.recto.style">
+<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.recto">
+ <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
+<xsl:call-template name="component.title">
+<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
+</xsl:call-template></div>
+ <xsl:choose>
+ <xsl:when test="setindexinfo/subtitle">
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="docinfo/subtitle">
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
+ </xsl:when>
+ <xsl:when test="info/subtitle">
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
+ </xsl:when>
+ <xsl:when test="subtitle">
+ <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.separator">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.recto">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage.before.verso">
+</xsl:template>
+
+<xsl:template name="setindex.titlepage">
+ <div class="titlepage">
+ <xsl:variable name="recto.content">
+ <xsl:call-template name="setindex.titlepage.before.recto"/>
+ <xsl:call-template name="setindex.titlepage.recto"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($recto.content) != ''">
+ <div><xsl:copy-of select="$recto.content"/></div>
+ </xsl:if>
+ <xsl:variable name="verso.content">
+ <xsl:call-template name="setindex.titlepage.before.verso"/>
+ <xsl:call-template name="setindex.titlepage.verso"/>
+ </xsl:variable>
+ <xsl:if test="normalize-space($verso.content) != ''">
+ <div><xsl:copy-of select="$verso.content"/></div>
+ </xsl:if>
+ <xsl:call-template name="setindex.titlepage.separator"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.recto.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="setindex.titlepage.verso.mode">
+ <!-- if an element isn't found in this mode, -->
+ <!-- try the generic titlepage.mode -->
+ <xsl:apply-templates select="." mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
+<div xsl:use-attribute-sets="setindex.titlepage.recto.style">
+<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
+</div>
+</xsl:template>
+
+</xsl:stylesheet> \ No newline at end of file
diff --git a/kdoctools/docbook/xsl/html/titlepage.xsl b/kdoctools/docbook/xsl/html/titlepage.xsl
new file mode 100644
index 000000000..e9bbd35f2
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/titlepage.xsl
@@ -0,0 +1,807 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:attribute-set name="book.titlepage.recto.style"/>
+<xsl:attribute-set name="book.titlepage.verso.style"/>
+
+<xsl:attribute-set name="article.titlepage.recto.style"/>
+<xsl:attribute-set name="article.titlepage.verso.style"/>
+
+<xsl:attribute-set name="set.titlepage.recto.style"/>
+<xsl:attribute-set name="set.titlepage.verso.style"/>
+
+<xsl:attribute-set name="part.titlepage.recto.style"/>
+<xsl:attribute-set name="part.titlepage.verso.style"/>
+
+<xsl:attribute-set name="partintro.titlepage.recto.style"/>
+<xsl:attribute-set name="partintro.titlepage.verso.style"/>
+
+<xsl:attribute-set name="reference.titlepage.recto.style"/>
+<xsl:attribute-set name="reference.titlepage.verso.style"/>
+
+<xsl:attribute-set name="refentry.titlepage.recto.style"/>
+<xsl:attribute-set name="refentry.titlepage.verso.style"/>
+
+<xsl:attribute-set name="dedication.titlepage.recto.style"/>
+<xsl:attribute-set name="dedication.titlepage.verso.style"/>
+
+<xsl:attribute-set name="preface.titlepage.recto.style"/>
+<xsl:attribute-set name="preface.titlepage.verso.style"/>
+
+<xsl:attribute-set name="chapter.titlepage.recto.style"/>
+<xsl:attribute-set name="chapter.titlepage.verso.style"/>
+
+<xsl:attribute-set name="appendix.titlepage.recto.style"/>
+<xsl:attribute-set name="appendix.titlepage.verso.style"/>
+
+<xsl:attribute-set name="bibliography.titlepage.recto.style"/>
+<xsl:attribute-set name="bibliography.titlepage.verso.style"/>
+
+<xsl:attribute-set name="glossary.titlepage.recto.style"/>
+<xsl:attribute-set name="glossary.titlepage.verso.style"/>
+
+<xsl:attribute-set name="index.titlepage.recto.style"/>
+<xsl:attribute-set name="index.titlepage.verso.style"/>
+
+<xsl:attribute-set name="setindex.titlepage.recto.style"/>
+<xsl:attribute-set name="setindex.titlepage.verso.style"/>
+
+<xsl:attribute-set name="section.titlepage.recto.style"/>
+<xsl:attribute-set name="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect1.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect1.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect2.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect2.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect3.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect3.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect4.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect4.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="sect5.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="sect5.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="simplesect.titlepage.recto.style"
+ use-attribute-sets="section.titlepage.recto.style"/>
+<xsl:attribute-set name="simplesect.titlepage.verso.style"
+ use-attribute-sets="section.titlepage.verso.style"/>
+
+<xsl:attribute-set name="table.of.contents.titlepage.recto.style"/>
+<xsl:attribute-set name="table.of.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.tables.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.tables.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.figures.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.figures.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.equations.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.equations.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.examples.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.examples.contents.titlepage.verso.style"/>
+
+<xsl:attribute-set name="list.of.unknowns.titlepage.recto.style"/>
+<xsl:attribute-set name="list.of.unknowns.contents.titlepage.verso.style"/>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="titlepage.mode">
+ <!-- if an element isn't found in this mode, try the default mode -->
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="abbrev" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="abstract" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="formal.object.heading">
+ <xsl:with-param name="title">
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="abstract/title" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="address" mode="titlepage.mode">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+
+ <xsl:variable name="rtf">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$suppress-numbers = '0'
+ and @linenumbering = 'numbered'
+ and $use.extensions != '0'
+ and $linenumbering.extension != '0'">
+ <div class="{name(.)}">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="content">
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </div>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="content">
+ <xsl:call-template name="make-verbatim">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="affiliation" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="artpagenums" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="author" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+ <xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
+ <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+ <xsl:apply-templates mode="titlepage.mode" select="./email"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="authorblurb|personblurb" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="authorinitials" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="bibliomisc" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="bibliomset" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="collab" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="collabname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confgroup" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="confdates" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confsponsor" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="conftitle" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="confnum" mode="titlepage.mode">
+ <!-- suppress -->
+</xsl:template>
+
+<xsl:template match="contractnum" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contractsponsor" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="contrib" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </span>
+</xsl:template>
+
+<xsl:template match="copyright" mode="titlepage.mode">
+ <p class="{name(.)}">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Copyright'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="dingbat">
+ <xsl:with-param name="dingbat">copyright</xsl:with-param>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="copyright.years">
+ <xsl:with-param name="years" select="year"/>
+ <xsl:with-param name="print.ranges" select="$make.year.ranges"/>
+ <xsl:with-param name="single.year.ranges"
+ select="$make.single.year.ranges"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="holder" mode="titlepage.mode"/>
+ </p>
+</xsl:template>
+
+<xsl:template match="year" mode="titlepage.mode">
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <span class="{@revisionflag}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="holder" mode="titlepage.mode">
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <span class="{@revisionflag}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="position() &lt; last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="corpauthor" mode="titlepage.mode">
+ <h3 class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </h3>
+</xsl:template>
+
+<xsl:template match="corpcredit" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="corpname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="date" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="edition" mode="titlepage.mode">
+ <p class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Edition'"/>
+ </xsl:call-template>
+ </p>
+</xsl:template>
+
+<xsl:template match="editor" mode="titlepage.mode">
+ <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+</xsl:template>
+
+<xsl:template match="editor[position()=1]" mode="titlepage.mode">
+ <h4 class="editedby"><xsl:call-template name="gentext.edited.by"/></h4>
+ <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
+</xsl:template>
+
+<xsl:template match="email" mode="titlepage.mode">
+ <!-- use the normal e-mail handling code -->
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="firstname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="graphic" mode="titlepage.mode">
+ <!-- use the normal graphic handling code -->
+ <xsl:apply-templates select="."/>
+</xsl:template>
+
+<xsl:template match="honorific" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="isbn" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issn" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="biblioid" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="itermset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="invpartnumber" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="issuenum" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="jobtitle" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="keywordset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="legalnotice" mode="titlepage.mode">
+ <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$generate.legalnotice.link != 0">
+ <xsl:variable name="filename">
+ <xsl:call-template name="make-relative-filename">
+ <xsl:with-param name="base.dir" select="$base.dir"/>
+ <xsl:with-param name="base.name" select="concat('ln-',$id,$html.ext)"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="title.markup"/>
+ </xsl:variable>
+
+ <a href="{concat('ln-',$id,$html.ext)}">
+ <xsl:copy-of select="$title"/>
+ </a>
+
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="$filename"/>
+ <xsl:with-param name="quiet" select="$chunk.quietly"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="user.preroot"/>
+ <html>
+ <head>
+ <xsl:call-template name="system.head.content"/>
+ <xsl:call-template name="head.content"/>
+ <xsl:call-template name="user.head.content"/>
+ </head>
+ <body>
+ <xsl:call-template name="body.attributes"/>
+ <div class="{local-name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+ </body>
+ </html>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{local-name(.)}">
+ <a name="{$id}"/>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="legalnotice/title" mode="titlepage.mode">
+ <p class="legalnotice-title"><b><xsl:apply-templates/></b></p>
+</xsl:template>
+
+<xsl:template match="lineage" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="modespec" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="orgdiv" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="orgname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.mode">
+ <xsl:variable name="contrib" select="string(contrib)"/>
+ <xsl:choose>
+ <xsl:when test="contrib">
+ <xsl:if test="not(preceding-sibling::othercredit[string(contrib)=$contrib])">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class" select="name(.)"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates mode="titlepage.mode" select="contrib"/>
+ <xsl:text>: </xsl:text>
+ <xsl:call-template name="person.name"/>
+ <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+ <xsl:apply-templates select="following-sibling::othercredit[string(contrib)=$contrib]" mode="titlepage.othercredits"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class" select="name(.)"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="person.name"/>
+ </xsl:with-param>
+ </xsl:call-template>
+ <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="othercredit" mode="titlepage.othercredits">
+ <xsl:text>, </xsl:text>
+ <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="othername" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pagenums" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="printhistory" mode="titlepage.mode">
+ <div class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </div>
+</xsl:template>
+
+<xsl:template match="productname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="productnumber" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubdate" mode="titlepage.mode">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class" select="name(.)"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="publisher" mode="titlepage.mode">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class" select="name(.)"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="publishername" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="pubsnumber" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="releaseinfo" mode="titlepage.mode">
+ <xsl:call-template name="paragraph">
+ <xsl:with-param name="class" select="name(.)"/>
+ <xsl:with-param name="content">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="revhistory" mode="titlepage.mode">
+ <xsl:variable name="numcols">
+ <xsl:choose>
+ <xsl:when test="//authorinitials">3</xsl:when>
+ <xsl:otherwise>2</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <div class="{name(.)}">
+ <table border="1" width="100%" summary="Revision history">
+ <tr>
+ <th align="left" valign="top" colspan="{$numcols}">
+ <b>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'RevHistory'"/>
+ </xsl:call-template>
+ </b>
+ </th>
+ </tr>
+ <xsl:apply-templates mode="titlepage.mode">
+ <xsl:with-param name="numcols" select="$numcols"/>
+ </xsl:apply-templates>
+ </table>
+ </div>
+</xsl:template>
+
+<xsl:template match="revhistory/revision" mode="titlepage.mode">
+ <xsl:param name="numcols" select="'3'"/>
+ <xsl:variable name="revnumber" select=".//revnumber"/>
+ <xsl:variable name="revdate" select=".//date"/>
+ <xsl:variable name="revauthor" select=".//authorinitials"/>
+ <xsl:variable name="revremark" select=".//revremark|.//revdescription"/>
+ <tr>
+ <td align="left">
+ <xsl:if test="$revnumber">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Revision'"/>
+ </xsl:call-template>
+ <xsl:call-template name="gentext.space"/>
+ <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
+ </xsl:if>
+ </td>
+ <td align="left">
+ <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="$revauthor">
+ <td align="left">
+ <xsl:apply-templates select="$revauthor[1]" mode="titlepage.mode"/>
+ </td>
+ </xsl:when>
+ <xsl:when test="$numcols &gt; 2">
+ <td>&#160;</td>
+ </xsl:when>
+ <xsl:otherwise></xsl:otherwise>
+ </xsl:choose>
+ </tr>
+ <xsl:if test="$revremark">
+ <tr>
+ <td align="left" colspan="{$numcols}">
+ <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
+ </td>
+ </tr>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template match="revision/revnumber" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/date" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/authorinitials" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revremark" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="revision/revdescription" mode="titlepage.mode">
+ <xsl:apply-templates mode="titlepage.mode"/>
+</xsl:template>
+
+<xsl:template match="seriesvolnums" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="shortaffil" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="subjectset" mode="titlepage.mode">
+</xsl:template>
+
+<xsl:template match="subtitle" mode="titlepage.mode">
+ <h2 class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </h2>
+</xsl:template>
+
+<xsl:template match="surname" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<xsl:template match="title" mode="titlepage.mode">
+ <xsl:variable name="id">
+ <xsl:choose>
+ <!-- if title is in an *info wrapper, get the grandparent -->
+ <xsl:when test="contains(local-name(..), 'info')">
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select="../.."/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="object.id">
+ <xsl:with-param name="object" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <h1 class="{name(.)}">
+ <a name="{$id}"/>
+ <xsl:choose>
+ <xsl:when test="$show.revisionflag != 0 and @revisionflag">
+ <span class="{@revisionflag}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates mode="titlepage.mode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </h1>
+</xsl:template>
+
+<xsl:template match="titleabbrev" mode="titlepage.mode">
+ <!-- nop; title abbreviations don't belong on the title page! -->
+</xsl:template>
+
+<xsl:template match="volumenum" mode="titlepage.mode">
+ <span class="{name(.)}">
+ <xsl:apply-templates mode="titlepage.mode"/>
+ <br/>
+ </span>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/toc.xsl b/kdoctools/docbook/xsl/html/toc.xsl
new file mode 100644
index 000000000..f2f6b5117
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/toc.xsl
@@ -0,0 +1,173 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="toc">
+ <xsl:choose>
+ <xsl:when test="*">
+ <xsl:if test="$process.source.toc != 0">
+ <!-- if the toc isn't empty, process it -->
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$process.empty.source.toc != 0">
+ <xsl:choose>
+ <xsl:when test="parent::section
+ or parent::sect1
+ or parent::sect2
+ or parent::sect3
+ or parent::sect4
+ or parent::sect5">
+ <xsl:apply-templates select="parent::*"
+ mode="toc.for.section"/>
+ </xsl:when>
+ <xsl:when test="parent::article">
+ <xsl:apply-templates select="parent::*"
+ mode="toc.for.component"/>
+ </xsl:when>
+ <xsl:when test="parent::book
+ or parent::part">
+ <xsl:apply-templates select="parent::*"
+ mode="toc.for.division"/>
+ </xsl:when>
+ <xsl:when test="parent::set">
+ <xsl:apply-templates select="parent::*"
+ mode="toc.for.set"/>
+ </xsl:when>
+ <!-- there aren't any other contexts that allow toc -->
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>I don't know how to make a TOC in this context!</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocpart|tocchap
+ |toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+ <xsl:variable name="sub-toc">
+ <xsl:if test="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5">
+ <xsl:choose>
+ <xsl:when test="$toc.list.type = 'dl'">
+ <dd>
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+ </xsl:element>
+ </dd>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="{$toc.list.type}">
+ <xsl:apply-templates select="tocchap|toclevel1|toclevel2|toclevel3|toclevel4|toclevel5"/>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:apply-templates select="tocentry[position() != last()]"/>
+
+ <xsl:choose>
+ <xsl:when test="$toc.list.type = 'dl'">
+ <dt>
+ <xsl:apply-templates select="tocentry[position() = last()]"/>
+ </dt>
+ <xsl:copy-of select="$sub-toc"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <li>
+ <xsl:apply-templates select="tocentry[position() = last()]"/>
+ <xsl:copy-of select="$sub-toc"/>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocentry|tocfront|tocback">
+ <xsl:choose>
+ <xsl:when test="$toc.list.type = 'dl'">
+ <dt>
+ <xsl:call-template name="tocentry-content"/>
+ </dt>
+ </xsl:when>
+ <xsl:otherwise>
+ <li>
+ <xsl:call-template name="tocentry-content"/>
+ </li>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="tocentry[position() = last()]" priority="2">
+ <xsl:call-template name="tocentry-content"/>
+</xsl:template>
+
+<xsl:template name="tocentry-content">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:choose>
+ <xsl:when test="@linkend">
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="toc.for.section">
+ <xsl:call-template name="section.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.component">
+ <xsl:call-template name="component.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.section">
+ <xsl:call-template name="section.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.division">
+ <xsl:call-template name="division.toc"/>
+</xsl:template>
+
+<xsl:template match="*" mode="toc.for.set">
+ <xsl:call-template name="set.toc"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="lot|lotentry">
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/verbatim.xsl b/kdoctools/docbook/xsl/html/verbatim.xsl
new file mode 100644
index 000000000..537b5cbc9
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/verbatim.xsl
@@ -0,0 +1,371 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim"
+ xmlns:xverb="com.nwalsh.xalan.Verbatim"
+ xmlns:lxslt="http://xml.apache.org/xslt"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="sverb xverb lxslt exsl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<lxslt:component prefix="xverb"
+ functions="numberLines"/>
+
+<xsl:template match="programlisting|screen|synopsis">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:call-template name="anchor"/>
+
+ <xsl:if test="$shade.verbatim != 0">
+ <xsl:message>
+ <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
+ <xsl:text>Use CSS instead,</xsl:text>
+ </xsl:message>
+ <xsl:message>
+ <xsl:text>for example: pre.</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text> { background-color: #E0E0E0; }</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$suppress-numbers = '0'
+ and @linenumbering = 'numbered'
+ and $use.extensions != '0'
+ and $linenumbering.extension != '0'">
+ <xsl:variable name="rtf">
+ <xsl:apply-templates/>
+ </xsl:variable>
+ <pre class="{name(.)}">
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </pre>
+ </xsl:when>
+ <xsl:otherwise>
+ <pre class="{name(.)}">
+ <xsl:apply-templates/>
+ </pre>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="literallayout">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+
+ <xsl:variable name="rtf">
+ <xsl:apply-templates/>
+ </xsl:variable>
+
+ <xsl:if test="$shade.verbatim != 0 and @class='monospaced'">
+ <xsl:message>
+ <xsl:text>The shade.verbatim parameter is deprecated. </xsl:text>
+ <xsl:text>Use CSS instead,</xsl:text>
+ </xsl:message>
+ <xsl:message>
+ <xsl:text>for example: pre.</xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ <xsl:text> { background-color: #E0E0E0; }</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$suppress-numbers = '0'
+ and @linenumbering = 'numbered'
+ and $use.extensions != '0'
+ and $linenumbering.extension != '0'">
+ <xsl:choose>
+ <xsl:when test="@class='monospaced'">
+ <pre class="{name(.)}">
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </pre>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <p>
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="@class='monospaced'">
+ <pre class="{name(.)}">
+ <xsl:copy-of select="$rtf"/>
+ </pre>
+ </xsl:when>
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <p>
+ <xsl:call-template name="make-verbatim">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="address">
+ <xsl:param name="suppress-numbers" select="'0'"/>
+
+ <xsl:variable name="rtf">
+ <xsl:apply-templates/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$suppress-numbers = '0'
+ and @linenumbering = 'numbered'
+ and $use.extensions != '0'
+ and $linenumbering.extension != '0'">
+ <div class="{name(.)}">
+ <p>
+ <xsl:call-template name="number.rtf.lines">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </p>
+ </div>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <div class="{name(.)}">
+ <p>
+ <xsl:call-template name="make-verbatim">
+ <xsl:with-param name="rtf" select="$rtf"/>
+ </xsl:call-template>
+ </p>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="number.rtf.lines">
+ <xsl:param name="rtf" select="''"/>
+ <xsl:param name="pi.context" select="."/>
+
+ <!-- Save the global values -->
+ <xsl:variable name="global.linenumbering.everyNth"
+ select="$linenumbering.everyNth"/>
+
+ <xsl:variable name="global.linenumbering.separator"
+ select="$linenumbering.separator"/>
+
+ <xsl:variable name="global.linenumbering.width"
+ select="$linenumbering.width"/>
+
+ <!-- Extract the <?dbhtml linenumbering.*?> PI values -->
+ <xsl:variable name="pi.linenumbering.everyNth">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="$pi.context/processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'linenumbering.everyNth'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="pi.linenumbering.separator">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="$pi.context/processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'linenumbering.separator'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="pi.linenumbering.width">
+ <xsl:call-template name="dbhtml-attribute">
+ <xsl:with-param name="pis"
+ select="$pi.context/processing-instruction('dbhtml')"/>
+ <xsl:with-param name="attribute" select="'linenumbering.width'"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <!-- Construct the 'in-context' values -->
+ <xsl:variable name="linenumbering.everyNth">
+ <xsl:choose>
+ <xsl:when test="$pi.linenumbering.everyNth != ''">
+ <xsl:value-of select="$pi.linenumbering.everyNth"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$global.linenumbering.everyNth"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="linenumbering.separator">
+ <xsl:choose>
+ <xsl:when test="$pi.linenumbering.separator != ''">
+ <xsl:value-of select="$pi.linenumbering.separator"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$global.linenumbering.separator"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="linenumbering.width">
+ <xsl:choose>
+ <xsl:when test="$pi.linenumbering.width != ''">
+ <xsl:value-of select="$pi.linenumbering.width"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$global.linenumbering.width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="linenumbering.startinglinenumber">
+ <xsl:choose>
+ <xsl:when test="@startinglinenumber">
+ <xsl:value-of select="@startinglinenumber"/>
+ </xsl:when>
+ <xsl:when test="@continuation='continues'">
+ <xsl:variable name="lastLine">
+ <xsl:choose>
+ <xsl:when test="self::programlisting">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings"
+ select="preceding::programlisting[@linenumbering='numbered']"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="self::screen">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings"
+ select="preceding::screen[@linenumbering='numbered']"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="self::literallayout">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings"
+ select="preceding::literallayout[@linenumbering='numbered']"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="self::address">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings"
+ select="preceding::address[@linenumbering='numbered']"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="self::synopsis">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings"
+ select="preceding::synopsis[@linenumbering='numbered']"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Unexpected verbatim environment: </xsl:text>
+ <xsl:value-of select="local-name(.)"/>
+ </xsl:message>
+ <xsl:value-of select="0"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:value-of select="$lastLine + 1"/>
+ </xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('sverb:numberLines')">
+ <xsl:copy-of select="sverb:numberLines($rtf)"/>
+ </xsl:when>
+ <xsl:when test="function-available('xverb:numberLines')">
+ <xsl:copy-of select="xverb:numberLines($rtf)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">
+ <xsl:text>No numberLines function available.</xsl:text>
+ </xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="make-verbatim">
+ <xsl:param name="rtf"/>
+
+ <!-- I want to make this RTF verbatim. There are two possibilities: either
+ I have access to the exsl:node-set extension function and I can "do it right"
+ or I have to rely on CSS. -->
+
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:apply-templates select="exsl:node-set($rtf)" mode="make.verbatim.mode"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <span style="white-space: pre;">
+ <xsl:copy-of select="$rtf"/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ======================================================================== -->
+
+<xsl:template name="lastLineNumber">
+ <xsl:param name="listings"/>
+ <xsl:param name="number" select="0"/>
+
+ <xsl:variable name="lines">
+ <xsl:call-template name="countLines">
+ <xsl:with-param name="listing" select="string($listings[1])"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="not($listings)">
+ <xsl:value-of select="$number"/>
+ </xsl:when>
+ <xsl:when test="$listings[1]/@startinglinenumber">
+ <xsl:value-of select="$number + $listings[1]/@startinglinenumber + $lines - 1"/>
+ </xsl:when>
+ <xsl:when test="$listings[1]/@continuation='continues'">
+ <xsl:call-template name="lastLineNumber">
+ <xsl:with-param name="listings" select="listings[position() &gt; 1]"/>
+ <xsl:with-param name="number" select="$number + $lines"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$lines"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="countLines">
+ <xsl:param name="listing"/>
+ <xsl:param name="count" select="1"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($listing, '&#10;')">
+ <xsl:call-template name="countLines">
+ <xsl:with-param name="listing" select="substring-after($listing, '&#10;')"/>
+ <xsl:with-param name="count" select="$count + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$count"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/kdoctools/docbook/xsl/html/xref.xsl b/kdoctools/docbook/xsl/html/xref.xsl
new file mode 100644
index 000000000..3c4e5539d
--- /dev/null
+++ b/kdoctools/docbook/xsl/html/xref.xsl
@@ -0,0 +1,1160 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks"
+ xmlns:exsl="http://exslt.org/common"
+ exclude-result-prefixes="suwl exsl"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+
+ This file is part of the XSL DocBook Stylesheet distribution.
+ See ../README or http://nwalsh.com/docbook/xsl/ for copyright
+ and other information.
+
+ ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<xsl:template match="anchor">
+ <xsl:call-template name="anchor"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="xref" name="xref">
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+ <xsl:variable name="refelem" select="local-name($target)"/>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+
+ <xsl:call-template name="anchor"/>
+
+ <xsl:choose>
+ <xsl:when test="count($target) = 0">
+ <xsl:message>
+ <xsl:text>XRef to nonexistent id: </xsl:text>
+ <xsl:value-of select="@linkend"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:when>
+
+ <xsl:when test="@endterm">
+ <xsl:variable name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="etargets" select="key('id',@endterm)"/>
+ <xsl:variable name="etarget" select="$etargets[1]"/>
+ <xsl:choose>
+ <xsl:when test="count($etarget) = 0">
+ <xsl:message>
+ <xsl:value-of select="count($etargets)"/>
+ <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+ <xsl:value-of select="@endterm"/>
+ </xsl:message>
+ <a href="{$href}">
+ <xsl:text>???</xsl:text>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="{$href}">
+ <xsl:apply-templates select="$etarget" mode="endterm"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:when test="$target/@xreflabel">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:call-template name="xref.xreflabel">
+ <xsl:with-param name="target" select="$target"/>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:variable name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:apply-templates select="$target" mode="xref-to-prefix"/>
+
+ <a href="{$href}">
+ <xsl:if test="$target/title or $target/*/title">
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$target" mode="xref-title"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates select="$target" mode="xref-to">
+ <xsl:with-param name="referrer" select="."/>
+ <xsl:with-param name="xrefstyle">
+ <xsl:choose>
+ <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
+ <xsl:value-of select="@role"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@xrefstyle"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:apply-templates>
+ </a>
+
+ <xsl:apply-templates select="$target" mode="xref-to-suffix"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="endterm">
+ <!-- Process the children of the endterm element -->
+ <xsl:variable name="endterm">
+ <xsl:apply-templates select="child::node()"/>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('exsl:node-set')">
+ <xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$endterm"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="remove-ids">
+ <xsl:choose>
+ <!-- handle html or xhtml -->
+ <xsl:when test="local-name(.) = 'a'
+ and (namespace-uri(.) = ''
+ or namespace-uri(.) = 'http://www.w3.org/1999/xhtml')">
+ <xsl:choose>
+ <xsl:when test="(@name and count(@*) = 1)
+ or (@id and count(@*) = 1)
+ or (@id and @name and count(@*) = 2)">
+ <xsl:message>suppress anchor</xsl:message>
+ <!-- suppress the whole thing -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:choose>
+ <xsl:when test="name(.) != 'name' and name(.) != 'id'">
+ <xsl:copy/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:copy>
+ <xsl:apply-templates mode="remove-ids"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:for-each select="@*">
+ <xsl:choose>
+ <xsl:when test="name(.) != 'id'">
+ <xsl:copy/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates mode="remove-ids"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="xref-to-prefix"/>
+<xsl:template match="*" mode="xref-to-suffix"/>
+
+<xsl:template match="*" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+
+ <xsl:if test="$verbose">
+ <xsl:message>
+ <xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
+ <xsl:value-of select="name(.)"/>
+ <xsl:text>", ("</xsl:text>
+ <xsl:value-of select="@id"/>
+ <xsl:text>")</xsl:text>
+ </xsl:message>
+ </xsl:if>
+ <xsl:text>???</xsl:text>
+</xsl:template>
+
+<xsl:template match="title" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <!-- if you xref to a title, xref to the parent... -->
+ <xsl:choose>
+ <!-- FIXME: how reliable is this? -->
+ <xsl:when test="contains(local-name(parent::*), 'info')">
+ <xsl:apply-templates select="parent::*[2]" mode="xref-to">
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="parent::*" mode="xref-to">
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ </xsl:apply-templates>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="abstract|authorblurb|personblurb|bibliodiv|bibliomset
+ |biblioset|blockquote|calloutlist|caution|colophon
+ |constraintdef|formalpara|glossdiv|important|indexdiv
+ |itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
+ |msgrel|msgset|msgsub|note|orderedlist|partintro
+ |productionset|qandadiv|refsynopsisdiv|segmentedlist
+ |set|setindex|sidebar|tip|toc|variablelist|warning"
+ mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+
+ <!-- catch-all for things with (possibly optional) titles -->
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:call-template name="person.name"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:call-template name="person.name.list"/>
+</xsl:template>
+
+<xsl:template match="figure|example|table|equation" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="procedure" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis" mode="xref-to">
+ <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsis" mode="xref-to">
+ <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+</xsl:template>
+
+<xsl:template match="dedication|preface|chapter|appendix|article" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="bibliography" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-prefix">
+ <xsl:text>[</xsl:text>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to-suffix">
+ <xsl:text>]</xsl:text>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <!-- handles both biblioentry and bibliomixed -->
+ <xsl:choose>
+ <xsl:when test="string(.) = ''">
+ <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
+ <xsl:variable name="id" select="@id"/>
+ <xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
+ <xsl:choose>
+ <xsl:when test="$entry">
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+ level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name($entry/*[1]) = 'abbrev'">
+ <xsl:apply-templates select="$entry/*[1]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>No bibliography entry: </xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text> found in </xsl:text>
+ <xsl:value-of select="$bibliography.collection"/>
+ </xsl:message>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$bibliography.numbered != 0">
+ <xsl:number from="bibliography" count="biblioentry|bibliomixed"
+ level="any" format="1"/>
+ </xsl:when>
+ <xsl:when test="local-name(*[1]) = 'abbrev'">
+ <xsl:apply-templates select="*[1]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossary" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="glossentry" mode="xref-to">
+ <xsl:choose>
+ <xsl:when test="$glossentry.show.acronym = 'primary'">
+ <xsl:choose>
+ <xsl:when test="acronym|abbrev">
+ <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="xref-to">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="index" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="listitem" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="section|simplesect
+ |sect1|sect2|sect3|sect4|sect5
+ |refsect1|refsect2|refsect3|refsection" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+ <!-- FIXME: What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="bridgehead" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+ <!-- FIXME: What about "in Chapter X"? -->
+</xsl:template>
+
+<xsl:template match="qandaset" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandadiv" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="verbose" select="1"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ <xsl:with-param name="verbose" select="$verbose"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="qandaentry" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="question[1]" mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="question|answer" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="part|reference" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refentry" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:choose>
+ <xsl:when test="refmeta/refentrytitle">
+ <xsl:apply-templates select="refmeta/refentrytitle"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="refnamediv/refname[1]"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="refmeta/manvolnum"/>
+</xsl:template>
+
+<xsl:template match="refnamediv" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="refname[1]" mode="xref-to">
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="refname" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates mode="xref-to"/>
+</xsl:template>
+
+<xsl:template match="step" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Step'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="." mode="number"/>
+</xsl:template>
+
+<xsl:template match="varlistentry" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="term[1]" mode="xref-to">
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="varlistentry/term" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <!-- to avoid the comma that will be generated if there are several terms -->
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="co" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="callout-bug"/>
+</xsl:template>
+
+<xsl:template match="book" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="para" mode="xref-to">
+ <xsl:param name="referrer"/>
+ <xsl:param name="xrefstyle"/>
+
+ <xsl:variable name="context" select="(ancestor::simplesect
+ |ancestor::section
+ |ancestor::sect1
+ |ancestor::sect2
+ |ancestor::sect3
+ |ancestor::sect4
+ |ancestor::sect5
+ |ancestor::refsection
+ |ancestor::refsect1
+ |ancestor::refsect2
+ |ancestor::refsect3
+ |ancestor::chapter
+ |ancestor::appendix
+ |ancestor::preface
+ |ancestor::partintro
+ |ancestor::dedication
+ |ancestor::colophon
+ |ancestor::bibliography
+ |ancestor::index
+ |ancestor::glossary
+ |ancestor::glossentry
+ |ancestor::listitem
+ |ancestor::varlistentry)[last()]"/>
+
+ <xsl:apply-templates select="$context" mode="xref-to"/>
+<!--
+ <xsl:apply-templates select="." mode="object.xref.markup">
+ <xsl:with-param name="purpose" select="'xref'"/>
+ <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
+ <xsl:with-param name="referrer" select="$referrer"/>
+ </xsl:apply-templates>
+-->
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="author" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:call-template name="person.name"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="authorgroup" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:call-template name="person.name.list"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="cmdsynopsis" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="(.//command)[1]" mode="xref"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="funcsynopsis" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="(.//function)[1]" mode="xref"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="biblioentry|bibliomixed" mode="xref-title">
+ <!-- handles both biblioentry and bibliomixed -->
+ <xsl:variable name="title">
+ <xsl:text>[</xsl:text>
+ <xsl:choose>
+ <xsl:when test="local-name(*[1]) = 'abbrev'">
+ <xsl:apply-templates select="*[1]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@id"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>]</xsl:text>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<xsl:template match="step" mode="xref-title">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'Step'"/>
+ </xsl:call-template>
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates select="." mode="number"/>
+</xsl:template>
+
+<xsl:template match="co" mode="xref-title">
+ <xsl:variable name="title">
+ <xsl:apply-templates select="." mode="callout-bug"/>
+ </xsl:variable>
+
+ <xsl:value-of select="$title"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="link" name="link">
+ <xsl:param name="a.target"/>
+
+ <xsl:variable name="targets" select="key('id',@linkend)"/>
+ <xsl:variable name="target" select="$targets[1]"/>
+
+ <xsl:call-template name="check.id.unique">
+ <xsl:with-param name="linkend" select="@linkend"/>
+ </xsl:call-template>
+
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$a.target">
+ <xsl:attribute name="target"><xsl:value-of select="$a.target"/></xsl:attribute>
+ </xsl:if>
+
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <!-- FIXME: is there a better way to tell what elements have a title? -->
+ <xsl:if test="local-name($target) = 'book'
+ or local-name($target) = 'set'
+ or local-name($target) = 'chapter'
+ or local-name($target) = 'preface'
+ or local-name($target) = 'appendix'
+ or local-name($target) = 'bibliography'
+ or local-name($target) = 'glossary'
+ or local-name($target) = 'index'
+ or local-name($target) = 'part'
+ or local-name($target) = 'refentry'
+ or local-name($target) = 'reference'
+ or local-name($target) = 'example'
+ or local-name($target) = 'equation'
+ or local-name($target) = 'table'
+ or local-name($target) = 'figure'
+ or local-name($target) = 'simplesect'
+ or starts-with(local-name($target),'sect')
+ or starts-with(local-name($target),'refsect')">
+ <xsl:attribute name="title">
+ <xsl:apply-templates select="$target"
+ mode="object.title.markup.textonly"/>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="count(child::node()) &gt; 0">
+ <!-- If it has content, use it -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- else look for an endterm -->
+ <xsl:choose>
+ <xsl:when test="@endterm">
+ <xsl:variable name="etargets" select="key('id',@endterm)"/>
+ <xsl:variable name="etarget" select="$etargets[1]"/>
+ <xsl:choose>
+ <xsl:when test="count($etarget) = 0">
+ <xsl:message>
+ <xsl:value-of select="count($etargets)"/>
+ <xsl:text>Endterm points to nonexistent ID: </xsl:text>
+ <xsl:value-of select="@endterm"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="$etarget" mode="endterm"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Link element has no content and no Endterm. </xsl:text>
+ <xsl:text>Nothing to show in the link to </xsl:text>
+ <xsl:value-of select="$target"/>
+ </xsl:message>
+ <xsl:text>???</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+</xsl:template>
+
+<xsl:template match="ulink" name="ulink">
+ <xsl:variable name="link">
+ <a>
+ <xsl:if test="@id">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@id"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
+ <xsl:if test="$ulink.target != ''">
+ <xsl:attribute name="target">
+ <xsl:value-of select="$ulink.target"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="count(child::node())=0">
+ <xsl:value-of select="@url"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </a>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="function-available('suwl:unwrapLinks')">
+ <xsl:copy-of select="suwl:unwrapLinks($link)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$link"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="olink" name="olink">
+
+ <xsl:call-template name="anchor"/>
+
+ <xsl:variable name="localinfo" select="@localinfo"/>
+
+ <xsl:choose>
+ <!-- olinks resolved by stylesheet and target database -->
+ <xsl:when test="@targetdoc or @targetptr" >
+ <xsl:variable name="targetdoc.att" select="@targetdoc"/>
+ <xsl:variable name="targetptr.att" select="@targetptr"/>
+
+ <xsl:variable name="olink.lang">
+ <xsl:call-template name="l10n.language">
+ <xsl:with-param name="xref-context" select="true()"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="target.database.filename">
+ <xsl:call-template name="select.target.database">
+ <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
+ <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
+ <xsl:with-param name="olink.lang" select="$olink.lang"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="target.database"
+ select="document($target.database.filename,/)"/>
+
+ <xsl:if test="$olink.debug != 0">
+ <xsl:message>
+ <xsl:text>Olink debug: root element of target.database '</xsl:text>
+ <xsl:value-of select="$target.database.filename"/>
+ <xsl:text>' is '</xsl:text>
+ <xsl:value-of select="local-name($target.database/*[1])"/>
+ <xsl:text>'.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="olink.key">
+ <xsl:call-template name="select.olink.key">
+ <xsl:with-param name="targetdoc.att" select="$targetdoc.att"/>
+ <xsl:with-param name="targetptr.att" select="$targetptr.att"/>
+ <xsl:with-param name="olink.lang" select="$olink.lang"/>
+ <xsl:with-param name="target.database" select="$target.database"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:if test="string-length($olink.key) = 0">
+ <xsl:message>
+ <xsl:text>Error: unresolved olink: </xsl:text>
+ <xsl:text>targetdoc/targetptr = '</xsl:text>
+ <xsl:value-of select="$targetdoc.att"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="$targetptr.att"/>
+ <xsl:text>'.</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
+ <xsl:variable name="href">
+ <xsl:call-template name="make.olink.href">
+ <xsl:with-param name="olink.key" select="$olink.key"/>
+ <xsl:with-param name="target.database" select="$target.database"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="hottext">
+ <xsl:call-template name="olink.hottext">
+ <xsl:with-param name="target.database" select="$target.database"/>
+ <xsl:with-param name="olink.key" select="$olink.key"/>
+ <xsl:with-param name="olink.lang" select="$olink.lang"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="olink.docname.citation">
+ <xsl:call-template name="olink.document.citation">
+ <xsl:with-param name="olink.key" select="$olink.key"/>
+ <xsl:with-param name="target.database" select="$target.database"/>
+ <xsl:with-param name="olink.lang" select="$olink.lang"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="olink.page.citation">
+ <xsl:call-template name="olink.page.citation">
+ <xsl:with-param name="olink.key" select="$olink.key"/>
+ <xsl:with-param name="target.database" select="$target.database"/>
+ <xsl:with-param name="olink.lang" select="$olink.lang"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$href != ''">
+ <a href="{$href}" class="olink">
+ <xsl:copy-of select="$hottext"/>
+ </a>
+ <xsl:copy-of select="$olink.page.citation"/>
+ <xsl:copy-of select="$olink.docname.citation"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="olink"><xsl:copy-of select="$hottext"/></span>
+ <xsl:copy-of select="$olink.page.citation"/>
+ <xsl:copy-of select="$olink.docname.citation"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:when>
+
+ <!-- Or use old olink mechanism -->
+ <xsl:otherwise>
+ <xsl:variable name="href">
+ <xsl:choose>
+ <xsl:when test="@linkmode">
+ <!-- use the linkmode to get the base URI, use localinfo as fragid -->
+ <xsl:variable name="modespec" select="key('id',@linkmode)"/>
+ <xsl:if test="count($modespec) != 1
+ or local-name($modespec) != 'modespec'">
+ <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message>
+ </xsl:if>
+ <xsl:value-of select="$modespec"/>
+ <xsl:if test="@localinfo">
+ <xsl:text>#</xsl:text>
+ <xsl:value-of select="@localinfo"/>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="@type = 'href'">
+ <xsl:call-template name="olink.outline">
+ <xsl:with-param name="outline.base.uri"
+ select="unparsed-entity-uri(@targetdocent)"/>
+ <xsl:with-param name="localinfo" select="@localinfo"/>
+ <xsl:with-param name="return" select="'href'"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$olink.resolver"/>
+ <xsl:text>?</xsl:text>
+ <xsl:value-of select="$olink.sysid"/>
+ <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/>
+ <!-- XSL gives no access to the public identifier (grumble...) -->
+ <xsl:if test="@localinfo">
+ <xsl:text>&amp;</xsl:text>
+ <xsl:value-of select="$olink.fragid"/>
+ <xsl:value-of select="@localinfo"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$href != ''">
+ <a href="{$href}" class="olink">
+ <xsl:call-template name="olink.hottext"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="olink.hottext"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="pagenumber.markup">
+ <!-- no-op in HTML -->
+</xsl:template>
+
+
+<xsl:template name="olink.outline">
+ <xsl:param name="outline.base.uri"/>
+ <xsl:param name="localinfo"/>
+ <xsl:param name="return" select="href"/>
+
+ <xsl:variable name="outline-file"
+ select="concat($outline.base.uri,
+ $olink.outline.ext)"/>
+
+ <xsl:variable name="outline" select="document($outline-file,.)/div"/>
+
+ <xsl:variable name="node-href">
+ <xsl:choose>
+ <xsl:when test="$localinfo != ''">
+ <xsl:variable name="node" select="$outline//*[@id=$localinfo]"/>
+ <xsl:value-of select="$node/@href"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$outline/@href"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="node-xref">
+ <xsl:choose>
+ <xsl:when test="$localinfo != ''">
+ <xsl:variable name="node" select="$outline//*[@id=$localinfo]"/>
+ <xsl:copy-of select="$node/xref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$outline/xref"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="$return = 'href'">
+ <xsl:value-of select="$node-href"/>
+ </xsl:when>
+ <xsl:when test="$return = 'xref'">
+ <xsl:value-of select="$node-xref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$node-xref"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template name="xref.xreflabel">
+ <!-- called to process an xreflabel...you might use this to make -->
+ <!-- xreflabels come out in the right font for different targets, -->
+ <!-- for example. -->
+ <xsl:param name="target" select="."/>
+ <xsl:value-of select="$target/@xreflabel"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="title" mode="xref">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="command" mode="xref">
+ <xsl:call-template name="inline.boldseq"/>
+</xsl:template>
+
+<xsl:template match="function" mode="xref">
+ <xsl:call-template name="inline.monoseq"/>
+</xsl:template>
+
+<!-- ==================================================================== -->
+
+<xsl:template match="*" mode="insert.title.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="title"/>
+
+ <xsl:choose>
+ <!-- FIXME: what about the case where titleabbrev is inside the info? -->
+ <xsl:when test="$purpose = 'xref' and titleabbrev">
+ <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$title"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="chapter|appendix" mode="insert.title.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="title"/>
+
+ <xsl:choose>
+ <xsl:when test="$purpose = 'xref'">
+ <i>
+ <xsl:copy-of select="$title"/>
+ </i>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$title"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.subtitle.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="subtitle"/>
+
+ <xsl:copy-of select="$subtitle"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.label.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="label"/>
+
+ <xsl:copy-of select="$label"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.pagenumber.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="pagenumber"/>
+
+ <xsl:copy-of select="$pagenumber"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.direction.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="direction"/>
+
+ <xsl:copy-of select="$direction"/>
+</xsl:template>
+
+<xsl:template match="*" mode="insert.olink.docname.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="docname"/>
+
+ <span class="olinkdocname">
+ <xsl:copy-of select="$docname"/>
+ </span>
+
+</xsl:template>
+
+</xsl:stylesheet>