User: tobias  
  Date: 01/02/10 16:05:14

  Added:       src/docs/docbook/fo ChangeLog LostLog admon.xsl autotoc.xsl
                        biblio.xsl block.xsl callout.xsl component.xsl
                        division.xsl docbook.xsl fo.xsl footnote.xsl
                        formal.xsl glossary.xsl graphics.xsl index.xsl
                        info.xsl inline.xsl keywords.xsl lists.xsl math.xsl
                        param.xsl qandaset.xsl refentry.xsl sections.xsl
                        synop.xsl table.xsl titlepage.templates.xml
                        titlepage.templates.xsl titlepage.xsl toc.xsl
                        verbatim.xsl xref.xsl
  Log:
  initial checkin, good HTML and basic pdf support
  
  Revision  Changes    Path
  1.1                  manual/src/docs/docbook/fo/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  2000-11-17  Norman Walsh  <[EMAIL PROTECTED]>
  
        * block.xsl: Added template for highlights
  
        * callout.xsl, lists.xsl: Callout list marks didn't work
  
  2000-11-15  Norman Walsh  <[EMAIL PROTECTED]>
  
        * callout.xsl, graphics.xsl, param.xsl, verbatim.xsl: Saxon extension support 
for callouts and numbered verbatim environments
  
        * docbook.xsl: Support for rootid
  
  2000-11-09  Norman Walsh  <[EMAIL PROTECTED]>
  
        * glossary.xsl, index.xsl, refentry.xsl: Fixed flow-name (xsl-region-after not 
xsl-after)
  
  2000-10-29  Norman Walsh  <[EMAIL PROTECTED]>
  
        * xref.xsl: fo:simple-link is now called fo:basic-link
  
  2000-10-26  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl: Use attribute sets; fixed missing ID
  
        * block.xsl: Use attribute sets
  
        * component.xsl, division.xsl, footnote.xsl, glossary.xsl, index.xsl, 
sections.xsl: 
        Fix footnotes; use fo:footnote FO
  
        * docbook.xsl: Turn off indenting; it breaks verbatim blocks
  
        * fo.xsl, inline.xsl: Support trade, registered, and service dingbats
  
        * formal.xsl: Fix keep error, use attribute sets
  
        * graphics.xsl: Support the @format='linespecific' enbedding hack
  
        * param.xsl: Added several attribute sets; removed check.idref (always check 
IDREFs)
  
        * titlepage.xsl: Provide fo:table-column info for revision history tables
  
        * verbatim.xsl: Fix white-space property name (white-space-collapse)
  
        * xref.xsl: Update xref support
  
  2000-10-20  Norman Walsh  <[EMAIL PROTECTED]>
  
        * Makefile: Use titlepage.xsl to generate title pages
  
        * titlepage.templates.xsl: Generated from new titlepage.xsl
  
  2000-10-19  Norman Walsh  <[EMAIL PROTECTED]>
  
        * Makefile, component.xsl, docbook.xsl, sections.xsl, titlepage.article.xsl, 
titlepage.book.xsl, titlepage.part.xsl, titlepage.reference.xsl, 
titlepage.section.xsl, titlepage.set.xsl, titlepage.templates.xml, 
titlepage.templates.xsl: 
        Converted to template-driven title pages
  
        * lists.xsl, synop.xsl: Added explicit priority to avoid conflict
  
        * param.xsl, table.xsl: Documentation changes
  
  2000-10-17  Norman Walsh  <[EMAIL PROTECTED]>
  
        * param.xsl: Updated documentation; changed variables to parameters
  
        * table.xsl: Updated documentation
  
  2000-10-16  Norman Walsh  <[EMAIL PROTECTED]>
  
        * param.xsl, table.xsl: Added doc:reference
  
  2000-10-14  Norman Walsh  <[EMAIL PROTECTED]>
  
        * graphics.xsl: Rewrote support for graphics
  
  2000-10-12  Norman Walsh  <[EMAIL PROTECTED]>
  
        * sections.xsl: Generate correct page-sequences for documents that begin at 
the section or sect1 level
  
  2000-10-09  Norman Walsh  <[EMAIL PROTECTED]>
  
        * LostLog, admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, 
component.xsl, division.xsl, docbook.xsl, fo.xsl, footnote.xsl, formal.xsl, 
glossary.xsl, graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, 
math.xsl, param.xsl, qandaset.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, 
titlepage.article.xsl, titlepage.book.xsl, titlepage.part.xsl, 
titlepage.reference.xsl, titlepage.section.xsl, titlepage.set.xsl, titlepage.xsl, 
toc.xsl, verbatim.xsl, xref.xsl: 
        New file.
  
        * component.xsl: Add ID on appendix block
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/LostLog
  
  Index: LostLog
  ===================================================================
  2000-08-29  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl, component.xsl, division.xsl: Fixed erroneous flow-name
  
        * graphics.xsl: Fixed fo:external-graphic so that it's a proper URI
  
  2000-08-08  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl, component.xsl, docbook.xsl, titlepage.article.xsl: 
        Support articleinfo
  
        * xref.xsl: Support new ulink semantics; an empty ulink prints the URL as its 
content
  
  2000-07-21  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl: Support bibliographyinfo; improve handling of copyright holders
  
        * glossary.xsl: Support glossaryinfo
  
        * lists.xsl: Support list titles
  
        * table.xsl: Support tfoot
  
        * titlepage.xsl: Improve handling of copyright holders
  
  2000-07-12  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl, component.xsl, division.xsl, glossary.xsl, index.xsl, 
refentry.xsl: 
        Fixed typo in text-align-last; added required master-name to page-sequences
  
        * docbook.xsl: Added page-sequence-master for alternating left and right pages
  
        * formal.xsl: Added keep-together for formal objects and tables
  
  2000-06-25  Norman Walsh  <[EMAIL PROTECTED]>
  
        * docbook.xsl: Fixed typo in text-align; added (empty) qandaset.xsl
  
        * param.xsl: Added qanda params
  
        * table.xsl: Fixed bugs in colwidth calculations
  
        * xref.xsl: Added title.xref and number.xref
  
  2000-06-22  Norman Walsh  <[EMAIL PROTECTED]>
  
        * qandaset.xsl: New file.
  
  2000-05-07  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, component.xsl, division.xsl, 
docbook.xsl, footnote.xsl, glossary.xsl, graphics.xsl, index.xsl, info.xsl, 
inline.xsl, lists.xsl, param.xsl, refentry.xsl, synop.xsl, titlepage.xsl, 
verbatim.xsl, xref.xsl: 
        Fixed XSL 1.0 PR FOs
  
        * table.xsl: Fixed column-numbering on fo:table-columns
  
  2000-04-19  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl: Add ID to biblioentries
  
        * docbook.xsl: Add indent=yes to xsl:output
  
        * formal.xsl: Better support for proportional column widths
  
        * lists.xsl: Fixed simplelist formatting
  
        * param.xsl: Added check.idref
  
        * table.xsl: Added comment
  
        * xref.xsl: Improved XREF handling
  
  2000-03-23  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, inline.xsl, param.xsl, refentry.xsl, synop.xsl: 
        Change boolean stylesheet variables to use 0/1 instead of true()/false() to 
avoid representation issues when setting them from the command line
  
        * inline.xsl: Added support for some DocBook 4.0 elements
  
        * table.xsl: Support proportional column widths as per the last call draft of 
XSL
  
        * verbatim.xsl: Fix typo in white-space-treatement proprety name
  
  2000-01-27  Norman Walsh  <[EMAIL PROTECTED]>
  
        * autotoc.xsl, division.xsl: Attempts to add auto TOC. Unfinished.
  
        * docbook.xsl: Only request a single font (work around annoying bug in FOP). 
I'll go back to the list when FOP fixes this or there are other commonly used FO 
formatters that don't have this bug.
  
        * glossary.xsl: Added vars to control glossary list term width; fiddled with 
spacing
  
        * lists.xsl: Remove pre-space before first para in a listitem
  
        * param.xsl: Added section.label.includes.component.label
  
        * titlepage.xsl: Fiddled with vertical spacing
  
  1999-12-28  Norman Walsh  <[EMAIL PROTECTED]>
  
        * component.xsl, division.xsl, formal.xsl, sections.xsl, xref.xsl: 
        Updated to use new title generation code from common.xsl
  
        * inline.xsl: Fixed name/match typo
  
        * param.xsl: Added part.autolabel and preface.autolabel
  
  1999-11-03  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, 
division.xsl, docbook.xsl, fo.xsl, footnote.xsl, formal.xsl, glossary.xsl, 
graphics.xsl, index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, 
param.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.article.xsl, 
titlepage.book.xsl, titlepage.part.xsl, titlepage.reference.xsl, 
titlepage.section.xsl, titlepage.set.xsl, titlepage.xsl, toc.xsl, verbatim.xsl, 
xref.xsl: 
        Added version number to xsl:stylesheet
  
  1999-11-02  Norman Walsh  <[EMAIL PROTECTED]>
  
        * component.xsl: Support label attribute on components
  
        * lists.xsl: More simplelist fixes
  
        * param.xsl: Renamed refentry.function parameter to refentry.xref.manvolnum; 
added chapter.autolabel
  
        * refentry.xsl: Renamed refentry.function parameter to refentry.xref.manvolnum
  
        * sections.xsl: Support label attribute on sections
  
  1999-10-22  Norman Walsh  <[EMAIL PROTECTED]>
  
        * lists.xsl: Updated support for simplelist
  
  1999-10-20  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, 
division.xsl, fo.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, index.xsl, 
info.xsl, inline.xsl, keywords.xsl, lists.xsl, math.xsl, param.xsl, refentry.xsl, 
sections.xsl, synop.xsl, table.xsl, titlepage.article.xsl, titlepage.book.xsl, 
titlepage.part.xsl, titlepage.reference.xsl, titlepage.section.xsl, titlepage.set.xsl, 
titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: 
        Update URI in all the included modules
  
  1999-10-18  Norman Walsh  <[EMAIL PROTECTED]>
  
        * docbook.xsl: Added xsl:output, fixed URI for PR
  
  1999-08-19  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl: Added indents around admonitions
  
        * docbook.xsl: Removed default-space attribute
  
        * graphics.xsl: Added primitive support for graphics
  
        * lists.xsl: Fixed name/select bug on with-param, added vspace around lists
  
        * verbatim.xsl: Added vspace
  
        * xref.xsl: Added URL in [] after a ulink
  
  1999-08-11  Norman Walsh  <[EMAIL PROTECTED]>
  
        * docbook.xsl: Fixed buggy attr. value
  
        * graphics.xsl: Attempt to support graphics
  
        * lists.xsl: Add space before lists, fix buggy call-templates, fix buggy 
name/match missmatch
  
        * titlepage.book.xsl, titlepage.part.xsl, titlepage.reference.xsl, 
titlepage.set.xsl: 
        Removed unused named templates
  
        * titlepage.xsl: Fix buggy table construction in revhistory
  
        * verbatim.xsl: Added proper font, alignment, whitespace, and wrap treatment 
for verbatim env.
  
  1999-07-31  Norman Walsh  <[EMAIL PROTECTED]>
  
        * division.xsl, glossary.xsl, lists.xsl: Fix serious bug in select expression
  
  1999-07-27  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, component.xsl, division.xsl, 
docbook.xsl, fo.xsl, footnote.xsl, formal.xsl, glossary.xsl, index.xsl, inline.xsl, 
lists.xsl, param.xsl, refentry.xsl, sections.xsl, synop.xsl, table.xsl, 
titlepage.article.xsl, titlepage.book.xsl, titlepage.part.xsl, 
titlepage.reference.xsl, titlepage.section.xsl, titlepage.set.xsl, titlepage.xsl, 
xref.xsl: 
        Updated to July spec. Misc. other changes to get more IDs in the FO tree for 
linking
  
  1999-07-18  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, inline.xsl, titlepage.xsl: Mode bugs
  
  1999-07-16  Norman Walsh  <[EMAIL PROTECTED]>
  
        * biblio.xsl, formal.xsl, glossary.xsl, table.xsl, titlepage.xsl: 
        A few more fixes
  
  1999-07-15  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, 
division.xsl, docbook.xsl, footnote.xsl, formal.xsl, glossary.xsl, graphics.xsl, 
index.xsl, info.xsl, inline.xsl, keywords.xsl, lists.xsl, param.xsl, refentry.xsl, 
sections.xsl, synop.xsl, table.xsl, titlepage.article.xsl, titlepage.book.xsl, 
titlepage.part.xsl, titlepage.reference.xsl, titlepage.section.xsl, titlepage.set.xsl, 
titlepage.xsl, toc.xsl, verbatim.xsl, xref.xsl: 
        Extensive changes to actually produce FOs instead of HTML!
  
  1999-07-14  Norman Walsh  <[EMAIL PROTECTED]>
  
        * fo.xsl, html.xsl: Renamed
  
  1999-07-02  Norman Walsh  <[EMAIL PROTECTED]>
  
        * admon.xsl, autotoc.xsl, biblio.xsl, block.xsl, callout.xsl, component.xsl, 
division.xsl, docbook.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, refentry.xsl, sections.xsl, synop.xsl, table.xsl, titlepage.article.xsl, 
titlepage.book.xsl, titlepage.part.xsl, titlepage.reference.xsl, 
titlepage.section.xsl, titlepage.set.xsl, titlepage.xsl, verbatim.xsl, xref.xsl: 
        New file.
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/admon.xsl
  
  Index: admon.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: admon.xsl,v 1.1 2001/02/11 00:05:05 tobias Exp $
       ********************************************************************
  
       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="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.width">
    <xsl:param name="node" select="."/>
    <xsl:text>25</xsl:text>
  </xsl:template>
  
  <xsl:template name="admon.graphic">
    <xsl:param name="node" select="."/>
    <xsl:value-of select="$admon.graphics.path"/>
    <xsl:choose>
      <xsl:when test="name($node)='note'">note.gif</xsl:when>
      <xsl:when test="name($node)='warning'">warning.gif</xsl:when>
      <xsl:when test="name($node)='caution'">caution.gif</xsl:when>
      <xsl:when test="name($node)='tip'">tip.gif</xsl:when>
      <xsl:when test="name($node)='important'">important.gif</xsl:when>
      <xsl:otherwise>note.gif</xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template name="graphical.admonition">
    <fo:block>
      <fo:table>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell number-rows-spanned="2">
              <fo:block>IMAGE</fo:block>
            </fo:table-cell>
            <fo:table-cell>
              <xsl:choose>
                <xsl:when test="./title">
                  <xsl:apply-templates select="./title" 
                                       mode="admonition.title.mode"/>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:call-template name="gentext.element.name"/>
                </xsl:otherwise>
              </xsl:choose>
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
            <fo:table-cell number-columns-spanned="2">
              <xsl:apply-templates/>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:block>
  </xsl:template>
  
  <xsl:template name="nongraphical.admonition">
    <fo:block space-before.minimum="0.8em"
              space-before.optimum="1em"
              space-before.maximum="1.2em"
              start-indent="0.25in"
              end-indent="0.25in">
      <xsl:choose>
        <xsl:when test="./title">
          <xsl:apply-templates select="./title" mode="admonition.title.mode"/>
        </xsl:when>
        <xsl:otherwise>
          <fo:block font-size="14pt" font-weight="bold" keep-with-next='true'>
            <xsl:call-template name="gentext.element.name"/>
          </fo:block>
        </xsl:otherwise>
      </xsl:choose>
  
      <xsl:apply-templates/>
    </fo:block>
  </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:template match="title" mode="admonition.title.mode">
    <fo:block font-size="14pt" font-weight="bold" keep-with-next='true'>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/autotoc.xsl
  
  Index: autotoc.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: autotoc.xsl,v 1.1 2001/02/11 00:05:05 tobias Exp $
       ********************************************************************
  
       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="division.toc">
  </xsl:template>
  
  <xsl:template name="x-division.toc">
    <xsl:variable name="nodes" 
select="part|reference|preface|chapter|appendix|bibliography|glossary|index"/>
    <xsl:if test="$nodes">
      <fo:block>
         <fo:block>
           <fo:inline font-weight="bold">
             <xsl:call-template name="gentext.element.name">
               <xsl:with-param name="element.name">TableofContents</xsl:with-param>
             </xsl:call-template>
           </fo:inline>
         </fo:block>
         <xsl:apply-templates select="$nodes" mode="toc"/>
      </fo:block>
    </xsl:if>
  </xsl:template>
  
  <xsl:template name="component.toc">
  </xsl:template>
  
  <xsl:template name="x-component.toc">
    <xsl:variable name="nodes" select="section|sect1"/>
    <xsl:if test="$nodes">
      <fo:block>
        <fo:block>
           <fo:inline font-weight="bold">
             <xsl:call-template name="gentext.element.name">
               <xsl:with-param name="element.name">TableofContents</xsl:with-param>
             </xsl:call-template>
           </fo:inline>
         </fo:block>
        <xsl:apply-templates select="$nodes" mode="toc"/>
      </fo:block>
    </xsl:if>
  </xsl:template>
  
  <xsl:template match="part|reference|preface|chapter|appendix"
                mode="toc">
    <fo:block>
      <xsl:apply-templates select="." mode="label.content"/>
      <xsl:apply-templates select="." mode="title.content"/>
      <xsl:if test="section|sect1">
        <fo:block start-indent="3em">
          <xsl:apply-templates select="section|sect1"
                               mode="toc"/>
        </fo:block>
      </xsl:if>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="section|sect1|sect2|sect3|sect4|sect5"
                mode="toc">
    <fo:block>
      <xsl:apply-templates select="." mode="label.content"/>
      <xsl:apply-templates select="." mode="title.content"/>
      <xsl:if test="section|sect2|sect3|sect4|sect5">
        <fo:block start-indent="3em">
          <xsl:apply-templates select="section|sect2|sect3|sect4|sect5"
                               mode="toc"/>
        </fo:block>
      </xsl:if>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="bibliography|glossary|index"
                mode="toc">
    <fo:block>
      <xsl:apply-templates select="." mode="label.content"/>
      <xsl:apply-templates select="." mode="title.content"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="toc">
    <xsl:apply-templates/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/biblio.xsl
  
  Index: biblio.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: biblio.xsl,v 1.1 2001/02/11 00:05:06 tobias Exp $
       ********************************************************************
  
       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">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <xsl:call-template name="component.separator"/>
    <fo:block id="{$id}">
      <xsl:choose>
        <xsl:when test="./title">
          <xsl:apply-templates select="./title" mode="component.title.mode"/>
        </xsl:when>
        <xsl:otherwise>
          <fo:block xsl:use-attribute-sets="component.title.attrs">
            <xsl:call-template name="gentext.element.name"/>
          </fo:block>
        </xsl:otherwise>
      </xsl:choose>
  
      <xsl:if test="./subtitle">
        <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
      </xsl:if>
  
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="book/bibliography">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:choose>
          <xsl:when test="./title">
            <xsl:apply-templates select="./title" mode="component.title.mode"/>
          </xsl:when>
          <xsl:otherwise>
            <fo:block xsl:use-attribute-sets="component.title.attrs">
              <xsl:call-template name="gentext.element.name"/>
            </fo:block>
          </xsl:otherwise>
        </xsl:choose>
    
        <xsl:if test="./subtitle">
          <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
        </xsl:if>
    
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </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="bibliography/title" mode="component.title.mode">
    <fo:block xsl:use-attribute-sets="component.title.attrs">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="bibliography/subtitle" mode="component.title.mode">
    <fo:block font-size="18pt" font-weight="bold" font-style="italic">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="bibliodiv">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="bibliodiv/title">
    <xsl:variable name="id">
      <xsl:call-template name="object.id">
        <xsl:with-param name="object" select=".."/>
      </xsl:call-template>
    </xsl:variable>
    <fo:block font-size="16pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="biblioentry">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:block id="{$id}">
      <xsl:apply-templates mode="bibliography.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="bibliomixed">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:block>
  </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">
    <fo:inline>
      <xsl:text>[</xsl:text>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:text>] </xsl:text>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="abstract" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="address" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="affiliation" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="artheader|articleinfo" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="artpagenums" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="author" mode="bibliography.mode">
    <fo:inline>
      <xsl:call-template name="person.name"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorblurb" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorgroup" mode="bibliography.mode">
    <fo:inline>
      <xsl:call-template name="person.name.list"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorinitials" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="bibliomisc" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="bibliomset" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <!-- ================================================== -->
  
  <xsl:template match="biblioset" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
    </fo:inline>
  </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'">
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">ldquo</xsl:with-param>
        </xsl:call-template>
        <xsl:apply-templates/>
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">rdquo</xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <fo:inline font-style="italic">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:value-of select="$biblioentry.item.separator"/>
  </xsl:template>
  
  <!-- ================================================== -->
  
  <xsl:template match="bookbiblio" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="citetitle" mode="bibliography.mode">
    <fo:inline>
      <fo:inline font-style="italic">
        <xsl:apply-templates mode="bibliography.mode"/>
      </fo:inline>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="collab" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="confgroup" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractnum" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractsponsor" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contrib" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <!-- ================================================== -->
  
  <xsl:template match="copyright" mode="bibliography.mode">
    <fo:inline>
      <xsl:call-template name="gentext.element.name"/>
      <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"/>
    </fo:inline>
  </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">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="corpname" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="date" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="edition" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="editor" mode="bibliography.mode">
    <fo:inline>
      <xsl:call-template name="person.name"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="firstname" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="honorific" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="indexterm" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="invpartnumber" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="isbn" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issn" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issuenum" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="lineage" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="orgname" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="othercredit" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="othername" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pagenums" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="printhistory" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="productname" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="productnumber" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubdate" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="publisher" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="publishername" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubsnumber" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="releaseinfo" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="revhistory" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="seriesinfo" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="seriesvolnums" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="subtitle" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="surname" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="title" mode="bibliography.mode">
    <fo:inline>
      <fo:inline font-style="italic">
        <xsl:apply-templates mode="bibliography.mode"/>
      </fo:inline>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="titleabbrev" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="volumenum" mode="bibliography.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliography.mode"/>
      <xsl:value-of select="$biblioentry.item.separator"/>
    </fo:inline>
  </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">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="abstract" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="address" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="affiliation" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="artpagenums" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="author" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorblurb" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorgroup" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="authorinitials" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="bibliomisc" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <!-- ================================================== -->
  
  <xsl:template match="bibliomset" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </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'">
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">ldquo</xsl:with-param>
        </xsl:call-template>
        <xsl:apply-templates/>
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">rdquo</xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <fo:inline font-style="italic">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- ================================================== -->
  
  <xsl:template match="biblioset" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="citetitle" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="collab" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="confgroup" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractnum" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractsponsor" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contrib" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="copyright" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="corpauthor" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="corpname" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="date" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="edition" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="editor" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="firstname" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="honorific" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="indexterm" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="invpartnumber" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="isbn" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issn" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issuenum" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="lineage" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="orgname" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="othercredit" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="othername" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pagenums" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="printhistory" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="productname" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="productnumber" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubdate" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="publisher" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="publishername" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubsnumber" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="releaseinfo" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="revhistory" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="seriesvolnums" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="subtitle" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="surname" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="title" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="titleabbrev" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="volumenum" mode="bibliomixed.mode">
    <fo:inline>
      <xsl:apply-templates mode="bibliomixed.mode"/>
    </fo:inline>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/block.xsl
  
  Index: block.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: block.xsl,v 1.1 2001/02/11 00:05:06 tobias Exp $
       ********************************************************************
  
       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="block.object">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="para">
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="simpara">
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="formalpara">
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="formalpara/title">
    <fo:inline font-weight="bold">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="formalpara/para">
    <xsl:apply-templates/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="blockquote">
    <fo:block start-indent="1in" end-indent="1in">
      <xsl:call-template name="semiformal.object"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="epigraph">
    <fo:block>
      <xsl:apply-templates select="para"/>
      <fo:inline>
        <xsl:text>--</xsl:text>
        <xsl:apply-templates select="attribution"/>
      </fo:inline>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="attribution">
    <fo:inline><xsl:apply-templates/></fo:inline>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="sidebar">
    <fo:block>
      <xsl:if test="./title">
        <fo:block font-weight="bold">
          <xsl:apply-templates select="./title" mode="sidebar.title.mode"/>
        </fo:block>
      </xsl:if>
    
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="sidebar/title">
  </xsl:template>
  
  <xsl:template match="sidebar/title" mode="sidebar.title.mode">
    <xsl:apply-templates/>
  </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="msg">
    <xsl:call-template name="block.object"/>
  </xsl:template>
  
  <xsl:template match="msgmain">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="msgsub">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="msgrel">
  </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|msgorig|msgaud">
    <fo:block>
      <fo:inline font-weight="bold">
        <xsl:call-template name="gentext.element.name"/>
        <xsl:text>: </xsl:text>
      </fo:inline>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="msgexplan">
    <xsl:call-template name="block.object"/>
  </xsl:template>
  
  <xsl:template match="msgexplan/title">
    <fo:block font-weight="bold"><xsl:apply-templates/></fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="highlights">
    <xsl:call-template name="block.object"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/callout.xsl
  
  Index: callout.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:verb="com.nwalsh.saxon.Verbatim"
                  exclude-result-prefixes="verb"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: callout.xsl,v 1.1 2001/02/11 00:05:06 tobias Exp $
       ********************************************************************
  
       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="programlistingco|screenco">
    <xsl:variable name="verbatim" select="programlisting|screen"/>
  
    <xsl:choose>
      <xsl:when test="$saxon.extensions != '0'
                      and $saxon.callouts != '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="$callout.graphics != 0">
              <xsl:copy-of select="verb:insertCallouts(areaspec,$rtf,
                                   $callout.defaultcolumn,
                                   $callout.graphics.path,
                                   $callout.graphics.extension,
                                   $callout.graphics.number.limit,
                                   true())"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:copy-of select="verb:insertCallouts(areaspec,$rtf,
                                   $callout.defaultcolumn)"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
  
        <xsl:choose>
          <xsl:when test="$verbatim/@linenumbering = 'numbered'
                          and $saxon.extensions != '0'
                          and $saxon.linenumbering != '0'">
            <xsl:copy-of select="verb:numberLines($rtf-with-callouts,
                                 $linenumbering.everyNth,
                                 $linenumbering.width,
                                 $linenumbering.separator)"/>
            <xsl:apply-templates select="calloutlist"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:copy-of select="$rtf-with-callouts"/>
            <xsl:apply-templates select="calloutlist"/>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </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" mode="callout-bug">
    <xsl:call-template name="callout-bug">
      <xsl:with-param name="conum">
        <xsl:number count="co" 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'
                      or $conum > $callout.graphics.number.limit">
  
        <xsl:text>(</xsl:text>
        <xsl:value-of select="$conum"/>
        <xsl:text>)</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <fo:external-graphic
            src="{$callout.graphics.path}{$conum}{$callout.graphics.extension}"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/component.xsl
  
  Index: component.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: component.xsl,v 1.1 2001/02/11 00:05:06 tobias Exp $
       ********************************************************************
  
       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="id">
      <xsl:call-template name="object.id">
        <xsl:with-param name="object" select="$node"/>
      </xsl:call-template>
    </xsl:variable>
  
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates select="$node" mode="title.ref"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template name="component.subtitle">
    <xsl:param name="node" select="."/>
    <xsl:variable name="subtitle">
      <xsl:apply-templates select="$node" mode="subtitle.content"/>
    </xsl:variable>
  
    <xsl:if test="$subtitle != ''">
      <fo:block font-size="16pt" font-weight="bold" font-style="italic">
        <xsl:copy-of select="$subtitle"/>
      </fo:block>
    </xsl:if>
  </xsl:template>
  
  <xsl:template name="component.separator">
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="dedication" mode="dedication">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:call-template name="component.title"/>
        <xsl:call-template name="component.subtitle"/>
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="dedication"></xsl:template> <!-- see mode="dedication" -->
  <xsl:template match="dedication/docinfo"></xsl:template>
  <xsl:template match="dedication/title"></xsl:template>
  <xsl:template match="dedication/subtitle"></xsl:template>
  <xsl:template match="dedication/titleabbrev"></xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="preface">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:call-template name="preface.titlepage"/>
        <xsl:call-template name="component.toc"/>
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="title" mode="preface.titlepage.recto.mode">
    <xsl:call-template name="component.title">
      <xsl:with-param name="node" select="ancestor::preface[1]"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="preface/docinfo"></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">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:call-template name="chapter.titlepage"/>
        <xsl:call-template name="component.toc"/>
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="title" mode="chapter.titlepage.recto.mode">
    <xsl:call-template name="component.title">
      <xsl:with-param name="node" select="ancestor::preface[1]"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="chapter/docinfo"></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="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:call-template name="appendix.titlepage"/>
        <xsl:call-template name="component.toc"/>
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="title" mode="appendix.titlepage.recto.mode">
    <xsl:call-template name="component.title">
      <xsl:with-param name="node" select="ancestor::preface[1]"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="appendix/docinfo"></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">
    <fo:page-sequence master-name="pages">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="article.titlepage"/>
        <xsl:call-template name="component.toc"/>
        <xsl:apply-templates/>
     </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="article/artheader"></xsl:template>
  <xsl:template match="article/articleinfo"></xsl:template>
  <xsl:template match="article/title"></xsl:template>
  <xsl:template match="article/subtitle"></xsl:template>
  
  <xsl:template match="article/appendix">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:block id='{$id}'>
      <xsl:call-template name="section.heading">
        <xsl:with-param name="level" select="2"/>
        <xsl:with-param name="title">
          <xsl:apply-templates select="." mode="title.ref"/>
        </xsl:with-param>
      </xsl:call-template>
  
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/division.xsl
  
  Index: division.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: division.xsl,v 1.1 2001/02/11 00:05:06 tobias Exp $
       ********************************************************************
  
       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">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="set/setinfo"></xsl:template>
  <xsl:template match="set/title"></xsl:template>
  <xsl:template match="set/subtitle"></xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="book">
    <xsl:variable name="preamble" 
                  select="title|subtitle|titleabbrev|bookinfo"/>
    <xsl:variable name="content" 
                  select="*[not(self::title or self::subtitle
                              or self::titleabbrev 
                              or self::bookinfo)]"/>
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <xsl:if test="$preamble">
      <fo:page-sequence master-name="pages" id="{$id}">
        <fo:flow>
          <xsl:call-template name="book.titlepage"/>
        </fo:flow>
      </fo:page-sequence>
    </xsl:if>
  
    <xsl:apply-templates select="dedication" mode="dedication"/>
  
    <xsl:apply-templates select="$content"/>
  </xsl:template>
  
  <xsl:template match="book/bookinfo"></xsl:template>
  <xsl:template match="book/title"></xsl:template>
  <xsl:template match="book/subtitle"></xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="part">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="part/docinfo"></xsl:template>
  <xsl:template match="part/title"></xsl:template>
  <xsl:template match="part/subtitle"></xsl:template>
  
  <xsl:template match="partintro">
    <fo:page-sequence master-name="pages">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:if test="./title">
          <xsl:apply-templates select="./title" mode="partintro.title.mode"/>
        </xsl:if>
  
        <xsl:if test="./subtitle">
          <xsl:apply-templates select="./subtitle" mode="partintro.title.mode"/>
        </xsl:if>
  
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="partintro/title"></xsl:template>
  <xsl:template match="partintro/subtitle"></xsl:template>
  <xsl:template match="partintro/titleabbrev"></xsl:template>
  
  <xsl:template match="partintro/title" mode="partintro.title.mode">
    <xsl:variable name="id">
      <xsl:call-template name="object.id">
        <xsl:with-param name="object" select=".."/>
      </xsl:call-template>
    </xsl:variable>
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="partintro/subtitle" mode="partintro.title.mode">
    <fo:block font-size="16pt" font-weight="bold" font-style="italic">
      <xsl:apply-templates/>
    </fo:block>
  </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>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/docbook.xsl
  
  Index: docbook.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                  exclude-result-prefixes="doc"
                  version='1.0'>
  
  <xsl:output method="xml"
              indent="no"/>
  
  <!-- ********************************************************************
       $Id: docbook.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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="../lib/lib.xsl"/>
  <xsl:include href="../common/l10n.xsl"/>
  <xsl:include href="../common/common.xsl"/>
  <xsl:include href="autotoc.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="sections.xsl"/>
  <xsl:include href="inline.xsl"/>
  <xsl:include href="footnote.xsl"/>
  <xsl:include href="fo.xsl"/>
  <xsl:include href="info.xsl"/>
  <xsl:include href="keywords.xsl"/>
  <xsl:include href="division.xsl"/>
  <xsl:include href="index.xsl"/>
  <xsl:include href="toc.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="qandaset.xsl"/>
  <xsl:include href="synop.xsl"/>
  <xsl:include href="titlepage.xsl"/>
  <xsl:include href="titlepage.templates.xsl"/>
  <xsl:include href="param.xsl"/>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="*">
    <fo:block 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>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="text()">
    <xsl:value-of select="."/> 
  </xsl:template>
  
  <xsl:template match="processing-instruction()">
  </xsl:template>
  
  <xsl:template match="/">
    <xsl:variable name="document.element" select="*[1]"/>
    <xsl:variable name="title">
      <xsl:choose>
        <xsl:when test="$document.element/title[1]">
          <xsl:value-of select="$document.element/title[1]"/>
        </xsl:when>
        <xsl:otherwise>[could not find document title]</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="docinfo" 
                  select="*[1]/artheader
                          |*[1]/articleinfo
                          |*[1]/sectioninfo
                          |*[1]/sect1info"/>
  
    <fo:root font-family="Times Roman"
             font-size="12pt"
             text-align="justify">
      <fo:layout-master-set>
        <fo:page-sequence-master master-name="pages">
        <fo:repeatable-page-master-alternatives>
          <fo:conditional-page-master-reference
            odd-or-even="odd" master-name="right"/>
          <fo:conditional-page-master-reference
            odd-or-even="even" master-name="left"/>
        </fo:repeatable-page-master-alternatives>
        </fo:page-sequence-master>
        <fo:simple-page-master
          master-name="right"
          margin-top="75pt"
          margin-bottom="25pt"
          margin-left="100pt"
          margin-right="50pt">
          <fo:region-body margin-bottom="50pt"/>
          <fo:region-after extent="25pt"/>
        </fo:simple-page-master>
        <fo:simple-page-master
          master-name="left"
          margin-top="75pt"
          margin-bottom="25pt"
          margin-left="50pt"
          margin-right="100pt">
          <fo:region-body margin-bottom="50pt"/>
          <fo:region-after extent="25pt"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
  
      <xsl:choose>
        <xsl:when test="$rootid != ''">
          <xsl:choose>
            <xsl:when test="count(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="id($rootid)"/>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates/>
        </xsl:otherwise>
      </xsl:choose>
  
    </fo:root>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/fo.xsl
  
  Index: fo.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: fo.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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="dingbat">
    <xsl:param name="dingbat">bullet</xsl:param>
    <xsl:choose>
      <xsl:when test="$dingbat='bullet'">o</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='ldquo'">"</xsl:when>
      <xsl:when test="$dingbat='rdquo'">"</xsl:when>
      <xsl:when test="$dingbat='lsquo'">'</xsl:when>
      <xsl:when test="$dingbat='rsquo'">'</xsl:when>
      <xsl:when test="$dingbat='em-dash'">--</xsl:when>
      <xsl:when test="$dingbat='en-dash'">-</xsl:when>
      <xsl:otherwise>o</xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/footnote.xsl
  
  Index: footnote.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: footnote.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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>
    <fo:footnote>
      <fo:inline>
        <xsl:text>[</xsl:text>
        <xsl:apply-templates select="." mode="footnote.number"/>
        <xsl:text>]</xsl:text>
      </fo:inline>
      <fo:footnote-body>
        <xsl:apply-templates/>
      </fo:footnote-body>
    </fo:footnote>
  </xsl:template>
  
  <xsl:template match="footnoteref">
    <xsl:variable name="footnote" select="id(@linkend)"/>
    <xsl:value-of select="name($footnote)"/>
    <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>
    <fo:inline>
      <xsl:text>[</xsl:text>
      <xsl:apply-templates select="$footnote" mode="footnote.number"/>
      <xsl:text>]</xsl:text>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="footnote" mode="footnote.number">
    <xsl:number level="any" format="1"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="footnote/para[1]">
    <!-- this only works if the first thing in a footnote is a para, -->
    <!-- which is ok, because it usually is. -->
    <fo:block>
      <xsl:text>[</xsl:text>
      <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/>
      <xsl:text>] </xsl:text>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/formal.xsl
  
  Index: formal.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: formal.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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">
    <fo:block keep-with-next.within-column="always">
      <xsl:attribute name="id">
        <xsl:call-template name="object.id"/>
      </xsl:attribute>
    </fo:block>
    <fo:block keep-with-previous.within-column="always">
      <xsl:call-template name="formal.object.heading">
         <xsl:with-param name="title">
           <xsl:apply-templates select="." mode="title.ref"/>
         </xsl:with-param>
      </xsl:call-template>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template name="formal.object.heading">
    <xsl:param name="title"></xsl:param>
    <fo:block xsl:use-attribute-sets="formal.title.attrs">
      <xsl:copy-of select="$title"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template name="informal.object">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template name="semiformal.object">
    <xsl:choose>
      <xsl:when test="./title">
        <xsl:call-template name="formal.object"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="informal.object"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="figure|example">
    <xsl:call-template name="formal.object"/>
  </xsl:template>
  
  <xsl:template match="table">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
    <xsl:variable name="prop-columns"
      select=".//colspec[contains(@colwidth, '*')]"/>
  
    <fo:table-and-caption id="{$id}" keep-together.within-column="always">
      <fo:table-caption>
        <fo:block font-weight='bold'>
           <xsl:apply-templates select="." mode="title.ref"/>
        </fo:block>
      </fo:table-caption>
      <fo:table>
        <xsl:if test="count($prop-columns) != 0">
        <xsl:attribute name="table-layout">fixed</xsl:attribute>
        </xsl:if>
        <xsl:apply-templates/>
      </fo:table>
    </fo:table-and-caption>
  </xsl:template>
  
  <xsl:template match="equation">
    <xsl:call-template name="semiformal.object"/>
  </xsl:template>
  
  <xsl:template match="figure/title"></xsl:template>
  <xsl:template match="table/title"></xsl:template>
  <xsl:template match="example/title"></xsl:template>
  <xsl:template match="equation/title"></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:variable name="prop-columns"
      select=".//colspec[contains(@colwidth, '*')]"/>
  
    <fo:table>
      <xsl:if test="count($prop-columns) != 0">
        <xsl:attribute name="table-layout">fixed</xsl:attribute>
      </xsl:if>
      <xsl:apply-templates/>
    </fo:table>
  </xsl:template>
  
  <xsl:template match="informalequation">
    <xsl:call-template name="informal.object"/>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/glossary.xsl
  
  Index: glossary.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: glossary.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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="glossterm-width">2in</xsl:variable>
  <xsl:variable name="glossterm-sep">0.25in</xsl:variable>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="glossary">
    <xsl:variable name="divs" select="glossdiv"/>
    <xsl:variable name="entries" select="glossentry"/>
    <xsl:variable name="preamble"
                  select="*[not(self::title
                              or self::subtitle
                              or self::glossdiv
                              or self::glossentry)]"/>
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="component.separator"/>
      <xsl:choose>
        <xsl:when test="./title">
          <xsl:apply-templates select="./title" mode="component.title.mode"/>
        </xsl:when>
        <xsl:otherwise>
          <fo:block font-size="18pt" font-weight="bold">
            <xsl:call-template name="gentext.element.name"/>
          </fo:block>
        </xsl:otherwise>
      </xsl:choose>
  
      <xsl:if test="./subtitle">
        <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
      </xsl:if>
  
      <xsl:if test="$preamble">
        <xsl:apply-templates select="$preamble"/>
      </xsl:if>
  
      <xsl:if test="$divs">
        <xsl:apply-templates select="$divs"/>
      </xsl:if>
  
      <xsl:if test="$entries">
        <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
                       provisional-label-separation="{$glossterm-sep}"
                       space-before.optimum="1em"
                       space-before.minimum="0.8em"
                       space-before.maximum="1.2em">
          <xsl:apply-templates select="$entries"/>
        </fo:list-block>
      </xsl:if>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="book/glossary">
    <xsl:variable name="divs" select="glossdiv"/>
    <xsl:variable name="entries" select="glossentry"/>
    <xsl:variable name="preamble"
                  select="*[not(self::title
                              or self::subtitle
                              or self::glossdiv
                              or self::glossentry)]"/>
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <fo:page-sequence master-name="pages" id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:choose>
          <xsl:when test="./title">
            <xsl:apply-templates select="./title" mode="component.title.mode"/>
          </xsl:when>
          <xsl:otherwise>
            <fo:block font-size="18pt" font-weight="bold">
              <xsl:call-template name="gentext.element.name"/>
            </fo:block>
          </xsl:otherwise>
        </xsl:choose>
  
        <xsl:if test="./subtitle">
          <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
        </xsl:if>
  
        <xsl:if test="$preamble">
          <xsl:apply-templates select="$preamble"/>
        </xsl:if>
  
        <xsl:if test="$divs">
          <xsl:apply-templates select="$divs"/>
        </xsl:if>
  
        <xsl:if test="$entries">
          <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
                         provisional-label-separation="{$glossterm-sep}"
                         space-before.optimum="1em"
                         space-before.minimum="0.8em"
                         space-before.maximum="1.2em">
            <xsl:apply-templates select="$entries"/>
          </fo:list-block>
        </xsl:if>
      </fo:flow>
    </fo:page-sequence>
  </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="glossary/title" mode="component.title.mode">
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="glossary/subtitle" mode="component.title.mode">
    <fo:block font-size="16pt" font-weight="bold" font-style="italic">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="glosslist">
    <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
                   provisional-label-separation="{$glossterm-sep}"
                   space-before.optimum="1em"
                   space-before.minimum="0.8em"
                   space-before.maximum="1.2em">
        <xsl:apply-templates/>
      </fo:list-block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="glossdiv">
    <xsl:variable name="entries" select="glossentry"/>
    <xsl:variable name="preamble"
                  select="*[not(self::title
                              or self::subtitle
                              or self::glossentry)]"/>
  
    <xsl:apply-templates select="title|subtitle"/>
    <xsl:apply-templates select="$preamble"/>
    <fo:list-block provisional-distance-between-starts="{$glossterm-width}"
                   provisional-label-separation="{$glossterm-sep}"
                   space-before.optimum="1em"
                   space-before.minimum="0.8em"
                   space-before.maximum="1.2em">
      <xsl:apply-templates select="$entries"/>
    </fo:list-block>
  </xsl:template>
  
  <xsl:template match="glossdiv/title">
    <fo:block font-size="16pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <!--
  GlossEntry ::=
    GlossTerm, Acronym?, Abbrev?,
    (IndexTerm)*,
    RevHistory?,
    (GlossSee | GlossDef+)
  -->
  
  <xsl:template match="glossentry">
    <fo:list-item>
      <xsl:apply-templates/>
    </fo:list-item>
  </xsl:template>
    
  <xsl:template match="glossentry/glossterm">
    <fo:list-item-label>
      <fo:block>
        <xsl:apply-templates/>
      </fo:block>
    </fo:list-item-label>
  </xsl:template>
    
  <xsl:template match="glossentry/acronym">
  </xsl:template>
    
  <xsl:template match="glossentry/abbrev">
  </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]"/>
    <fo:list-item-body>
      <fo:block>
        <xsl:call-template name="gentext.element.name"/>
        <xsl:call-template name="gentext.space"/>
        <xsl:choose>
          <xsl:when test="@otherterm">
            <xsl:apply-templates select="$target" mode="xref"/>
          </xsl:when>
          <xsl:otherwise>
            <xsl:apply-templates/>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:text>.</xsl:text>
      </fo:block>
    </fo:list-item-body>
  </xsl:template>
    
  <xsl:template match="glossentry/glossdef">
    <fo:list-item-body><xsl:apply-templates/></fo:list-item-body>
  </xsl:template>
  
  <xsl:template match="glossentry/glossdef/para[1]">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </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]"/>
    <fo:block>
      <xsl:call-template name="gentext.element.name"/>
      <xsl:call-template name="gentext.space"/>
      <xsl:choose>
        <xsl:when test="@otherterm">
          <xsl:apply-templates select="$target" mode="xref"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates/>
        </xsl:otherwise>
      </xsl:choose>
      <xsl:text>.</xsl:text>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="glossentry" mode="xref">
    <xsl:apply-templates select="./glossterm[1]" mode="xref"/>
  </xsl:template>
  
  <xsl:template match="glossterm" mode="xref">
    <xsl:apply-templates/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/graphics.xsl
  
  Index: graphics.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:xlink="http://www.w3.org/1999/xlink"
                  xmlns:text="http://nwalsh.com/com.nwalsh.saxon.TextFactory"
                  exclude-result-prefixes="xlink text"
                  extension-element-prefixes="text"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: graphics.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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, <[EMAIL PROTECTED]>
  
       ******************************************************************** -->
  
  <xsl:template match="screenshot">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </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:variable name="input-filename">
      <xsl:choose>
        <xsl:when test="@entityref">
          <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
        </xsl:when>
        <xsl:when test="@fileref">
          <xsl:text>file:</xsl:text>
          <xsl:value-of select="@fileref"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:message>
            <xsl:text>Expected @entityref or @fileref on </xsl:text>
            <xsl:value-of select="name(.)"/>
          </xsl:message>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <xsl:variable name="fileext">
      <xsl:call-template name="filename-extension">
        <xsl:with-param name="filename" select="$input-filename"/>
      </xsl:call-template>
    </xsl:variable>
  
    <xsl:variable name="filename">
      <xsl:choose>
        <xsl:when test="$fileext != ''">
          <xsl:value-of select="$input-filename"/>
        </xsl:when>
        <xsl:when test="$graphic.default.extension != ''">
          <xsl:value-of select="$input-filename"/>
          <xsl:text>.</xsl:text>
          <xsl:value-of select="$graphic.default.extension"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$input-filename"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <xsl:variable name="scale">
      <xsl:choose>
        <xsl:when test="@scale"><xsl:value-of select="@scale"/>%</xsl:when>
        <xsl:otherwise>auto</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <xsl:variable name="width">
      <xsl:choose>
        <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
        <xsl:otherwise>auto</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <xsl:variable name="height">
      <xsl:choose>
        <xsl:when test="@depth"><xsl:value-of select="@depth"/></xsl:when>
        <xsl:otherwise>auto</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <fo:external-graphic src="{$filename}"
      content-width="{$scale}" content-height="{$scale}"
      width="{$width}" height="{$height}"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="graphic">
    <fo:block>
      <xsl:call-template name="process.image"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="inlinegraphic">
    <xsl:choose>
      <xsl:when test="@format='linespecific'">
        <xsl:choose>
          <xsl:when test="$saxon.extensions != '0'
                          and $saxon.textinsert != '0'">
            <xsl:choose>
              <xsl:when test="@entityref">
                <text:insertfile href="{unparsed-entity-uri(@entityref)}"/>
              </xsl:when>
              <xsl:otherwise>
                <text:insertfile href="{@fileref}"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad">
              <xsl:choose>
                <xsl:when test="@entityref">
                  <xsl:attribute name="href">
                    <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="href">
                    <xsl:value-of select="@fileref"/>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </a>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="process.image"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="mediaobject">
    <fo:block>
      <xsl:call-template name="select.mediaobject"/>
      <xsl:apply-templates select="caption"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="inlinemediaobject">
    <xsl:call-template name="select.mediaobject"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="imageobject">
    <xsl:apply-templates select="imagedata"/>
  </xsl:template>
  
  <xsl:template match="imagedata">
    <xsl:choose>
      <xsl:when test="@format='linespecific'">
        <xsl:choose>
          <xsl:when test="$saxon.extensions != '0'
                          and $saxon.textinsert != '0'">
            <xsl:choose>
              <xsl:when test="@entityref">
                <text:insertfile href="{unparsed-entity-uri(@entityref)}"/>
              </xsl:when>
              <xsl:otherwise>
                <text:insertfile href="{@fileref}"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
          <xsl:otherwise>
            <a xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad">
              <xsl:choose>
                <xsl:when test="@entityref">
                  <xsl:attribute name="href">
                    <xsl:value-of select="unparsed-entity-uri(@entityref)"/>
                  </xsl:attribute>
                </xsl:when>
                <xsl:otherwise>
                  <xsl:attribute name="href">
                    <xsl:value-of select="@fileref"/>
                  </xsl:attribute>
                </xsl:otherwise>
              </xsl:choose>
            </a>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="process.image"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="videoobject">
    <xsl:apply-templates select="videodata"/>
  </xsl:template>
  
  <xsl:template match="videodata">
    <xsl:call-template name="process.image"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="audioobject">
    <xsl:apply-templates select="audiodata"/>
  </xsl:template>
  
  <xsl:template match="audiodata">
    <xsl:call-template name="process.image"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="textobject">
    <xsl:apply-templates/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="caption">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/index.xsl
  
  Index: index.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: index.xsl,v 1.1 2001/02/11 00:05:07 tobias Exp $
       ********************************************************************
  
       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">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:block id="{$id}">
      <xsl:call-template name="component.separator"/>
      <xsl:choose>
        <xsl:when test="./title">
          <xsl:apply-templates select="./title" mode="component.title.mode"/>
        </xsl:when>
        <xsl:otherwise>
        <fo:block font-size="18pt" font-weight="bold">
          <xsl:call-template name="gentext.element.name"/>
        </fo:block>
        </xsl:otherwise>
      </xsl:choose>
  
      <xsl:if test="./subtitle">
        <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
      </xsl:if>
  
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="book/index">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:page-sequence id="{$id}">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="component.separator"/>
        <xsl:choose>
          <xsl:when test="./title">
            <xsl:apply-templates select="./title" mode="component.title.mode"/>
          </xsl:when>
          <xsl:otherwise>
          <fo:block font-size="18pt" font-weight="bold">
            <xsl:call-template name="gentext.element.name"/>
          </fo:block>
          </xsl:otherwise>
        </xsl:choose>
    
        <xsl:if test="./subtitle">
          <xsl:apply-templates select="./subtitle" mode="component.title.mode"/>
        </xsl:if>
    
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </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="index/title" mode="component.title.mode">
    <xsl:variable name="id">
      <xsl:call-template name="object.id">
        <xsl:with-param name="object" select=".."/>
      </xsl:call-template>
    </xsl:variable>
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="index/subtitle" mode="component.title.mode">
    <fo:block font-size="16pt" font-weight="bold" font-style="italic">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="indexdiv">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="indexdiv/title">
    <xsl:variable name="id">
      <xsl:call-template name="object.id">
        <xsl:with-param name="object" select=".."/>
      </xsl:call-template>
    </xsl:variable>
    <fo:block font-size="16pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="indexterm"></xsl:template>
  <xsl:template match="indexentry"></xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/info.xsl
  
  Index: info.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: info.xsl,v 1.1 2001/02/11 00:05:08 tobias Exp $
       ********************************************************************
  
       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">
    <fo:inline>
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/inline.xsl
  
  Index: inline.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: inline.xsl,v 1.1 2001/02/11 00:05:08 tobias Exp $
       ********************************************************************
  
       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="inline.charseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <xsl:copy-of select="$content"/>
  </xsl:template>
  
  <xsl:template name="inline.monoseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.boldseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline font-weight="bold">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.italicseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline font-style="italic">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.boldmonoseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline font-weight="bold" font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.italicmonoseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline font-style="italic" font-family="monospace">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.superscriptseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline vertical-align="super">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template name="inline.subscriptseq">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:inline vertical-align="sub">
      <xsl:copy-of select="$content"/>
    </fo:inline>
  </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="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="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:call-template name="inline.monoseq"/>
  </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="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="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">
    <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.charseq"/>
  </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:call-template name="inline.charseq"/>
  </xsl:template>
  
  <xsl:template match="citetitle">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>
  
  <xsl:template match="emphasis">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>
  
  <xsl:template match="foreignphrase">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>
  
  <xsl:template match="markup">
    <xsl:call-template name="inline.charseq"/>
  </xsl:template>
  
  <xsl:template match="phrase">
    <xsl:call-template name="inline.charseq"/>
  </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="dingbat">
          <xsl:with-param name="dingbat">ldquo</xsl:with-param>
        </xsl:call-template>
        <xsl:call-template name="inline.charseq"/>
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">rdquo</xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">lsquo</xsl:with-param>
        </xsl:call-template>
        <xsl:call-template name="inline.charseq"/>
        <xsl:call-template name="dingbat">
          <xsl:with-param name="dingbat">rsquo</xsl:with-param>
        </xsl:call-template>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="wordasword">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>
  
  <xsl:template match="lineannotation">
    <xsl:call-template name="inline.charseq"/>
  </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: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="firstterm">
    <xsl:call-template name="inline.italicseq"/>
  </xsl:template>
  
  <xsl:template match="glossterm">
    <xsl:call-template name="inline.charseq"/>
  </xsl:template>
  
  <xsl:template match="sgmltag">
    <xsl:variable name="class">
      <xsl:choose>
        <xsl:when test="@class">
          <xsl:value-of select="@class"/>
        </xsl:when>
        <xsl:otherwise>element</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <xsl:choose>
      <xsl:when test="$class='attribute'">
        <xsl:call-template name="inline.charseq"/>
      </xsl:when>
      <xsl:when test="$class='attvalue'">
        <xsl:call-template name="inline.monoseq"/>
      </xsl:when>
      <xsl:when test="$class='element'">
        <xsl:call-template name="inline.monoseq"/>
      </xsl:when>
      <xsl:when test="$class='endtag'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&lt;/</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>&gt;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='genentity'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&amp;</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='numcharref'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&amp;#</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='paramentity'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>%</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='pi'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&lt;?</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>&gt;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='starttag'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&lt;</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>&gt;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:when test="$class='sgmlcomment'">
        <xsl:call-template name="inline.monoseq">
          <xsl:with-param name="content">
            <xsl:text>&lt;!--</xsl:text>
            <xsl:apply-templates/>
            <xsl:text>--&gt;</xsl:text>
          </xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="inline.charseq"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="email">
    <xsl:call-template name="inline.monoseq">
      <xsl:with-param name="content">
        <xsl:text>&lt;</xsl:text>
        <xsl:apply-templates/>
        <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/>
    </xsl:for-each>
  </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:text>-&gt;</xsl:text>
          </xsl:when>
          <xsl:otherwise>+</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|remark">
    <xsl:if test="$show.comments != 0">
      <fo:inline font-style="italic">
        <xsl:call-template name="inline.charseq"/>
      </fo:inline>
    </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="street|city|state|postcode|country|phone|fax|otheraddr">
    <xsl:call-template name="inline.charseq"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/keywords.xsl
  
  Index: keywords.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: keywords.xsl,v 1.1 2001/02/11 00:05:08 tobias Exp $
       ********************************************************************
  
       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:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/lists.xsl
  
  Index: lists.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: lists.xsl,v 1.1 2001/02/11 00:05:08 tobias Exp $
       ********************************************************************
  
       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">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <xsl:if test="title">
      <xsl:apply-templates select="title" mode="list.title.mode"/>
    </xsl:if>
  
    <fo:list-block id="{$id}"
                   space-before.minimum="0.8em"
                   space-before.optimum="1em"
                   space-before.maximum="1.2em">
      <xsl:apply-templates/>
    </fo:list-block>
  </xsl:template>
  
  <xsl:template match="itemizedlist/title|orderedlist/title|variablelist/title">
    <!--nop-->
  </xsl:template>
  
  <xsl:template match="itemizedlist/listitem">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:list-item id="{$id}"
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
      <fo:list-item-label>
        <fo:block>
          <xsl:text>&#x2022;</xsl:text>
        </fo:block>
      </fo:list-item-label>
      <fo:list-item-body>
        <xsl:apply-templates/>
      </fo:list-item-body>
    </fo:list-item>
  </xsl:template>
  
  <xsl:template match="orderedlist">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <xsl:if test="title">
      <xsl:apply-templates select="title" mode="list.title.mode"/>
    </xsl:if>
  
    <fo:list-block id="{$id}"
                   space-before.minimum="0.8em"
                   space-before.optimum="1em"
                   space-before.maximum="1.2em">
      <xsl:apply-templates/>
    </fo:list-block>
  </xsl:template>
  
  <xsl:template match="orderedlist/listitem">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:list-item id="{$id}"
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
      <fo:list-item-label>
        <fo:block>
          <xsl:number count="listitem" format="1."/>
        </fo:block>
      </fo:list-item-label>
      <fo:list-item-body>
        <xsl:apply-templates/>
      </fo:list-item-body>
    </fo:list-item>
  </xsl:template>
  
  <xsl:template match="listitem/para[1]">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="variablelist">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
  
    <xsl:if test="title">
      <xsl:apply-templates select="title" mode="list.title.mode"/>
    </xsl:if>
  
    <fo:list-block id="{$id}"
                   provisional-distance-between-starts="3in"
                   provisional-label-separation="0.25in"
                   space-before.minimum="0.8em"
                   space-before.optimum="1em"
                   space-before.maximum="1.2em">
      <xsl:apply-templates/>
    </fo:list-block>
  </xsl:template>
  
  <xsl:template match="varlistentry">
    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
    <fo:list-item id="{$id}"
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
      <fo:list-item-label>
        <fo:block>
          <xsl:apply-templates select="term"/>
        </fo:block>
      </fo:list-item-label>
      <fo:list-item-body>
        <xsl:apply-templates select="listitem"/>
      </fo:list-item-body>
    </fo:list-item>
  </xsl:template>
  
  <xsl:template match="varlistentry/term">
    <fo:inline><xsl:apply-templates/>, </fo:inline>
  </xsl:template>
  
  <xsl:template match="varlistentry/term[position()=last()]" priority="2">
    <fo:inline><xsl:apply-templates/></fo:inline>
  </xsl:template>
  
  <xsl:template match="varlistentry/listitem">
    <xsl:apply-templates/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="title" mode="list.title.mode">
    <fo:block font-size="12pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="simplelist">
    <!-- with no type specified, the default is 'vert' -->
    <fo:table>
      <fo:table-body>
        <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>
      </fo:table-body>
    </fo:table>
  </xsl:template>
  
  <xsl:template match="simplelist[@type='inline']">
    <fo:inline><xsl:apply-templates/></fo:inline>
  </xsl:template>
  
  <xsl:template match="simplelist[@type='horiz']">
    <fo:table>
      <fo:table-body>
        <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>
      </fo:table-body>
    </fo:table>
  </xsl:template>
  
  <xsl:template match="simplelist[@type='vert']">
    <fo:table>
      <fo:table-body>
        <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>
      </fo:table-body>
    </fo: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)">
      <fo:table-row>
        <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>
     </fo:table-row>
      <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">
      <fo:table-cell>
        <xsl:if test="$members[position()=$cell]">
          <xsl:apply-templates select="$members[position()=$cell]"/>
        </xsl:if>
      </fo:table-cell>
      <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">
      <fo:table-row>
        <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>
     </fo:table-row>
      <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">
      <fo:table-cell>
        <xsl:if test="$members[position()=$cell]">
          <xsl:apply-templates select="$members[position()=$cell]"/>
        </xsl:if>
      </fo:table-cell>
      <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: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="title" select="title"/>
    <xsl:variable name="preamble" 
                  select="*[not(self::step or self::title)]"/>
    <xsl:variable name="steps" select="step"/>
  
    <fo:block space-before.optimum="1em"
              space-before.minimum="0.8em"
              space-before.maximum="1.2em">
      <xsl:if test="./title">
        <fo:block font-weight="bold">
          <xsl:apply-templates select="./title" mode="procedure.title.mode"/>
        </fo:block>
      </xsl:if>
      <xsl:apply-templates select="$preamble"/>
      <fo:list-block space-before.optimum="1em"
                     space-before.minimum="0.8em"
                     space-before.maximum="1.2em">
        <xsl:apply-templates select="$steps"/>
      </fo:list-block>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="procedure/title">
  </xsl:template>
  
  <xsl:template match="procedure/title" mode="procedure.title.mode">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="substeps">
    <fo:list-block space-before.optimum="1em"
                   space-before.minimum="0.8em"
                   space-before.maximum="1.2em">
      <xsl:apply-templates/>
    </fo:list-block>
  </xsl:template>
  
  <xsl:template match="step">
    <fo:list-item>
      <fo:list-item-label>
        <fo:block>
          <xsl:number count="step" format="1."/>
        </fo:block>
      </fo:list-item-label>
      <fo:list-item-body><xsl:apply-templates/></fo:list-item-body>
    </fo:list-item>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="segmentedlist">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="segmentedlist/title">
    <fo:block font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </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">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="seg">
    <xsl:variable name="segnum" select="position()"/>
    <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
    -->
  
    <fo:block>
      <fo:inline font-weight="bold">
        <xsl:apply-templates select="$segtitles[$segnum=position()]"
                             mode="segtitle-in-seg"/>
        <xsl:text>: </xsl:text>
      </fo:inline>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="calloutlist">
    <fo:block>
      <xsl:if test="./title">
        <fo:block font-weight="bold">
          <xsl:apply-templates select="./title" mode="calloutlist.title.mode"/>
        </fo:block>
      </xsl:if>
      <fo:list-block space-before.optimum="1em"
                     space-before.minimum="0.8em"
                     space-before.maximum="1.2em">
        <xsl:apply-templates/>
      </fo:list-block>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="calloutlist/title">
  </xsl:template>
  
  <xsl:template match="calloutlist/title" mode="calloutlist.title.mode">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="callout">
    <fo:list-item>
      <fo:list-item-label>
        <xsl:call-template name="callout.arearefs">
          <xsl:with-param name="arearefs" select="@arearefs"/>
        </xsl:call-template>
      </fo:list-item-label>
      <fo:list-item-body>
        <xsl:apply-templates/>
      </fo:list-item-body>
    </fo:list-item>
  </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="id($arearef)"/>
    <xsl:variable name="target" select="$targets[1]"/>
  
    <xsl:choose>
      <xsl:when test="count($target)=0">
        <xsl:value-of select="$arearef"/>
        <xsl:text>: ???</xsl:text>
      </xsl:when>
      <xsl:when test="local-name($target)='co'">
        <xsl:apply-templates select="$target" mode="callout-bug"/>
      </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>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/math.xsl
  
  Index: math.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: math.xsl,v 1.1 2001/02/11 00:05:08 tobias Exp $
       ********************************************************************
  
       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>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/param.xsl
  
  Index: param.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                  exclude-result-prefixes="doc"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: param.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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: param.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
  </releaseinfo>
  <author><surname>Walsh</surname>
  <firstname>Norman</firstname></author>
  <copyright><year>1999</year><year>2000</year>
  <holder>Norman Walsh</holder>
  </copyright>
  </referenceinfo>
  <title>Formatting Object Paramter 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 each of the Formatting Object
  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 turn on automatic section numbering,
  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="/path/to/fo/docbook.xsl"/>
  
    <xsl:param name="section.autolabel" select="1"/>
  
  </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.</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:param name="author.othername.in.middle" select="1"/>
  <xsl:param name="html.stylesheet">docbook.css</xsl:param>
  <xsl:param name="html.stylesheet.type">text/css</xsl:param>
  <xsl:param name="refentry.xref.manvolnum" select="1"/>
  <xsl:param name="show.comments" select="1"/>
  <xsl:param name="funcsynopsis.style">kr</xsl:param>
  <xsl:param name="funcsynopsis.decoration" select="1"/>
  <xsl:param name="refentry.generate.name" select="1"/>
  
  <xsl:param name="admon.graphics" select="0"/>
  <xsl:param name="admon.graphics.path">../images/</xsl:param>
  
  <xsl:param name="section.autolabel" select="0"/>
  <xsl:param name="section.label.includes.component.label" select="0"/>
  <xsl:param name="chapter.autolabel" select="1"/>
  <xsl:param name="part.autolabel" select="0"/>
  <xsl:param name="preface.autolabel" select="0"/>
  
  <xsl:param name="biblioentry.item.separator">. </xsl:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="qandadiv.autolabel" select="1"/>
  
  <doc:variable name="qandadiv.autolabel" xmlns="">
  <refpurpose>Are divisions in QAndASets enumerated?</refpurpose>
  <refdescription>
  <para>If true (non-zero), unlabeled qandadivs will be enumerated.
  </para>
  </refdescription>
  </doc:variable>
  
  <!-- ==================================================================== -->
  <xsl:param name="qanda.inherit.numeration" select="0"/>
  
  <doc:variable name="qanda.inherit.numeration" xmlns="">
  <refpurpose>Does enumeration of QandASet components inherit the numeration of parent 
elements?</refpurpose>
  <refdescription>
  <para>If true (non-zero), numbered QandADiv elements and Questions and Answers 
inherit
  the numeration of the ancestors of the QandASet.
  </para>
  </refdescription>
  </doc:variable>
  
  <!-- ==================================================================== -->
  
  <xsl:param name="graphic.default.extension"></xsl:param>
  
  <doc:variable name="graphic.default.extension" xmlns="">
  <refpurpose>Default extension for graphic filenames</refpurpose>
  <refdescription>
  <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>
  </refdescription>
  </doc:variable>
  
  <!-- ==================================================================== -->
  
  <xsl:attribute-set name="formal.title.attrs">
    <xsl:attribute name="space-before.optimum">2em</xsl:attribute>
    <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute>
    <xsl:attribute name="font-weight">bold</xsl:attribute>
    <xsl:attribute name="font-size">12pt</xsl:attribute>
  </xsl:attribute-set>
  
  <doc:attribute-set name="formal.title.attrs" xmlns="">
  <refpurpose>Properties of formal object titles</refpurpose>
  <refdescription>
  <para>This attribute set is used to specify the properties of formal
  object titles.
  </para>
  </refdescription>
  </doc:attribute-set>
  
  <!-- ==================================================================== -->
  
  <xsl:attribute-set name="component.title.attrs">
    <xsl:attribute name="space-before.optimum">2em</xsl:attribute>
    <xsl:attribute name="space-before.minimum">1.8em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">2.2em</xsl:attribute>
    <xsl:attribute name="font-weight">bold</xsl:attribute>
    <xsl:attribute name="font-size">18pt</xsl:attribute>
    <xsl:attribute name="space-after.optimum">1.5em</xsl:attribute>
    <xsl:attribute name="space-after.minimum">1.3em</xsl:attribute>
    <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute>
  </xsl:attribute-set>
  
  <doc:attribute-set name="component.title.attrs" xmlns="">
  <refpurpose>Properties of component titles</refpurpose>
  <refdescription>
  <para>This attribute set is used to specify the properties of component
  titles.
  </para>
  </refdescription>
  </doc:attribute-set>
  
  <!-- ==================================================================== -->
  
  <xsl:attribute-set name="normal.para.spacing">
    <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
    <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
    <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
  </xsl:attribute-set>
  
  <doc:attribute-set name="component.title.attrs" xmlns="">
  <refpurpose>Spacing properties of normal paragraphs</refpurpose>
  <refdescription>
  <para>This attribute set is used to specify the spacing properties
  of normal paragraphs.
  </para>
  </refdescription>
  </doc:attribute-set>
  
  <!-- ==================================================================== -->
  <xsl:param name="rootid" select="''"/>
  
  <doc:param name="rootid" xmlns="">
  <refpurpose>Specify the root element to format</refpurpose>
  <refdescription>
  <para>If <parameter>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>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="callout.graphics" select="'1'"/>
  
  <doc:param name="callout.graphics" xmlns="">
  <refpurpose>Use graphics for callouts?</refpurpose>
  <refdescription>
  <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>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="callout.graphics.extension" select="'.png'"/>
  
  <doc:param name="callout.graphics.extension" xmlns="">
  <refpurpose>Extension for callout graphics</refpurpose>
  <refdescription>
  <para>Sets the extension to use on callout graphics.</para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="callout.graphics.path" select="'../images/callouts/'"/>
  
  <doc:param name="callout.graphics.path" xmlns="">
  <refpurpose>Path to callout graphics</refpurpose>
  <refdescription>
  <para>Sets the path, probably relative to the directory where the HTML
  files are created, to the callout graphics.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="callout.graphics.number.limit" select="'10'"/>
  
  <doc:param name="callout.graphics.number.limit" xmlns="">
  <refpurpose>Number of the largest callout graphic</refpurpose>
  <refdescription>
  <para>If <parameter>callout.graphics</parameter>
  is non-zero, graphics are used to represent
  callout numbers. The value of
  <parameter>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>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="saxon.extensions" select="'0'"/>
  
  <doc:param name="saxon.extensions" xmlns="">
  <refpurpose>Enable Saxon extensions</refpurpose>
  <refdescription>
  <para>If non-zero, saxon extensions may be used. Each extension is
  further controlled by its own parameter. But if
  <parameter>saxon.extensions</parameter> is zero, no extensions will
  be used.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="saxon.textinsert" select="'1'"/>
  
  <doc:param name="saxon.textinsert" xmlns="">
  <refpurpose>Enable the textinsert extension element</refpurpose>
  <refdescription>
  <para>The textinsert extension element inserts the contents of a
  a file into the result tree (as text).
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="saxon.linenumbering" select="'1'"/>
  
  <doc:param name="saxon.linenumbering" xmlns="">
  <refpurpose>Enable the line numbering extension</refpurpose>
  <refdescription>
  <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>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="linenumbering.everyNth" select="'5'"/>
  
  <doc:param name="linenumbering.everyNth" xmlns="">
  <refpurpose>Indicate which lines should be numbered</refpurpose>
  <refdescription>
  <para>If line numbering is enabled, everyNth line will be numbered.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="linenumbering.width" select="'3'"/>
  
  <doc:param name="linenumbering.width" xmlns="">
  <refpurpose>Indicates the width of line numbers</refpurpose>
  <refdescription>
  <para>If line numbering is enabled, line numbers will appear right
  justified in a field "width" characters wide.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="linenumbering.separator" select="' '"/>
  
  <doc:param name="linenumbering.separator" xmlns="">
  <refpurpose>Specify a separator between line numbers and lines</refpurpose>
  <refdescription>
  <para>The separator is inserted between line numbers and lines in
  the verbatim environment.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="saxon.callouts" select="'1'"/>
  
  <doc:param name="saxon.callouts" xmlns="">
  <refpurpose>Enable the callout extension</refpurpose>
  <refdescription>
  <para>The callouts extension processes <sgmltag>areaset</sgmltag>
  elements in <sgmltag>ProgramListingCO</sgmltag> and other text-based
  callout elements.
  </para>
  </refdescription>
  </doc:param>
  
  <!-- ==================================================================== -->
  <xsl:param name="callout.defaultcolumn" select="'60'"/>
  
  <doc:param name="callout.defaultcolumn" xmlns="">
  <refpurpose>Indicates what column callouts appear in by default</refpurpose>
  <refdescription>
  <para>If a callout does not identify a column (for example, if it uses
  the <literal>linerange</literal> <sgmltag class="attribute">unit</sgmltag>),
  it will appear in the default column.
  </para>
  </refdescription>
  </doc:param>
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/qandaset.xsl
  
  Index: qandaset.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: qandaset.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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="qanda.defaultlabel">number</xsl:variable>
  <xsl:variable name="generate.qandaset.toc" select="true()"/>
  <xsl:variable name="generate.qandadiv.toc" select="false()"/>
  
  <!-- ==================================================================== -->
  
  <!-- FIXME: WRITE THIS! -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/refentry.xsl
  
  Index: refentry.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: refentry.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="reference/docinfo"></xsl:template>
  <xsl:template match="reference/title"></xsl:template>
  <xsl:template match="reference/subtitle"></xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="refentry">
    <fo:block>
      <fo:block font-size="20pt" font-weight="bold">
        <xsl:text>What about the title?</xsl:text>
      </fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="reference/refentry">
    <fo:page-sequence master-name="pages">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <fo:block font-size="20pt" font-weight="bold">
          <xsl:text>What about the title?</xsl:text>
        </fo:block>
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
  </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">
    <xsl:call-template name="block.object"/>
  </xsl:template>
  
  <xsl:template match="refname">
    <xsl:if test="$refentry.generate.name != 0">
      <fo:block font-size="18pt" font-weight="bold">
        <xsl:call-template name="gentext.element.name"/>
       </fo:block>
    </xsl:if>
    <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">
    <fo:block font-weight="bold">
      <xsl:if test="@role">
        <xsl:value-of select="@role"/>
        <xsl:text>: </xsl:text>
      </xsl:if>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="refsynopsisdiv">
    <fo:block>
      <fo:block font-size="18pt" font-weight="bold">
        <xsl:text>Synopsis (what about the title?)</xsl:text>
      </fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
   
  <xsl:template match="refsynopsisdiv/title">
  </xsl:template>
  
  <xsl:template match="refsect1|refsect2|refsect3">
    <xsl:call-template name="block.object"/>
  </xsl:template>
  
  <xsl:template match="refsect1/title">
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="refsect2/title">
    <fo:block font-size="16pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="refsect3/title">
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/sections.xsl
  
  Index: sections.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: sections.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="section.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="/section">
    <fo:page-sequence master-name="pages">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="section.titlepage"/>
        <xsl:apply-templates/>
     </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="title" mode="section.titlepage.recto.mode">
    <xsl:variable name="section" select="(ancestor::section
                                          |ancestor::simplesect
                                          |ancestor::sect1
                                          |ancestor::sect2
                                          |ancestor::sect3
                                          |ancestor::sect4
                                          |ancestor::sect5)[last()]"/>
    <xsl:call-template name="section.heading">
      <xsl:with-param name="level">
        <xsl:call-template name="section.level">
          <xsl:with-param name="node" select="$section"/>
        </xsl:call-template>
      </xsl:with-param>
      <xsl:with-param name="title">
        <xsl:apply-templates select="$section" mode="title.ref"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="sect1">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="sect1.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="/sect1">
    <fo:page-sequence master-name="pages">
      <fo:static-content flow-name="xsl-region-after">
        <fo:block text-align-last="center" font-size="10pt">
          <fo:page-number/>
        </fo:block>
      </fo:static-content>
  
      <fo:flow>
        <xsl:call-template name="sect1.titlepage"/>
        <xsl:apply-templates/>
     </fo:flow>
    </fo:page-sequence>
  </xsl:template>
  
  <xsl:template match="title" mode="sect1.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="sect2">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="sect2.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="sect2.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="sect3">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="sect3.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="sect3.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="sect4">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="sect4.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="sect4.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="sect5">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="sect5.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="sect5.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="simplesect">
    <xsl:variable name="id">
      <xsl:call-template name="object.id"/>
    </xsl:variable>
  
    <fo:block id="{$id}">
      <xsl:call-template name="simplesect.titlepage"/>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="title" mode="simplesect.titlepage.recto.mode">
    <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  </xsl:template>
  
  <xsl:template match="section/title"></xsl:template>
  <xsl:template match="sectioninfo"></xsl:template>
  
  <xsl:template match="sect1/title"></xsl:template>
  <xsl:template match="sect1info"></xsl:template>
  
  <xsl:template match="sect2/title"></xsl:template>
  <xsl:template match="sect2info"></xsl:template>
  
  <xsl:template match="sect3/title"></xsl:template>
  <xsl:template match="sect3info"></xsl:template>
  
  <xsl:template match="sect4/title"></xsl:template>
  <xsl:template match="sect4info"></xsl:template>
  
  <xsl:template match="sect5/title"></xsl:template>
  <xsl:template match="sect5info"></xsl:template>
  
  <xsl:template match="simplesect/title"></xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template name="section.heading">
    <xsl:param name="level">1</xsl:param>
    <xsl:param name="title"></xsl:param>
    <xsl:variable name="fsize">
      <xsl:choose>
        <xsl:when test="$level=1">18</xsl:when>
        <xsl:when test="$level=2">16</xsl:when>
        <xsl:when test="$level=3">14</xsl:when>
        <xsl:when test="$level=4">12</xsl:when>
        <xsl:when test="$level=5">12</xsl:when>
        <xsl:otherwise>10</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <fo:block font-size="{$fsize}pt" 
              font-weight="bold"
              space-before.minimum="1em"
              space-before.optimum="1.5em"
              space-before.maximum="2em">
      <xsl:copy-of select="$title"/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="bridgehead">
    <!-- need to calculate depth! -->
    <fo:block font-size="16pt" font-weight="bold">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  
  1.1                  manual/src/docs/docbook/fo/synop.xsl
  
  Index: synop.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: synop.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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="synopsis">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="cmdsynopsis">
    <fo:block>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="cmdsynopsis/command">
    <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">
    <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:apply-templates/>
  </xsl:template>
  
  <xsl:template match="sbr">
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="synopfragmentref">
    <xsl:variable name="target" select="id(@linkend)"/>
    <xsl:variable name="snum">
      <xsl:apply-templates select="$target" mode="synopfragment.number"/>
    </xsl:variable>
    <fo:inline font-style="italic">
      <xsl:text>(</xsl:text>
      <xsl:value-of select="$snum"/>
      <xsl:text>)</xsl:text>
    </fo:inline>
  </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>
    <fo:block>
      <xsl:text>(</xsl:text>
      <xsl:value-of select="$snum"/>
      <xsl:text>)</xsl:text>
      <xsl:text> </xsl:text>
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>   
  
  <xsl:template match="funcsynopsis">
    <xsl:call-template name="informal.object"/>
  </xsl:template>
  
  <xsl:template match="funcsynopsisinfo">
    <fo:block><xsl:apply-templates/></fo:block>
  </xsl:template>
  
  <xsl:template match="funcprototype">
    <fo:block font-family="monospace">
      <xsl:apply-templates/>
      <xsl:if test="$funcsynopsis.style='kr'">
        <xsl:apply-templates select="./paramdef" mode="kr-funcsynopsis-mode"/>
      </xsl:if>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="funcdef">
    <fo:inline font-family="monospace">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="funcdef/function">
    <xsl:choose>
      <xsl:when test="$funcsynopsis.decoration != 0">
        <fo:inline font-weight="bold">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="void">
    <xsl:choose>
      <xsl:when test="$funcsynopsis.style='ansi'">
        <xsl:text>(void);</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>();</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="varargs">
    <xsl:text>(...);</xsl:text>
  </xsl:template>
  
  <xsl:template match="paramdef">
    <xsl:variable name="paramnum">
      <xsl:number count="paramdef" format="1"/>
    </xsl:variable>
    <xsl:if test="$paramnum=1">(</xsl:if>
    <xsl:choose>
      <xsl:when test="$funcsynopsis.style='ansi'">
        <xsl:apply-templates/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates select="./parameter"/>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:choose>
      <xsl:when test="following-sibling::paramdef">
        <xsl:text>, </xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <xsl:text>);</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="paramdef/parameter">
    <xsl:choose>
      <xsl:when test="$funcsynopsis.decoration != 0">
        <xsl:apply-templates/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:if test="following-sibling::parameter">
      <xsl:text>, </xsl:text>
    </xsl:if>
  </xsl:template>  
  
  <xsl:template match="paramdef" mode="kr-funcsynopsis-mode">
    <xsl:apply-templates/>
    <xsl:text>;</xsl:text>
  </xsl:template>
  
  <xsl:template match="funcparams">
    <xsl:text>(</xsl:text>
    <xsl:apply-templates/>
    <xsl:text>)</xsl:text>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/table.xsl
  
  Index: table.xsl
  ===================================================================
  <?xml version='1.0'?>
  <!DOCTYPE xsl:stylesheet [
  <!ENTITY RE "<xsl:text>&#13;&#10;</xsl:text>">
  ]>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
                  exclude-result-prefixes="doc"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: table.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
       ********************************************************************
  
       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: table.xsl,v 1.1 2001/02/11 00:05:09 tobias Exp $
  </releaseinfo>
  <author><surname>Walsh</surname>
  <firstname>Norman</firstname></author>
  <copyright><year>1999</year><year>2000</year>
  <holder>Norman Walsh</holder>
  </copyright>
  </referenceinfo>
  <title>Formatting Object Table 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 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="tgroup">
    <xsl:call-template name="generate.colgroup">
      <xsl:with-param name="cols" select="@cols"/>
    </xsl:call-template>
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="colspec"></xsl:template>
  
  <xsl:template match="spanspec"></xsl:template>
  
  <xsl:template match="thead">
    <fo:table-header>
      <xsl:apply-templates/>
    </fo:table-header>
  </xsl:template>
  
  <xsl:template match="tbody">
    <fo:table-body>
      <xsl:apply-templates/>
    </fo:table-body>
  </xsl:template>
  
  <xsl:template match="row">
    <fo:table-row>
      <xsl:apply-templates/>
    </fo:table-row>
  </xsl:template>
  
  <xsl:template match="thead/row/entry">
    <xsl:call-template name="process.cell"/>
  </xsl:template>
  
  <xsl:template match="tbody/row/entry">
    <xsl:call-template name="process.cell"/>
  </xsl:template>
  
  <xsl:template match="tfoot/row/entry">
    <xsl:call-template name="process.cell"/>
  </xsl:template>
  
  <xsl:template name="process.cell">
    <xsl:param name="content">
      <xsl:apply-templates/>
    </xsl:param>
    <fo:table-cell>
      <xsl:if test="@morerows">
        <xsl:attribute name="n-rows-spanned">
          <xsl:value-of select="@morerows+1"/>
        </xsl:attribute>
      </xsl:if>
      <xsl:if test="@namest">
        <xsl:attribute name="n-columns-spanned">
          <xsl:call-template name="calculate.colspan"/>
        </xsl:attribute>
      </xsl:if>
  
      <fo:block>
        <xsl:copy-of select="$content"/>
      </fo:block>
    </fo:table-cell>
  </xsl:template>
  
  <xsl:template name="generate.colgroup">
    <xsl:param name="cols" select="1"/>
    <xsl:param name="count" select="1"/>
  
  <!--
    <xsl:message>
      <xsl:text>generate.colgroup: </xsl:text>
      <xsl:value-of select="$cols"/><xsl:text>, </xsl:text>
      <xsl:value-of select="$count"/>
    </xsl:message>
  -->
  
    <xsl:choose>
      <xsl:when test="$count>$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">
    <!-- generate the table-column for column countcol -->
    <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:message>
      <xsl:text>generate.col: </xsl:text>
      <xsl:value-of select="$countcol"/><xsl:text>, </xsl:text>
      <xsl:value-of select="count($colspecs)"/><xsl:text>, </xsl:text>
      <xsl:value-of select="$count"/><xsl:text>, </xsl:text>
      <xsl:value-of select="$colnum"/><xsl:text>, </xsl:text>
    </xsl:message>
  -->
  
    <xsl:choose>
      <xsl:when test="$count>count($colspecs)">
  <!--
        <xsl:message>Assigning <xsl:value-of select="$countcol"/></xsl:message>
  -->
        <fo:table-column column-number="{$countcol}">
        <xsl:variable name="colwidth">
          <xsl:call-template name="calc.column.width"/>
        </xsl:variable>
        <xsl:if test="$colwidth != 'proportional-column-width(1)'">
          <xsl:attribute name="column-width">
            <xsl:value-of select="$colwidth"/>
          </xsl:attribute>
        </xsl:if>
        </fo:table-column>
      </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:variable name="colspec.colwidth">
          <xsl:choose>
            <xsl:when test="$colspec/@colwidth">
              <xsl:value-of select="$colspec/@colwidth"/>
            </xsl:when>
            <xsl:otherwise>1*</xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
  
  <!--
        <xsl:message>==> <xsl:value-of select="$colspec.colnum"/></xsl:message>
  -->
  
        <xsl:choose>
          <xsl:when test="$colspec.colnum=$countcol">
  <!--
          <xsl:message>Assigning <xsl:value-of select="$countcol"/></xsl:message>
  -->
            <fo:table-column column-number="{$countcol}">
            <xsl:variable name="colwidth">
                <xsl:call-template name="calc.column.width">
                  <xsl:with-param name="colwidth">
                    <xsl:value-of select="$colspec.colwidth"/>
                  </xsl:with-param>
              </xsl:call-template>
            </xsl:variable>
            <xsl:if test="$colwidth != 'proportional-column-width(1)'">
              <xsl:attribute name="column-width">
                <xsl:value-of select="$colwidth"/>
              </xsl:attribute>
            </xsl:if>
          </fo:table-column>
          </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>
  
  <doc:template name="calc.column.width" xmlns="">
  <refpurpose>Calculate an XSL FO table column width specification from a
  CALS table column width specification.</refpurpose>
  
  <refdescription>
  <para>CALS expresses table column widths in the following basic
  forms:</para>
  
  <itemizedlist>
  <listitem>
  <para><emphasis>99.99units</emphasis>, a fixed length specifier.</para>
  </listitem>
  <listitem>
  <para><emphasis>99.99</emphasis>, a fixed length specifier without any units.</para>
  </listitem>
  <listitem>
  <para><emphasis>99.99*</emphasis>, a relative length specifier.</para>
  </listitem>
  <listitem>
  <para><emphasis>99.99*+99.99units</emphasis>, a combination of both.</para>
  </listitem>
  </itemizedlist>
  
  <para>The CALS units are points (pt), picas (pi), centimeters (cm),
  millimeters (mm), and inches (in). These are the same units as XSL,
  except that XSL abbreviates picas "pc" instead of "pi". If a length
  specifier has no units, the CALS default unit (pt) is assumed.</para>
  
  <para>Relative length specifiers are represented in XSL with the
  proportional-column-width() function.</para>
  
  <para>Here are some examples:</para>
  
  <itemizedlist>
  <listitem>
  <para>"36pt" becomes "36pt"</para>
  </listitem>
  <listitem>
  <para>"3pi" becomes "3pc"</para>
  </listitem>
  <listitem>
  <para>"36" becomes "36pt"</para>
  </listitem>
  <listitem>
  <para>"3*" becomes "proportional-column-width(3)"</para>
  </listitem>
  <listitem>
  <para>"3*+2pi" becomes "proportional-column-width(3)+2pc"</para>
  </listitem>
  <listitem>
  <para>"1*+2" becomes "proportional-column-width(1)+2pt"</para>
  </listitem>
  </itemizedlist>
  </refdescription>
  
  <refparameter>
  <variablelist>
  <varlistentry><term>colwidth</term>
  <listitem>
  <para>The CALS column width specification.</para>
  </listitem>
  </varlistentry>
  </variablelist>
  </refparameter>
  
  <refreturn>
  <para>The XSL column width specification.</para>
  </refreturn>
  </doc:template>
  
  <xsl:template name="calc.column.width">
    <xsl:param name="colwidth">1*</xsl:param>
  
    <!-- Ok, the colwidth could have any one of the following forms: -->
    <!--        1*       = proportional width -->
    <!--     1unit       = 1.0 units wide -->
    <!--         1       = 1pt wide -->
    <!--  1*+1unit       = proportional width + some fixed width -->
    <!--      1*+1       = proportional width + some fixed width -->
  
    <!-- If it has a proportional width, translate it to XSL -->
    <xsl:if test="contains($colwidth, '*')">
      <xsl:text>proportional-column-width(</xsl:text>
      <xsl:value-of select="substring-before($colwidth, '*')"/>
      <xsl:text>)</xsl:text>
    </xsl:if>
  
    <!-- Now grab the non-proportional part of the specification -->
    <xsl:variable name="width-units">
      <xsl:choose>
        <xsl:when test="contains($colwidth, '*')">
          <xsl:value-of
               select="normalize-space(substring-after($colwidth, '*'))"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="normalize-space($colwidth)"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
  
    <!-- Ok, now the width-units could have any one of the following forms: -->
    <!--                 = <empty string> -->
    <!--     1unit       = 1.0 units wide -->
    <!--         1       = 1pt wide -->
    <!-- with an optional leading sign -->
  
    <!-- Grab the width part by blanking out the units part and discarding -->
    <!-- whitespace. It's not pretty, but it works. -->
    <xsl:variable name="width"
         select="normalize-space(translate($width-units,
                                           '+-0123456789.abcdefghijklmnopqrstuvwxyz',
                                           '+-0123456789.'))"/>
  
    <!-- Grab the units part by blanking out the width part and discarding -->
    <!-- whitespace. It's not pretty, but it works. -->
    <xsl:variable name="units"
         select="normalize-space(translate($width-units,
                                           'abcdefghijklmnopqrstuvwxyz+-0123456789.',
                                           'abcdefghijklmnopqrstuvwxyz'))"/>
  
    <!-- Output the width -->
    <xsl:value-of select="$width"/>
  
    <!-- Output the units, translated appropriately -->
    <xsl:choose>
      <xsl:when test="$units = 'pi'">pc</xsl:when>
      <xsl:when test="$units = '' and $width != ''">pt</xsl:when>
      <xsl:otherwise><xsl:value-of select="$units"/></xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template name="colspec.colnum">
    <!-- 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:param name="colnum">1</xsl:param>
    <xsl:choose>
      <xsl:when test="$count>count($colspecs)"></xsl:when>
      <xsl:otherwise>
        <xsl:variable name="colspec" select="$colspecs[$count=position()]"/>
  <!--
        <xsl:value-of select="$count"/>:
        <xsl:value-of select="$colspec/@colname"/>=
        <xsl:value-of select="$colnum"/>
  -->
        <xsl:choose>
          <xsl:when test="$colspec/@colname=$colname">
            <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:when>
          <xsl:otherwise>
            <xsl:call-template name="colspec.colnum">
              <xsl:with-param name="colname" select="$colname"/>
              <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="calculate.colspan">
    <xsl:variable name="scol">
      <xsl:call-template name="colspec.colnum">
        <xsl:with-param name="colname" select="@namest"/>
      </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="ecol">
      <xsl:call-template name="colspec.colnum">
        <xsl:with-param name="colname" select="@nameend"/>
      </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="$ecol - $scol + 1"/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/titlepage.templates.xml
  
  Index: titlepage.templates.xml
  ===================================================================
  <t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
               xmlns:fo="http://www.w3.org/1999/XSL/Format"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="article" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="set" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="book" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="part" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="reference" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="preface" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="chapter" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="appendix" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  <t:titlepage element="section" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="sect1" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="sect2" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="sect3" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="sect4" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="sect5" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <t:titlepage element="simplesect" wrapper="fo:block">
    <t:titlepage-content side="recto">
      <title predicate="[1]"/>
      <subtitle predicate="[1]"/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <releaseinfo/>
      <copyright/>
      <legalnotice/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <abstract/>
    </t:titlepage-content>
  
    <t:titlepage-content side="verso">
    </t:titlepage-content>
  
    <t:titlepage-separator>
    </t:titlepage-separator>
  
    <t:titlepage-before side="recto">
    </t:titlepage-before>
  
    <t:titlepage-before side="verso">
    </t:titlepage-before>
  </t:titlepage>
  
  <!-- ==================================================================== -->
  
  </t:templates>
  
  
  
  1.1                  manual/src/docs/docbook/fo/titlepage.templates.xsl
  
  Index: titlepage.templates.xsl
  ===================================================================
  <?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 titlepage.xsl; do not edit it by hand. -->
  
  <xsl:template name="article.titlepage.recto">
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="(articleinfo/title|artheader/title|title)[1]"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="(articleinfo/subtitle|artheader/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/corpauthor|artheader/corpauthor"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/authorgroup|artheader/authorgroup"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/author|artheader/author"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/releaseinfo|artheader/releaseinfo"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/copyright|artheader/copyright"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/legalnotice|artheader/legalnotice"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/pubdate|artheader/pubdate"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/revision|artheader/revision"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/revhistory|artheader/revhistory"/>
    <xsl:apply-templates mode="article.titlepage.recto.mode" 
select="articleinfo/abstract|artheader/abstract"/>
  </xsl:template>
  
  <xsl:template name="article.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="article.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="article.titlepage.before.recto"/>
      <xsl:call-template name="article.titlepage.recto"/>
      <xsl:call-template name="article.titlepage.before.verso"/>
      <xsl:call-template name="article.titlepage.verso"/>
      <xsl:call-template name="article.titlepage.separator"/>
    </fo:block>
  </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 name="set.titlepage.recto">
    <xsl:apply-templates mode="set.titlepage.recto.mode" 
select="(setinfo/title|title)[1]"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" 
select="(setinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/corpauthor"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/authorgroup"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/author"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/releaseinfo"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/copyright"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/legalnotice"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/pubdate"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/revision"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/revhistory"/>
    <xsl:apply-templates mode="set.titlepage.recto.mode" select="setinfo/abstract"/>
  </xsl:template>
  
  <xsl:template name="set.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="set.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="set.titlepage.before.recto"/>
      <xsl:call-template name="set.titlepage.recto"/>
      <xsl:call-template name="set.titlepage.before.verso"/>
      <xsl:call-template name="set.titlepage.verso"/>
      <xsl:call-template name="set.titlepage.separator"/>
    </fo:block>
  </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 name="book.titlepage.recto">
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="(bookinfo/title|title)[1]"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="(bookinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="bookinfo/corpauthor"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="bookinfo/authorgroup"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" select="bookinfo/author"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="bookinfo/releaseinfo"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" select="bookinfo/copyright"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="bookinfo/legalnotice"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" select="bookinfo/pubdate"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" select="bookinfo/revision"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" 
select="bookinfo/revhistory"/>
    <xsl:apply-templates mode="book.titlepage.recto.mode" select="bookinfo/abstract"/>
  </xsl:template>
  
  <xsl:template name="book.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="book.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="book.titlepage.before.recto"/>
      <xsl:call-template name="book.titlepage.recto"/>
      <xsl:call-template name="book.titlepage.before.verso"/>
      <xsl:call-template name="book.titlepage.verso"/>
      <xsl:call-template name="book.titlepage.separator"/>
    </fo:block>
  </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 name="part.titlepage.recto">
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="(partinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="(partinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="part.titlepage.recto.mode" 
select="partinfo/abstract|docinfo/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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="part.titlepage.before.recto"/>
      <xsl:call-template name="part.titlepage.recto"/>
      <xsl:call-template name="part.titlepage.before.verso"/>
      <xsl:call-template name="part.titlepage.verso"/>
      <xsl:call-template name="part.titlepage.separator"/>
    </fo:block>
  </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 name="reference.titlepage.recto">
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="(referenceinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="(referenceinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="reference.titlepage.recto.mode" 
select="referenceinfo/abstract|docinfo/abstract"/>
  </xsl:template>
  
  <xsl:template name="reference.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="reference.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="reference.titlepage.before.recto"/>
      <xsl:call-template name="reference.titlepage.recto"/>
      <xsl:call-template name="reference.titlepage.before.verso"/>
      <xsl:call-template name="reference.titlepage.verso"/>
      <xsl:call-template name="reference.titlepage.separator"/>
    </fo:block>
  </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 name="preface.titlepage.recto">
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="(prefaceinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="(prefaceinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="preface.titlepage.recto.mode" 
select="prefaceinfo/abstract|docinfo/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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="preface.titlepage.before.recto"/>
      <xsl:call-template name="preface.titlepage.recto"/>
      <xsl:call-template name="preface.titlepage.before.verso"/>
      <xsl:call-template name="preface.titlepage.verso"/>
      <xsl:call-template name="preface.titlepage.separator"/>
    </fo:block>
  </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 name="chapter.titlepage.recto">
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="(chapterinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="(chapterinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="chapter.titlepage.recto.mode" 
select="chapterinfo/abstract|docinfo/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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="chapter.titlepage.before.recto"/>
      <xsl:call-template name="chapter.titlepage.recto"/>
      <xsl:call-template name="chapter.titlepage.before.verso"/>
      <xsl:call-template name="chapter.titlepage.verso"/>
      <xsl:call-template name="chapter.titlepage.separator"/>
    </fo:block>
  </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 name="appendix.titlepage.recto">
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="(appendixinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="(appendixinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="appendix.titlepage.recto.mode" 
select="appendixinfo/abstract|docinfo/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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="appendix.titlepage.before.recto"/>
      <xsl:call-template name="appendix.titlepage.recto"/>
      <xsl:call-template name="appendix.titlepage.before.verso"/>
      <xsl:call-template name="appendix.titlepage.verso"/>
      <xsl:call-template name="appendix.titlepage.separator"/>
    </fo:block>
  </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 name="section.titlepage.recto">
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="(sectioninfo/title|title)[1]"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="(sectioninfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/corpauthor"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/authorgroup"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/author"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/releaseinfo"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/copyright"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/legalnotice"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/pubdate"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/revision"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/revhistory"/>
    <xsl:apply-templates mode="section.titlepage.recto.mode" 
select="sectioninfo/abstract"/>
  </xsl:template>
  
  <xsl:template name="section.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="section.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="section.titlepage.before.recto"/>
      <xsl:call-template name="section.titlepage.recto"/>
      <xsl:call-template name="section.titlepage.before.verso"/>
      <xsl:call-template name="section.titlepage.verso"/>
      <xsl:call-template name="section.titlepage.separator"/>
    </fo:block>
  </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 name="sect1.titlepage.recto">
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="(sect1info/title|title)[1]"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="(sect1info/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/corpauthor"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/authorgroup"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" select="sect1info/author"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/releaseinfo"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/copyright"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/legalnotice"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" select="sect1info/pubdate"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/revision"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/revhistory"/>
    <xsl:apply-templates mode="sect1.titlepage.recto.mode" 
select="sect1info/abstract"/>
  </xsl:template>
  
  <xsl:template name="sect1.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="sect1.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="sect1.titlepage.before.recto"/>
      <xsl:call-template name="sect1.titlepage.recto"/>
      <xsl:call-template name="sect1.titlepage.before.verso"/>
      <xsl:call-template name="sect1.titlepage.verso"/>
      <xsl:call-template name="sect1.titlepage.separator"/>
    </fo:block>
  </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 name="sect2.titlepage.recto">
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="(sect2info/title|title)[1]"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="(sect2info/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/corpauthor"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/authorgroup"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" select="sect2info/author"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/releaseinfo"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/copyright"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/legalnotice"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" select="sect2info/pubdate"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/revision"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/revhistory"/>
    <xsl:apply-templates mode="sect2.titlepage.recto.mode" 
select="sect2info/abstract"/>
  </xsl:template>
  
  <xsl:template name="sect2.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="sect2.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="sect2.titlepage.before.recto"/>
      <xsl:call-template name="sect2.titlepage.recto"/>
      <xsl:call-template name="sect2.titlepage.before.verso"/>
      <xsl:call-template name="sect2.titlepage.verso"/>
      <xsl:call-template name="sect2.titlepage.separator"/>
    </fo:block>
  </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 name="sect3.titlepage.recto">
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="(sect3info/title|title)[1]"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="(sect3info/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/corpauthor"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/authorgroup"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" select="sect3info/author"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/releaseinfo"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/copyright"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/legalnotice"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" select="sect3info/pubdate"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/revision"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/revhistory"/>
    <xsl:apply-templates mode="sect3.titlepage.recto.mode" 
select="sect3info/abstract"/>
  </xsl:template>
  
  <xsl:template name="sect3.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="sect3.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="sect3.titlepage.before.recto"/>
      <xsl:call-template name="sect3.titlepage.recto"/>
      <xsl:call-template name="sect3.titlepage.before.verso"/>
      <xsl:call-template name="sect3.titlepage.verso"/>
      <xsl:call-template name="sect3.titlepage.separator"/>
    </fo:block>
  </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 name="sect4.titlepage.recto">
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="(sect4info/title|title)[1]"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="(sect4info/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/corpauthor"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/authorgroup"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" select="sect4info/author"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/releaseinfo"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/copyright"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/legalnotice"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" select="sect4info/pubdate"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/revision"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/revhistory"/>
    <xsl:apply-templates mode="sect4.titlepage.recto.mode" 
select="sect4info/abstract"/>
  </xsl:template>
  
  <xsl:template name="sect4.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="sect4.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="sect4.titlepage.before.recto"/>
      <xsl:call-template name="sect4.titlepage.recto"/>
      <xsl:call-template name="sect4.titlepage.before.verso"/>
      <xsl:call-template name="sect4.titlepage.verso"/>
      <xsl:call-template name="sect4.titlepage.separator"/>
    </fo:block>
  </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 name="sect5.titlepage.recto">
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="(sect5info/title|title)[1]"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="(sect5info/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/corpauthor"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/authorgroup"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" select="sect5info/author"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/releaseinfo"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/copyright"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/legalnotice"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" select="sect5info/pubdate"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/revision"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/revhistory"/>
    <xsl:apply-templates mode="sect5.titlepage.recto.mode" 
select="sect5info/abstract"/>
  </xsl:template>
  
  <xsl:template name="sect5.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="sect5.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="sect5.titlepage.before.recto"/>
      <xsl:call-template name="sect5.titlepage.recto"/>
      <xsl:call-template name="sect5.titlepage.before.verso"/>
      <xsl:call-template name="sect5.titlepage.verso"/>
      <xsl:call-template name="sect5.titlepage.separator"/>
    </fo:block>
  </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 name="simplesect.titlepage.recto">
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="(simplesectinfo/title|docinfo/title|title)[1]"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="(simplesectinfo/subtitle|docinfo/subtitle|subtitle)[1]"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/corpauthor|docinfo/corpauthor"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/authorgroup|docinfo/authorgroup"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/author|docinfo/author"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/releaseinfo|docinfo/releaseinfo"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/copyright|docinfo/copyright"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/legalnotice|docinfo/legalnotice"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/pubdate|docinfo/pubdate"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/revision|docinfo/revision"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/revhistory|docinfo/revhistory"/>
    <xsl:apply-templates mode="simplesect.titlepage.recto.mode" 
select="simplesectinfo/abstract|docinfo/abstract"/>
  </xsl:template>
  
  <xsl:template name="simplesect.titlepage.verso">
  </xsl:template>
  
  <xsl:template name="simplesect.titlepage.separator">
  </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">
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <xsl:call-template name="simplesect.titlepage.before.recto"/>
      <xsl:call-template name="simplesect.titlepage.recto"/>
      <xsl:call-template name="simplesect.titlepage.before.verso"/>
      <xsl:call-template name="simplesect.titlepage.verso"/>
      <xsl:call-template name="simplesect.titlepage.separator"/>
    </fo:block>
  </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:stylesheet>
  
  
  1.1                  manual/src/docs/docbook/fo/titlepage.xsl
  
  Index: titlepage.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: titlepage.xsl,v 1.1 2001/02/11 00:05:10 tobias Exp $
       ********************************************************************
  
       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="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">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="abstract" mode="titlepage.mode">
    <fo:block space-before.optimum="1.5em">
      <xsl:call-template name="formal.object.heading">
        <xsl:with-param name="title">
          <xsl:choose>
            <xsl:when test="title">
              <xsl:apply-templates select="title" 
                                   mode="titlepage.abstract.title.mode"/>
            </xsl:when>
            <xsl:otherwise>
              <xsl:call-template name="gentext.element.name">
                <xsl:with-param name="element.name">
                  <xsl:value-of select="name(.)"/>
                </xsl:with-param>
              </xsl:call-template>
            </xsl:otherwise>
          </xsl:choose>
        </xsl:with-param>
      </xsl:call-template>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="abstract/title" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="abstract/title" mode="titlepage.abstract.title.mode">
    <xsl:apply-templates mode="titlepage.mode"/>
  </xsl:template>
  
  <xsl:template match="address" mode="titlepage.mode">
  <!-- this won't do quite what's desired... -->
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="affiliation" mode="titlepage.mode">
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="artpagenums" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="author" mode="titlepage.mode">
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:call-template name="person.name"/>
    </fo:block>
    <xsl:apply-templates mode="titlepage.mode"
     select="./affiliation"/>
  </xsl:template>
  
  <xsl:template match="authorblurb" mode="titlepage.mode">
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>  
  
  <xsl:template match="authorgroup" mode="titlepage.mode">
    <xsl:apply-templates mode="titlepage.mode"/>
  </xsl:template>
  
  <xsl:template match="authorinitials" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </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">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="confgroup" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractnum" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contractsponsor" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="contrib" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="copyright" mode="titlepage.mode">
    <xsl:variable name="years" select="year"/>
    <xsl:variable name="holders" select="holder"/>
  
    <fo:block>
      <xsl:call-template name="gentext.element.name"/>
      <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="$years" mode="titlepage.mode"/>
      <xsl:if test="holder">
        <xsl:call-template name="gentext.space"/>
        <xsl:call-template name="gentext.by"/>
        <xsl:call-template name="gentext.space"/>
        <xsl:apply-templates select="$holders" mode="titlepage.mode"/>
      </xsl:if>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="year" mode="titlepage.mode">
    <xsl:apply-templates/><xsl:text>, </xsl:text>
  </xsl:template>
  
  <xsl:template match="year[position()=last()]" mode="titlepage.mode">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="holder" mode="titlepage.mode">
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="corpauthor" mode="titlepage.mode">
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="corpname" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="date" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="edition" mode="titlepage.mode">
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
      <xsl:text> </xsl:text>
      <xsl:call-template name="gentext.element.name"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="editor" mode="titlepage.mode">
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:call-template name="person.name"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="editor[position()=1]" mode="titlepage.mode">
    <fo:block font-size="12pt"
              font-weight="bold"
              space-before.optimum="1.5em">
      <xsl:call-template name="gentext.edited.by"/>
    </fo:block>
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:call-template name="person.name"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="firstname" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </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">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="isbn" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issn" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="itermset" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="invpartnumber" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="issuenum" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="jobtitle" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="keywordset" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="legalnotice " mode="titlepage.mode">
    <xsl:apply-templates mode="titlepage.mode"/>
  </xsl:template>
    
  <xsl:template match="legalnotice/title" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="lineage" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="modespec" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="orgdiv" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="orgname" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="othercredit" mode="titlepage.mode">
    <fo:block font-size="14pt" font-weight="bold">
      <xsl:call-template name="person.name"/>
    </fo:block>
    <xsl:apply-templates mode="titlepage.mode"
     select="./affiliation"/>
  </xsl:template>
  
  <xsl:template match="othername" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pagenums" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="printhistory" mode="titlepage.mode">
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="productname" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="productnumber" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubdate" mode="titlepage.mode">
    <fo:block>
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="publishername" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="pubsnumber" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="releaseinfo" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="revhistory" mode="titlepage.mode">
    <fo:block>
      <fo:table table-layout="fixed">
        <fo:table-column column-number="1" column-width="33%"/>
        <fo:table-column column-number="2" column-width="33%"/>
        <fo:table-column column-number="3" column-width="33%"/>
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell number-columns-spanned="3">
              <fo:block>
                <xsl:call-template name="gentext.element.name"/>
              </fo:block>
            </fo:table-cell>
          </fo:table-row>
          <xsl:apply-templates mode="titlepage.mode"/>
        </fo:table-body>
      </fo:table>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="revhistory/revision" mode="titlepage.mode">
    <xsl:variable name="revnumber" select=".//revnumber"/>
    <xsl:variable name="revdate"   select=".//date"/>
    <xsl:variable name="revauthor" select=".//authorinitials"/>
    <xsl:variable name="revremark" select=".//revremark"/>
    <fo:table-row>
      <fo:table-cell>
        <fo:block>
          <xsl:if test="$revnumber">
            <xsl:call-template name="gentext.element.name"/>
            <xsl:text> </xsl:text>
            <xsl:apply-templates select="$revnumber[1]" mode="titlepage.mode"/>
          </xsl:if>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell>
        <fo:block>
          <xsl:apply-templates select="$revdate[1]" mode="titlepage.mode"/>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell>
        <fo:block>
          <xsl:apply-templates select="$revauthor[1]" mode="titlepage.mode"/>
        </fo:block>
      </fo:table-cell>
    </fo:table-row>
    <xsl:if test="$revremark">
      <fo:table-row>
        <fo:table-cell number-columns-spanned="3">
          <fo:block>
            <xsl:apply-templates select="$revremark[1]" mode="titlepage.mode"/>
          </fo:block>
        </fo:table-cell>
      </fo:table-row>
    </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="seriesvolnums" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="shortaffil" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
    
  <xsl:template match="subjectset" mode="titlepage.mode">
  </xsl:template>
  
  <xsl:template match="subtitle" mode="titlepage.mode">
    <fo:block font-size="18pt" font-weight="bold">
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="surname" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="title" mode="titlepage.mode">
    <fo:block font-size="20pt"
              font-weight="bold"
              space-before.optimum="8em">
      <xsl:apply-templates mode="titlepage.mode"/>
    </fo:block>
  </xsl:template>
  
  <xsl:template match="titleabbrev" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
    
  <xsl:template match="volumenum" mode="titlepage.mode">
    <fo:inline>
      <xsl:apply-templates mode="titlepage.mode"/>
      <!--<br/>-->
    </fo:inline>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/toc.xsl
  
  Index: toc.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: toc.xsl,v 1.1 2001/02/11 00:05:10 tobias Exp $
       ********************************************************************
  
       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:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/verbatim.xsl
  
  Index: verbatim.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  xmlns:verb="com.nwalsh.saxon.Verbatim"
                  exclude-result-prefixes="verb"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: verbatim.xsl,v 1.1 2001/02/11 00:05:10 tobias Exp $
       ********************************************************************
  
       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="programlisting|screen">
    <xsl:param name="suppress-numbers" select="'0'"/>
  
    <xsl:choose>
      <xsl:when test="$suppress-numbers = '0'
                      and @linenumbering = 'numbered'
                      and $saxon.extensions != '0'
                      and $saxon.linenumbering != '0'">
        <xsl:variable name="rtf">
          <xsl:apply-templates/>
        </xsl:variable>
        <fo:block wrap-option='no-wrap'
                  text-align='start'
                  white-space-collapse='false'
                  font-family='monospace'
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
          <xsl:copy-of select="verb:numberLines($rtf,
                                                $linenumbering.everyNth,
                                                $linenumbering.width,
                                                $linenumbering.separator)"/>
        </fo:block>
      </xsl:when>
      <xsl:otherwise>
        <fo:block wrap-option='no-wrap'
                  text-align='start'
                  white-space-collapse='false'
                  font-family='monospace'
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
          <xsl:apply-templates/>
        </fo:block>
      </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:choose>
      <xsl:when test="$suppress-numbers = '0'
                      and @linenumbering = 'numbered'
                      and $saxon.extensions != '0'
                      and $saxon.linenumbering != '0'">
        <xsl:choose>
          <xsl:when test="@class='monospaced'">
            <fo:block wrap-option='no-wrap'
                      text-align='start'
                      font-family='monospace'
                      white-space-collapse='false'
                      space-before.minimum="0.8em"
                      space-before.optimum="1em"
                      space-before.maximum="1.2em">
              <xsl:copy-of select="verb:numberLines($rtf,
                                                    $linenumbering.everyNth,
                                                    $linenumbering.width,
                                                    $linenumbering.separator)"/>
  
            </fo:block>
          </xsl:when>
          <xsl:otherwise>
            <fo:block wrap-option='no-wrap'
                      text-align='start'
                      white-space-collapse='false'
                      space-before.minimum="0.8em"
                      space-before.optimum="1em"
                      space-before.maximum="1.2em">
              <xsl:copy-of select="verb:numberLines($rtf,
                                                    $linenumbering.everyNth,
                                                    $linenumbering.width,
                                                    $linenumbering.separator)"/>
            </fo:block>
          </xsl:otherwise>
        </xsl:choose>
      </xsl:when>
      <xsl:otherwise>
        <xsl:choose>
          <xsl:when test="@class='monospaced'">
            <fo:block wrap-option='no-wrap'
                      text-align='start'
                      font-family='monospace'
                      white-space-collapse='false'
                      space-before.minimum="0.8em"
                      space-before.optimum="1em"
                      space-before.maximum="1.2em">
              <xsl:copy-of select="$rtf"/>
            </fo:block>
          </xsl:when>
          <xsl:otherwise>
            <fo:block wrap-option='no-wrap'
                      text-align='start'
                      white-space-collapse='false'
                      space-before.minimum="0.8em"
                      space-before.optimum="1em"
                      space-before.maximum="1.2em">
              <xsl:copy-of select="$rtf"/>
            </fo:block>
          </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 $saxon.extensions != '0'
                      and $saxon.linenumbering != '0'">
        <fo:block wrap-option='no-wrap'
                  text-align='start'
                  white-space-collapse='false'
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
          <xsl:copy-of select="verb:numberLines($rtf,
                                                $linenumbering.everyNth,
                                                $linenumbering.width,
                                                $linenumbering.separator)"/>
        </fo:block>
      </xsl:when>
      <xsl:otherwise>
        <fo:block wrap-option='no-wrap'
                  text-align='start'
                  white-space-collapse='false'
                  space-before.minimum="0.8em"
                  space-before.optimum="1em"
                  space-before.maximum="1.2em">
          <xsl:apply-templates/>
        </fo:block>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  manual/src/docs/docbook/fo/xref.xsl
  
  Index: xref.xsl
  ===================================================================
  <?xml version='1.0'?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:fo="http://www.w3.org/1999/XSL/Format"
                  version='1.0'>
  
  <!-- ********************************************************************
       $Id: xref.xsl,v 1.1 2001/02/11 00:05:10 tobias Exp $
       ********************************************************************
  
       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="xref">
    <xsl:variable name="targets" select="id(@linkend)"/>
    <xsl:variable name="target" select="$targets[1]"/>
    <xsl:variable name="refelem" select="name($target)"/>
  
    <xsl:call-template name="check.id.unique">
      <xsl:with-param name="linkend" select="@linkend"/>
    </xsl:call-template>
  
    <xsl:choose>
      <xsl:when test="$refelem=''">
        <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="$target/@xreflabel">
        <fo:basic-link internal-destination="{@linkend}">
        <xsl:call-template name="xref.xreflabel">
          <xsl:with-param name="target" select="$target"/>
        </xsl:call-template>
        </fo:basic-link>
      </xsl:when>
  
      <xsl:otherwise>
        <fo:basic-link internal-destination="{@linkend}">
          <xsl:choose>
          <xsl:when test="@endterm">
            <xsl:variable name="etargets" select="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="xref.text"/>
              </xsl:otherwise>
            </xsl:choose>
          </xsl:when>
  
            <xsl:when test="$refelem='figure'">
              <xsl:call-template name="xref.figure">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='example'">
              <xsl:call-template name="xref.example">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='table'">
              <xsl:call-template name="xref.table">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='equation'">
              <xsl:call-template name="xref.equation">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='cmdsynopsis'">
              <xsl:call-template name="xref.cmdsynopsis">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='funcsynopsis'">
              <xsl:call-template name="xref.funcsynopsis">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='dedication'">
              <xsl:call-template name="xref.dedication">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='preface'">
              <xsl:call-template name="xref.preface">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='chapter'">
              <xsl:call-template name="xref.chapter">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='appendix'">
              <xsl:call-template name="xref.appendix">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='bibliography'">
              <xsl:call-template name="xref.bibliography">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='biblioentry'">
              <xsl:call-template name="xref.biblioentry">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='bibliomixed'">
              <xsl:call-template name="xref.biblioentry">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='glossary'">
              <xsl:call-template name="xref.glossary">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='index'">
              <xsl:call-template name="xref.index">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='section'
                            or $refelem='simplesect'
                            or $refelem='sect1'
                            or $refelem='sect2'
                            or $refelem='sect3'
                            or $refelem='sect4'
                            or $refelem='sect5'
                            or $refelem='refsect1'
                            or $refelem='refsect2'
                            or $refelem='refsect3'">
              <xsl:call-template name="xref.section">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='listitem' 
                            and name($target/..)='orderedlist'">
              <xsl:apply-templates select="$target" mode="xref"/>
            </xsl:when>
  
            <xsl:when test="$refelem='question'">
              <xsl:call-template name="xref.question">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='answer'">
              <xsl:call-template name="xref.answer">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='part'">
              <xsl:call-template name="xref.part">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='reference'">
              <xsl:call-template name="xref.reference">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:when test="$refelem='book'">
              <xsl:call-template name="xref.book">
                <xsl:with-param name="target" select="$target"/>
              </xsl:call-template>
            </xsl:when>
  
            <xsl:otherwise>
            <xsl:message>
              <xsl:text>[Don't know what gentext to create for xref to: "</xsl:text>
              <xsl:value-of select="$refelem"/>
              <xsl:text>"]</xsl:text>
            </xsl:message>
            <xsl:text>???</xsl:text>
            </xsl:otherwise>
          </xsl:choose>
        </fo:basic-link>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <!--- ==================================================================== -->
  
  <xsl:template name="cross-reference">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
    <xsl:param name="xref.text">
      <xsl:call-template name="gentext.xref.text">
        <xsl:with-param name="element.name" select="$refelem"/>
        <xsl:with-param name="default">%g %n</xsl:with-param>
      </xsl:call-template>
    </xsl:param>
  
    <xsl:call-template name="subst.xref.text">
      <xsl:with-param name="xref.text" select="$xref.text"/>
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.figure">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.example">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.table">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.equation">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.cmdsynopsis">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:variable name="command" select="($target//command)[1]"/>
  
    <xsl:apply-templates select="$command" mode="xref"/>
  </xsl:template>
  
  <xsl:template name="xref.funcsynopsis">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:variable name="func" select="($target//function)[1]"/>
  
    <xsl:apply-templates select="$func" mode="xref"/>
  </xsl:template>
  
  <xsl:template name="xref.dedication">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.preface">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.chapter">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.appendix">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.bibliography">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.biblioentry">
    <!-- handles both biblioentry and bibliomixed -->
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:text>[</xsl:text>
    <xsl:choose>
      <xsl:when test="local-name($target/*[1]) = 'abbrev'">
        <xsl:apply-templates select="$target/*[1]"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="@id"/>
      </xsl:otherwise>
    </xsl:choose>
    <xsl:text>]</xsl:text>
  </xsl:template>
  
  <xsl:template name="xref.glossary">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.index">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.section">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:choose>
      <xsl:when test="$section.autolabel">
        <xsl:call-template name="gentext.element.name">
          <xsl:with-param name="element.name" select="$refelem"/>
        </xsl:call-template>
        <xsl:text> </xsl:text>
        <xsl:apply-templates select="$target" mode="label.content"/>
  
      </xsl:when>
      <xsl:otherwise>
        <xsl:call-template name="gentext.element.name">
          <xsl:with-param name="element.name">the section called</xsl:with-param>
        </xsl:call-template>
        <xsl:text> </xsl:text>
        <xsl:call-template name="gentext.startquote"/>
        <xsl:apply-templates select="$target" mode="title.content"/>
        <xsl:call-template name="gentext.endquote"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template name="xref.question">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.answer">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.part">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.reference">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:call-template name="cross-reference">
      <xsl:with-param name="target" select="$target"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template name="xref.book">
    <xsl:param name="target" select="."/>
    <xsl:param name="refelem" select="name($target)"/>
  
    <xsl:variable name="title">
      <xsl:choose>
        <xsl:when test="$target/title">
          <xsl:apply-templates select="$target/title" mode="xref"/>
        </xsl:when>
        <xsl:otherwise>
          <xsl:apply-templates select="$target/bookinfo/title"
                               mode="xref"/>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <fo:inline font-style="italic">
      <xsl:copy-of select="$title"/>
    </fo:inline>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template match="link">
    <xsl:variable name="targets" select="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>
  
    <fo:basic-link internal-destination="{@linkend}">
      <xsl:apply-templates/>
    </fo:basic-link>
  </xsl:template>
  
  <xsl:template match="ulink">
    <fo:basic-link external-destination="{@url}">
      <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>
    </fo:basic-link>
    <xsl:if test="count(child::node()) != 0">
      <xsl:text> [</xsl:text>
      <xsl:value-of select="@url"/>
      <xsl:text>]</xsl:text>
    </xsl:if>
  </xsl:template>
  
  <xsl:template match="olink">
    <xsl:apply-templates/>
  </xsl:template>
  
  <!-- ==================================================================== -->
  
  <xsl:template name="title.xref">
    <xsl:param name="target" select="."/>
    <xsl:choose>
      <xsl:when test="name($target) = 'figure'
                      or name($target) = 'example'
                      or name($target) = 'equation'
                      or name($target) = 'table'
                      or name($target) = 'dedication'
                      or name($target) = 'preface'
                      or name($target) = 'bibliography'
                      or name($target) = 'glossary'
                      or name($target) = 'index'
                      or name($target) = 'setindex'
                      or name($target) = 'colophon'">
        <xsl:call-template name="gentext.startquote"/>
        <xsl:apply-templates select="$target" mode="title.content"/>
        <xsl:call-template name="gentext.endquote"/>
      </xsl:when>
      <xsl:otherwise>
        <i>
          <xsl:apply-templates select="$target" mode="title.content"/>
        </i>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template name="number.xref">
    <xsl:param name="target" select="."/>
    <xsl:apply-templates select="$target" mode="label.content"/>
  </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:stylesheet>
  
  
  

Reply via email to