summaryrefslogtreecommitdiff
path: root/xslt/docbook/common
diff options
context:
space:
mode:
Diffstat (limited to 'xslt/docbook/common')
-rw-r--r--xslt/docbook/common/Makefile.am15
-rw-r--r--xslt/docbook/common/db-chunk.xsl585
-rw-r--r--xslt/docbook/common/db-common.xsl295
-rw-r--r--xslt/docbook/common/db-format.xml.in10
-rw-r--r--xslt/docbook/common/db-label.xsl829
-rw-r--r--xslt/docbook/common/db-title.xsl1281
-rw-r--r--xslt/docbook/common/db-xref.xsl456
7 files changed, 0 insertions, 3471 deletions
diff --git a/xslt/docbook/common/Makefile.am b/xslt/docbook/common/Makefile.am
deleted file mode 100644
index 99c1196..0000000
--- a/xslt/docbook/common/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-# Not using INTLTOOL_XML_RULE because of it causes db-format.xml to be
-# rebuilt in the tarball, which causes docs to be rebuilt, which causes
-# translated docs to be rebuilt, which requires xml2po, which breaks
-# --disable-build-utils
-
-xsldir=$(datadir)/xml/gnome/xslt/docbook/common
-
-xsl_DATA = \
- db-chunk.xsl \
- db-common.xsl \
- db-label.xsl \
- db-title.xsl \
- db-xref.xsl
-
-EXTRA_DIST=$(xsl_DATA)
diff --git a/xslt/docbook/common/db-chunk.xsl b/xslt/docbook/common/db-chunk.xsl
deleted file mode 100644
index 36dde6e..0000000
--- a/xslt/docbook/common/db-chunk.xsl
+++ /dev/null
@@ -1,585 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<!--
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program; see the file COPYING.LGPL. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:exsl="http://exslt.org/common"
- xmlns:set="http://exslt.org/sets"
- extension-element-prefixes="exsl"
- exclude-result-prefixes="set"
- version="1.0">
-
-<!--!!==========================================================================
-DocBook Chunking
-
-REMARK: Describe this module
--->
-
-
-<!--@@==========================================================================
-db.chunk.chunks
-A space-seperated list of the names of elements that should be chunked
-
-REMARK: This parameter sucks
--->
-<xsl:param name="db.chunk.chunks" select="
- 'appendix article bibliography bibliodiv book chapter
- colophon dedication glossary glossdiv index
- lot part preface refentry reference
- sect1 sect2 sect3 sect4 sect5
- section setindex simplesect toc'"/>
-<xsl:variable name="db.chunk.chunks_" select="concat(' ', $db.chunk.chunks, ' ')"/>
-
-
-<!--@@==========================================================================
-db.chunk.chunk_top
-Whether the top-level chunk should be output with the chunking mechanism
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.chunk_top" select="false()"/>
-
-
-<!--@@==========================================================================
-db.chunk.max_depth
-The maximum depth for chunking sections
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.max_depth">
- <xsl:choose>
- <xsl:when test="number(processing-instruction('db.chunk.max_depth'))">
- <xsl:value-of
- select="number(processing-instruction('db.chunk.max_depth'))"/>
- </xsl:when>
- <xsl:when test="/book">
- <xsl:value-of select="2"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="1"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:param>
-
-
-<!--@@==========================================================================
-db.chunk.basename
-The base filename of the output file, without an extension
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.basename" select="/*/@id"/>
-
-
-<!--@@==========================================================================
-db.chunk.extension
-The default file extension for new output documents
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.extension"/>
-
-
-<!--@@==========================================================================
-db.chunk.info_chunk
-Whether to create a chunk for the title page
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.info_chunk" select="$db.chunk.max_depth != 0"/>
-
-
-<!--@@==========================================================================
-db.chunk.info_basename
-The base filename for the title page
-
-REMARK: Describe what this does
--->
-<xsl:param name="db.chunk.info_basename">
- <xsl:choose>
- <xsl:when test="$db.chunk.basename">
- <xsl:value-of select="concat($db.chunk.basename, '-info')"/>
- </xsl:when>
- <xsl:otherwise>info</xsl:otherwise>
- </xsl:choose>
-</xsl:param>
-
-
-<!--@@==========================================================================
-db.chunk.doctype_public
-The public DOCTYPE for output files
-
-REMARK: Describe this
--->
-<xsl:param name="db.chunk.doctype_public"/>
-
-
-<!--@@==========================================================================
-db.chunk.doctype_system
-The system DOCTYPE for output files
-
-REMARK: Describe this
--->
-<xsl:param name="db.chunk.doctype_system"/>
-
-
-<!--**==========================================================================
-db.chunk
-Creates a new page of output
-$node: The source element for the output page
-$template: The named template to call to create the page
-$href: The name of the file for the output page
-$depth_of_chunk: The depth of this chunk in the document
-
-REMARK: We need a lot more explanation about chunk flow
-
-The *{db.chunk} template creates a new output document using the #{exsl:document}
-extension element. This template calls *{db.chunk.content} to create the content
-of the document, passing through all parameters. This allows you to override the
-chunking mechanism without having to duplicate the content-generation code.
--->
-<xsl:template name="db.chunk">
- <xsl:param name="node" select="."/>
- <xsl:param name="template"/>
- <xsl:param name="href">
- <xsl:choose>
- <xsl:when test="$template = 'info'">
- <xsl:value-of select="$db.chunk.info_basename"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$node"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="$db.chunk.extension"/>
- </xsl:param>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <exsl:document href="{$href}"
- doctype-public="{$db.chunk.doctype_public}"
- doctype-system="{$db.chunk.doctype_system}">
- <xsl:call-template name="db.chunk.content">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="template" select="$template"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:call-template>
- </exsl:document>
- <xsl:if test="string($template) = ''">
- <xsl:call-template name="db.chunk.children">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:call-template>
- </xsl:if>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.content
-Creates the content of a new page of output
-$node: The source element for the output page
-$template: The named template to call to create the page
-$depth_of_chunk: The depth of this chunk in the document
-
-REMARK: We need a lot more explanation about chunk flow
-
-The *{db.chunk.content} template creates the actual content of a new output page.
-It should generally only be called by *{db.chunk}.
-
-This template will always pass the ${depth_in_chunk} and ${depth_of_chunk}
-parameters with appropriate values to the templates it calls.
--->
-<xsl:template name="db.chunk.content">
- <xsl:param name="node" select="."/>
- <xsl:param name="template"/>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:choose>
- <xsl:when test="$template = 'info'">
- <xsl:apply-templates mode="db.chunk.info.content.mode" select="$node">
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="db.chunk.content.mode" select="$node">
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.children
-Creates new output pages for the children of an element
-$node: The parent element whose children will be chunked
-$depth_of_chunk: The depth of ${node} in the document
-
-REMARK: We need a lot more explanation about chunk flow
--->
-<xsl:template name="db.chunk.children">
- <xsl:param name="node" select="."/>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:if test="$depth_of_chunk &lt; $db.chunk.max_depth">
- <xsl:for-each select="
- $node/appendix | $node/article | $node/bibliography |
- $node/bibliodiv |
- $node/book | $node/chapter | $node/colophon |
- $node/dedication | $node/glossary | $node/glossdiv |
- $node/index | $node/lot | $node/part |
- $node/preface | $node/refentry | $node/reference |
- $node/sect1 | $node/sect2 | $node/sect3 |
- $node/sect4 | $node/sect5 | $node/section |
- $node/setindex | $node/simplesect | $node/toc ">
- <xsl:call-template name="db.chunk">
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:if>
- <xsl:if test="$db.chunk.info_chunk and $depth_of_chunk = 0">
- <xsl:call-template name="db.chunk">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="template" select="'info'"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
- </xsl:call-template>
- </xsl:if>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.depth-in-chunk
-Determines the depth of an element in the containing chunk
-$node: The element to determine the depth of
-
-REMARK: Explain how this works
--->
-<xsl:template name="db.chunk.depth-in-chunk">
- <xsl:param name="node" select="."/>
- <xsl:variable name="divs"
- select="
- count($node/ancestor-or-self::appendix ) +
- count($node/ancestor-or-self::article ) +
- count($node/ancestor-or-self::bibliography ) +
- count($node/ancestor-or-self::bibliodiv ) +
- count($node/ancestor-or-self::book ) +
- count($node/ancestor-or-self::chapter ) +
- count($node/ancestor-or-self::colophon ) +
- count($node/ancestor-or-self::dedication ) +
- count($node/ancestor-or-self::glossary ) +
- count($node/ancestor-or-self::glossdiv ) +
- count($node/ancestor-or-self::index ) +
- count($node/ancestor-or-self::lot ) +
- count($node/ancestor-or-self::part ) +
- count($node/ancestor-or-self::preface ) +
- count($node/ancestor-or-self::refentry ) +
- count($node/ancestor-or-self::reference ) +
- count($node/ancestor-or-self::sect1 ) +
- count($node/ancestor-or-self::sect2 ) +
- count($node/ancestor-or-self::sect3 ) +
- count($node/ancestor-or-self::sect4 ) +
- count($node/ancestor-or-self::sect5 ) +
- count($node/ancestor-or-self::section ) +
- count($node/ancestor-or-self::setindex ) +
- count($node/ancestor-or-self::simplesect ) +
- count($node/ancestor-or-self::toc )"/>
- <xsl:choose>
- <xsl:when test="$divs &lt; ($db.chunk.max_depth + 1)">
- <xsl:value-of select="count($node/ancestor-or-self::*) - $divs"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="count($node/ancestor::*) - $db.chunk.max_depth"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.depth-of-chunk
-Determines the depth of teh containing chunk in the document
-$node: The element to determine the depth of
-
-REMARK: Explain how this works
--->
-<xsl:template name="db.chunk.depth-of-chunk">
- <xsl:param name="node" select="."/>
- <xsl:variable name="divs"
- select="$node/ancestor-or-self::*
- [contains($db.chunk.chunks_,
- concat(' ', local-name(.), ' '))]"/>
- <xsl:choose>
- <xsl:when test="count($divs) - 1 &lt; $db.chunk.max_depth">
- <xsl:value-of select="count($divs) - 1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$db.chunk.max_depth"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.chunk-id
-Determines the id of the chunk that contains an element
-$id: The id of the element to determine the chunk id of
-$node: The element to determine the chunk id of
-$depth_in_chunk: The depth of ${node} in the containing chunk
-
-REMARK: Explain how this works
--->
-<xsl:template name="db.chunk.chunk-id">
- <xsl:param name="id" select="@id"/>
- <xsl:param name="node" select="key('idkey', $id)"/>
- <xsl:param name="depth_in_chunk">
- <xsl:call-template name="db.chunk.depth-in-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:param name="chunk" select="$node/ancestor-or-self::*[$depth_in_chunk + 1]"/>
- <xsl:choose>
- <xsl:when test="set:has-same-node($chunk, /*)">
- <xsl:value-of select="$db.chunk.basename"/>
- </xsl:when>
- <xsl:when test="$chunk/@id">
- <xsl:value-of select="string($chunk/@id)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="generate-id($chunk)"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.chunk.chunk-id.axis
-Determines the id of the first chunk along a specified axis
-$node: The base element
-$node: The axis along which to find the first chunk
-$depth_in_chunk: The depth of ${node} in the containing chunk
-$depth_of_chunk: The depth of the containing chunk in the document
-
-REMARK: Explain how this works, and what the axes are
--->
-<xsl:template name="db.chunk.chunk-id.axis">
- <xsl:param name="node" select="."/>
- <xsl:param name="axis"/>
- <xsl:param name="depth_in_chunk">
- <xsl:call-template name="db.chunk.depth-in-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:param name="depth_of_chunk">
- <xsl:call-template name="db.chunk.depth-of-chunk">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
- </xsl:param>
- <xsl:choose>
- <xsl:when test="depth_in_chunk != 0">
- <xsl:call-template name="db.chunk.chunk-id.axis">
- <xsl:with-param name="node" select="$node/ancestor::*[$depth_in_chunk]"/>
- <xsl:with-param name="axis" select="$axis"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:call-template>
- </xsl:when>
- <!-- following -->
- <xsl:when test="$axis = 'following'">
- <xsl:variable name="divs"
- select="$node/following-sibling::*
- [contains($db.chunk.chunks_,
- concat(' ', local-name(.), ' '))]"/>
- <xsl:choose>
- <xsl:when test="$divs">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$divs[1]"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$divs[1]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$node/..">
- <xsl:call-template name="db.chunk.chunk-id.axis">
- <xsl:with-param name="node" select="$node/.."/>
- <xsl:with-param name="axis" select="'following'"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk - 1"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <!-- last-descendant -->
- <xsl:when test="$axis = 'last-descendant'">
- <xsl:variable name="divs"
- select="$node/*[contains($db.chunk.chunks_,
- concat(' ', local-name(.), ' '))]"/>
- <xsl:choose>
- <xsl:when test="($depth_of_chunk &gt;= $db.chunk.max_depth)">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$node"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="($depth_of_chunk + 1 = $db.chunk.max_depth) and $divs">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$divs[last()]"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$divs[last()]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divs">
- <xsl:call-template name="db.chunk.chunk-id.axis">
- <xsl:with-param name="node" select="$divs[last()]"/>
- <xsl:with-param name="axis" select="'last-descendant'"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk + 1"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$node"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- next -->
- <xsl:when test="$axis = 'next'">
- <xsl:variable name="divs"
- select="$node/*[contains($db.chunk.chunks_,
- concat(' ', local-name(.), ' '))]"/>
- <xsl:choose>
- <xsl:when test="($depth_of_chunk &lt; $db.chunk.max_depth) and $divs">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$divs[1]"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$divs[1]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.chunk.chunk-id.axis">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="axis" select="'following'"/>
- <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <!-- previous -->
- <xsl:when test="$axis = 'previous'">
- <xsl:variable name="divs"
- select="$node/preceding-sibling::*
- [contains($db.chunk.chunks_,
- concat(' ', local-name(.), ' '))]"/>
- <xsl:choose>
- <xsl:when test="$divs and ($depth_of_chunk &lt; $db.chunk.max_depth)">
- <xsl:call-template name="db.chunk.chunk-id.axis">
- <xsl:with-param name="node" select="$divs[last()]"/>
- <xsl:with-param name="axis" select="'last-descendant'"/>
- <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
- <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$divs">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$divs[last()]"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$divs[last()]"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$node/..">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="chunk" select="$node"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <!-- unsupported -->
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>Unsupported axis: </xsl:text>
- <xsl:value-of select="$axis"/>
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.chunk.info.content.mode
-Renders the contents of the title page
-$depth_in_chunk: The depth of the element in the containing chunk
-$depth_of_chunk: The depth of the containing chunk in the document
-
-When processed in this mode, a division element should output the top-level
-markup for the output page.
--->
-<xsl:template mode="db.chunk.info.content.mode" match="*"/>
-
-
-<!--%%==========================================================================
-db.chunk.content.mode
-Renders the entire contents of the chunk
-$depth_in_chunk: The depth of the element in the containing chunk
-$depth_of_chunk: The depth of the containing chunk in the document
-
-When processed in this mode, a division element should output the top-level
-markup for the output page.
--->
-<xsl:template mode="db.chunk.content.mode" match="*"/>
-
-
-<!-- == Matched Templates == -->
-
-<xsl:template match="/">
- <xsl:choose>
- <xsl:when test="$db.chunk.chunk_top">
- <xsl:call-template name="db.chunk">
- <xsl:with-param name="node" select="*[1]"/>
- <xsl:with-param name="depth_of_chunk" select="0"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="db.chunk.content.mode" select="*">
- <xsl:with-param name="depth_in_chunk" select="0"/>
- <xsl:with-param name="depth_of_chunk" select="0"/>
- </xsl:apply-templates>
- <xsl:call-template name="db.chunk.children">
- <xsl:with-param name="node" select="*[1]"/>
- <xsl:with-param name="depth_of_chunk" select="0"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/docbook/common/db-common.xsl b/xslt/docbook/common/db-common.xsl
deleted file mode 100644
index fa0b1ce..0000000
--- a/xslt/docbook/common/db-common.xsl
+++ /dev/null
@@ -1,295 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<!--
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program; see the file COPYING.LGPL. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:str="http://exslt.org/strings"
- exclude-result-prefixes="str"
- version="1.0">
-
-<!--!!==========================================================================
-DocBook Common
-:Requires: gettext
-
-This stylesheet module provides utility templates for DocBook that are
-independant of the target format.
--->
-
-<xsl:key name="idkey" match="*" use="@id"/>
-
-
-<!--**==========================================================================
-db.copyright
-Outputs copyright information
-$node: The #{copyright} element to format
-
-This template outputs copyright information from a #{copyright} elements.
-It assembles the #{year} and #{holder} elements into a simple copyright
-notice, beginning with the copyright symbol "©".
--->
-<xsl:template name="db.copyright">
- <xsl:param name="node" select="."/>
- <xsl:text>©&#x00A0;</xsl:text>
- <xsl:for-each select="$node/year">
- <xsl:if test="position() != 1">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="', '"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- <xsl:if test="$node/holder">
- <xsl:text>&#x00A0;&#x00A0;</xsl:text>
- <xsl:for-each select="$node/holder">
- <xsl:if test="position() != 1">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="', '"/>
- </xsl:call-template>
- </xsl:if>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:if>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.linenumbering
-Numbers each line in a verbatim environment
-$node: The verbatim element to create the line numbering for
-$number: The starting line number
-
-This template outputs a string with line numbers for each line in a verbatim
-elements. Each line number is on its own line, allowing the output string to
-be placed to the side of the verbatim output.
--->
-<xsl:template name="db.linenumbering">
- <xsl:param name="node" select="."/>
- <xsl:param name="number" select="1"/>
- <xsl:param name="string">
- <xsl:choose>
- <xsl:when test="$node/node()[1]/self::text() and starts-with($node/node()[1], '&#x000A;')">
- <xsl:value-of select="substring-after(string($node), '&#x000A;')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="string($node)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:param>
- <xsl:choose>
- <xsl:when test="contains($string, '&#x000A;')">
- <xsl:number value="$number"/>
- <xsl:text>&#x000A;</xsl:text>
- <xsl:call-template name="db.linenumbering">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="number" select="$number + 1"/>
- <xsl:with-param name="string"
- select="substring-after($string, '&#x000A;')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="string-length($string) != 0">
- <xsl:number value="$number"/>
- <xsl:text>&#x000A;</xsl:text>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.linenumbering.start
-Determines the starting line number for a verbatim element
-$node: The verbatim element to determine the starting line number for
-
-This template determines the starting line number for a verbatim element using
-the #{continuation} attribute. The template finds the first preceding element
-of the same name, counts its lines, and handles any #{startinglinenumber} or
-#{continuation} element it finds on that element.
--->
-<xsl:template name="db.linenumbering.start">
- <xsl:param name="node" select="."/>
- <xsl:choose>
- <xsl:when test="$node/@startinglinenumber">
- <xsl:value-of select="$node/@startinglinenumber"/>
- </xsl:when>
- <xsl:when test="$node/@continuation">
- <xsl:variable name="prev" select="$node/preceding::*[name(.) = name($node)][1]"/>
- <xsl:choose>
- <xsl:when test="count($prev) = 0">1</xsl:when>
- <xsl:otherwise>
- <xsl:variable name="prevcount">
- <xsl:value-of select="count(str:split(string($prev), '&#x000A;'))"/>
- </xsl:variable>
- <xsl:variable name="prevstart">
- <xsl:call-template name="db.linenumbering.start">
- <xsl:with-param name="node" select="$prev"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$prevstart + $prevcount"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>1</xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.orderedlist.start
-Determines the number to use for the first #{listitem} in an #{orderedlist}
-$node: The #{orderedlist} element to use
-
-This template determines the starting number for an #{orderedlist} element using
-the #{continuation} attribute. Thi template finds the first preceding #{orderedlist}
-element and counts its list items. If that element also uses the #{continuation},
-this template calls itself recursively to add that element's starting line number
-to its list item count.
--->
-<xsl:template name="db.orderedlist.start">
- <xsl:param name="node" select="."/>
- <xsl:choose>
- <xsl:when test="$node/@continutation != 'continues'">1</xsl:when>
- <xsl:otherwise>
- <xsl:variable name="prevlist"
- select="$node/preceding::orderedlist[1]"/>
- <xsl:choose>
- <xsl:when test="count($prevlist) = 0">1</xsl:when>
- <xsl:otherwise>
- <xsl:variable name="prevlength" select="count($prevlist/listitem)"/>
- <xsl:variable name="prevstart">
- <xsl:call-template name="db.orderedlist.start">
- <xsl:with-param name="node" select="$prevlist"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="$prevstart + $prevlength"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.personname
-Outputs the name of a person
-$node: The element containing tags such as #{firstname} and #{surname}
-$lang: The language rules to use to construct the name
-
-This template outputs the name of a person as modelled by the #{personname}
-element. The #{personname} element allows authors to mark up components of
-a person's name, such as the person's first name and surname. This template
-assembles those into a string.
--->
-<xsl:template name="db.personname">
- <xsl:param name="node" select="."/>
- <!-- FIXME: call i18n.locale -->
- <xsl:param name="lang" select="ancestor-or-self::*[@lang][1]/@lang"/>
-
- <!-- FIXME: Use xsl:choose for different language rules -->
- <xsl:if test="$node/honorific">
- <xsl:apply-templates select="$node/honorific[1]"/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$node/@role = 'family-given'">
- <xsl:if test="$node/surname">
- <xsl:if test="$node/honorific">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/surname[1]"/>
- </xsl:if>
- <xsl:if test="$node/othername">
- <xsl:if test="$node/honorific or $node/surname">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/othername[1]"/>
- </xsl:if>
- <xsl:if test="$node/firstname">
- <xsl:if test="$node/honorific or $node/surname or $node/othername">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/firstname[1]"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="$node/firstname">
- <xsl:if test="$node/honorific">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/firstname[1]"/>
- </xsl:if>
- <xsl:if test="$node/othername">
- <xsl:if test="$node/honorific or $node/firstname">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/othername[1]"/>
- </xsl:if>
- <xsl:if test="$node/surname">
- <xsl:if test="$node/honorific or $node/firstname or $node/othername">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:apply-templates select="$node/surname[1]"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="$node/lineage">
- <xsl:text>, </xsl:text>
- <xsl:apply-templates select="$node/lineage[1]"/>
- </xsl:if>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.personname.list
-Outputs a list of people's names
-$nodes: The elements containing tags such as #{firstname} and #{surname}
-$lang: The language rules to use to construct the list of names
-
-This template outputs a list of names of people as modelled by the #{personname}
-element. The #{personname} element allows authors to mark up components of a
-person's name, such as the person's first name and surname. This template makes
-a list formatted according to the locale set in ${lang} and calls the template
-*{db.personname} for each element in ${nodes}.
--->
-<xsl:template name="db.personname.list">
- <xsl:param name="nodes"/>
- <!-- FIXME: call i18n.locale -->
- <xsl:param name="lang" select="ancestor-or-self::*[@lang][1]/@lang"/>
- <xsl:for-each select="$nodes">
- <xsl:choose>
- <xsl:when test="position() = 1"/>
- <xsl:when test="last() = 2">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="' and '"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="position() = last()">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="', and '"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="', '"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:call-template name="db.personname">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="lang" select="$lang"/>
- </xsl:call-template>
- </xsl:for-each>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/docbook/common/db-format.xml.in b/xslt/docbook/common/db-format.xml.in
deleted file mode 100644
index 4a981b1..0000000
--- a/xslt/docbook/common/db-format.xml.in
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/xsl-format"
- xmlns:_msg="http://www.gnome.org/~shaunm/gnome-doc-utils/xsl-format">
-
-<title xmlns="http://www.gnome.org/~shaunm/xsldoc">Format Templates</title>
-
-
-</xsl:stylesheet>
diff --git a/xslt/docbook/common/db-label.xsl b/xslt/docbook/common/db-label.xsl
deleted file mode 100644
index 73d42ec..0000000
--- a/xslt/docbook/common/db-label.xsl
+++ /dev/null
@@ -1,829 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<!--
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program; see the file COPYING.LGPL. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"
- xmlns:set="http://exslt.org/sets"
- exclude-result-prefixes="msg set"
- version="1.0">
-
-<!--!!==========================================================================
-DocBook Labels
-:Requires: db-chunk db-title gettext
-
-REMARK: Explain labels
--->
-
-
-<!--**==========================================================================
-db.label
-Generates the label for an element
-$node: The node to generate a label for
-$role: The role of the label, as passed to the format template
-
-This template generates the label used for some sectioning and block-level
-elements. For instance, this would generate strings such as Section 14.3
-or Table 5-2. The template simply applies the mode %{db.label.mode} to the
-element. To change the behavior of a particular type of element, you should
-always override the mode template for that element.
-
-Overriding the *{db.label} template should only be done if you wish to change
-the labelling mechanism completely, or if you wish to wrap the labelling
-mechanism (for instance, with a caching extension). Do not override this
-template to suppress label prefixes in titles.
-
-REMARK: Do not, but instead?
--->
-<xsl:template name="db.label">
- <xsl:param name="node" select="."/>
- <xsl:param name="role"/>
- <xsl:choose>
- <xsl:when test="$node/@label">
- <xsl:value-of select="$node/@label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="db.label.mode" select="$node">
- <xsl:with-param name="role" select="$role"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.label.mode
-$role: The role of the label, as passed to the format template
-FIXME
-
-REMARK: Document this mode, and the role param
--->
-
-<!-- = db.label.mode % answer = -->
-<xsl:template mode="db.label.mode" match="answer">
- <xsl:param name="role"/>
- <xsl:variable name="qandaset" select="ancestor::qandaset[1]"/>
- <xsl:if test="$qandaset/@defaultlabel = 'qanda'">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'A:'"/>
- </xsl:call-template>
- </xsl:if>
-</xsl:template>
-
-<!-- = db.label.mode % appendix = -->
-<xsl:template mode="db.label.mode" match="appendix">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'appendix.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % bibliography = -->
-<xsl:template mode="db.label.mode" match="bibliography"/>
-
-<!-- = db.label.mode % biblioentry | bibliomixed = -->
-<xsl:template mode="db.label.mode" match="biblioentry | bibliomixed">
- <xsl:if test="*[1]/self::abbrev | @xreflabel | @id">
- <!-- FIXME: I18N -->
- <xsl:text>[</xsl:text>
- <xsl:choose>
- <xsl:when test="*[1]/self::abbrev">
- <xsl:apply-templates select="abbrev[1]"/>
- </xsl:when>
- <xsl:when test="@xreflabel">
- <xsl:value-of select="@xreflabel"/>
- </xsl:when>
- <xsl:when test="@id">
- <xsl:value-of select="@id"/>
- </xsl:when>
- </xsl:choose>
- <xsl:text>]</xsl:text>
- </xsl:if>
-</xsl:template>
-
-<!-- = db.label.mode % book = -->
-<xsl:template mode="db.label.mode" match="book">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'book.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % chapter = -->
-<xsl:template mode="db.label.mode" match="chapter">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'chapter.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % example = -->
-<xsl:template mode="db.label.mode" match="example">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'example.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % figure = -->
-<xsl:template mode="db.label.mode" match="figure">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'figure.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % glossary = -->
-<xsl:template mode="db.label.mode" match="glossary"/>
-
-<!-- = db.label.mode % part = -->
-<xsl:template mode="db.label.mode" match="part">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'part.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % preface = -->
-<xsl:template mode="db.label.mode" match="preface"/>
-
-<!-- = db.label.mode % question = -->
-<xsl:template mode="db.label.mode" match="question">
- <xsl:param name="role"/>
- <xsl:variable name="qandaset" select="ancestor::qandaset[1]"/>
- <xsl:choose>
- <xsl:when test="label">
- <xsl:apply-templates select="label/node()"/>
- </xsl:when>
- <xsl:when test="$qandaset/@defaultlabel = 'none'"/>
- <xsl:when test="$qandaset/@defaultlabel = 'qanda'">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Q:'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'question.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.label.mode % reference = -->
-<xsl:template mode="db.label.mode" match="referece"/>
-
-<!-- = db.label.mode % refsection = -->
-<xsl:template mode="db.label.mode" match="refsection | refsect1 | refsect2 | refsect3"/>
-
-<!-- = db.label.mode % section = -->
-<xsl:template mode="db.label.mode" match="
- section | sect1 | sect2 | sect3 | sect4 | sect5 | simplesect">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'section.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % table = -->
-<xsl:template mode="db.label.mode" match="table">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'table.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.label.mode % synopfragment = -->
-<xsl:template mode="db.label.mode" match="synopfragment">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'synopfragment.label'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="db.label.mode" match="title | subtitle">
- <xsl:param name="role"/>
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="db.label.mode" match="
- article |
- colophon | index |
- qandadiv | qandaset |
- set | setindex ">
- <xsl:param name="role"/>
-<!-- FIXME
- <xsl:call-template name="db.label.name"/>
- <xsl:text> </xsl:text>
- <xsl:call-template name="db.label.number"/>
--->
-</xsl:template>
-
-<xsl:template mode="db.label.mode" match="
- appendixinfo | articleinfo | bibliographyinfo | bookinfo |
- chapterinfo | glossaryinfo | indexinfo | partinfo |
- prefaceinfo | refentryinfo | referenceinfo | refsect1info |
- refsect2info | refsect3info | refsectioninfo | sect1info |
- sect2info | sect3info | sect4info | sect5info |
- sectioninfo | setindexinfo | setinfo ">
- <xsl:param name="role"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'About This Document'"/>
- </xsl:call-template>
-<!-- FIXME
- <xsl:call-template name="db.label.name"/>
--->
-</xsl:template>
-
-<xsl:template mode="db.label.mode" match="*"/>
-
-
-<!--**==========================================================================
-db.number
-Generates the number portion of a label
-$node: The element to generate a number for
-
-This template generates the number portion of the label used for some sectioning
-and block-level elements. The template simply applies the mode %{db.number.mode}
-to the element. To change the behavior of a particular type of element, you
-should always override the mode template for that type of element.
-
-Overriding the *{db.number} template should only be done if you wish to change
-the numbering mechanism completely, or you wish to wrap the numbering mechanism
-(for example, with a caching extension).
--->
-<xsl:template name="db.number">
- <xsl:param name="node" select="."/>
- <xsl:apply-templates mode="db.number.mode" select="$node"/>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.number.mode
-FIXME
-
-REMARK: Document this mode
--->
-
-<!-- = db.number.mode % appendix = -->
-<xsl:template mode="db.number.mode" match="appendix">
- <xsl:choose>
- <xsl:when test="parent::part">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'appendix.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % book = -->
-<xsl:template mode="db.number.mode" match="book">
- <xsl:call-template name="db.digit"/>
-</xsl:template>
-
-<!-- = db.number.mode % chapter = -->
-<xsl:template mode="db.number.mode" match="chapter">
- <xsl:choose>
- <xsl:when test="parent::part">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'chapter.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % example = -->
-<xsl:template mode="db.number.mode" match="example">
- <xsl:choose>
- <xsl:when test="ancestor::appendix or ancestor::chapter">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'example.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % figure = -->
-<xsl:template mode="db.number.mode" match="figure">
- <xsl:choose>
- <xsl:when test="ancestor::appendix or ancestor::chapter">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'figure.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % footnote = -->
-<xsl:template mode="db.number.mode" match="footnote">
- <xsl:variable name="depth_in_chunk">
- <xsl:call-template name="db.chunk.depth-in-chunk">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="notes" select="preceding::footnote"/>
- <xsl:choose>
- <xsl:when test="count($notes) != 0">
- <xsl:call-template name="db.number.footnote.tally">
- <xsl:with-param name="chunk" select="ancestor::*[number($depth_in_chunk)]"/>
- <xsl:with-param name="notes" select="$notes"/>
- <xsl:with-param name="pos" select="1"/>
- <xsl:with-param name="count" select="1"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="1"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!--#* db.number.footnote.tally -->
-<xsl:template name="db.number.footnote.tally">
- <xsl:param name="chunk"/>
- <xsl:param name="notes"/>
- <xsl:param name="pos"/>
- <xsl:param name="count"/>
- <xsl:variable name="this" select="$notes[$pos]"/>
- <xsl:variable name="depth">
- <xsl:call-template name="db.chunk.depth-in-chunk">
- <xsl:with-param name="node" select="$this"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="increment"
- select="number(set:has-same-node($this/ancestor::*[number($depth)],
- $chunk ))"/>
- <xsl:choose>
- <xsl:when test="$pos = count($notes)">
- <xsl:value-of select="$count + $increment"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.number.footnote.tally">
- <xsl:with-param name="chunk" select="$chunk"/>
- <xsl:with-param name="notes" select="$notes"/>
- <xsl:with-param name="pos" select="$pos + 1"/>
- <xsl:with-param name="count" select="$count + $increment"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % glossary = -->
-<xsl:template mode="db.number.mode" match="glossary"/>
-
-<!-- = db.number.mode % part = -->
-<xsl:template mode="db.number.mode" match="part">
- <xsl:call-template name="db.digit"/>
-</xsl:template>
-
-<!-- = db.number.mode % preface = -->
-<xsl:template mode="db.number.mode" match="preface"/>
-
-<!-- = db.number.mode % question = -->
-<xsl:template mode="db.number.mode" match="question">
- <xsl:call-template name="db.digit"/>
-</xsl:template>
-
-<!-- = db.number.mode % refsection = -->
-<xsl:template mode="db.number.mode" match="
- refsection | refsect1 | refsect2 | refsect3">
- <xsl:choose>
- <xsl:when test="parent::refentry">
- <xsl:call-template name="db.digit"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'refsection.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % section = -->
-<xsl:template mode="db.number.mode" match="
- section | sect1 | sect2 | sect3 | sect4 | sect5 | simplesect">
- <xsl:choose>
- <xsl:when test="local-name(..) != 'article' and
- local-name(..) != 'partintro' and
- local-name(..) != 'preface' and
- .. != / ">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'section.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.number.mode % synopfragment = -->
-<xsl:template mode="db.number.mode" match="synopfragment">
- <xsl:call-template name="db.digit"/>
-</xsl:template>
-
-<!-- = db.number.mode % table = -->
-<xsl:template mode="db.number.mode" match="table">
- <xsl:choose>
- <xsl:when test="ancestor::appendix or ancestor::chapter">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'table.number'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="db.digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- FIXME: need to use formatters -->
-
-<xsl:template mode="db.number.mode" match="answer">
- <!-- FIXME -->
-</xsl:template>
-
-<xsl:template mode="db.number.mode" match="article">
- <xsl:number format="I" value="
- count(preceding-sibling::article) + 1 +
- count(parent::part/preceding-sibling::part/article)"/>
-</xsl:template>
-
-<xsl:template mode="db.number.mode" match="reference">
- <xsl:number format="I" value="
- count(preceding-sibling::reference) + 1 +
- count(parent::part/preceding-sibling::part/reference)"/>
-</xsl:template>
-
-<xsl:template mode="db.number.mode" match="
- book | bibliography | colophon | glossary |
- index | set | setindex "/>
-
-<xsl:template mode="db.number.mode" match="synopfragment">
- <xsl:value-of select="count(preceding-sibling::synopfragment) + 1"/>
-</xsl:template>
-
-<xsl:template mode="db.number.mode" match="title | subtitle">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="db.number.mode" match="*">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.digit
-FIXME
-
-REMARK: Document this template
--->
-<xsl:template name="db.digit">
- <xsl:param name="node" select="."/>
- <xsl:apply-templates mode="db.digit.mode" select="$node"/>
-</xsl:template>
-
-<!--#* db.digit.format -->
-<xsl:template name="db.digit.format">
- <xsl:param name="digit"/>
- <xsl:param name="format"/>
- <xsl:choose>
- <xsl:when test="$format = '1'">
- <xsl:number format="1" value="$digit"/>
- </xsl:when>
- <xsl:when test="$format = 'A'">
- <xsl:number format="A" value="$digit"/>
- </xsl:when>
- <xsl:when test="$format = 'a'">
- <xsl:number format="a" value="$digit"/>
- </xsl:when>
- <xsl:when test="$format = 'I'">
- <xsl:number format="I" value="$digit"/>
- </xsl:when>
- <xsl:when test="$format = 'i'">
- <xsl:number format="i" value="$digit"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>Unrecognized number formatter: </xsl:text>
- <xsl:value-of select="$format"/>
- </xsl:message>
- <xsl:number format="1" value="$digit"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.digit.mode
-FIXME
-
-REMARK: Document this mode. Rename to db.number.digit.mode?
--->
-
-<!-- = db.digit.mode % appendix = -->
-<xsl:template mode="db.digit.mode" match="appendix">
- <xsl:call-template name="db.digit.format">
- <!-- FIXME: use xsl:number -->
- <xsl:with-param name="digit" select="
- count(preceding-sibling::appendix) + 1 +
- count(parent::part/preceding-sibling::part/appendix)"/>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'appendix.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % book = -->
-<xsl:template mode="db.digit.mode" match="book">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit" select="count(preceding-sibling::book) + 1"/>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'book.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % chapter = -->
-<xsl:template mode="db.digit.mode" match="chapter">
- <xsl:call-template name="db.digit.format">
- <!-- FIXME: use xsl:number -->
- <xsl:with-param name="digit" select="
- count(preceding-sibling::chapter) + 1 +
- count(parent::part/preceding-sibling::part/chapter)"/>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'chapter.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % example = -->
-<xsl:template mode="db.digit.mode" match="example">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="any" count="example" from="chapter | appendix"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'example.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % figure = -->
-<xsl:template mode="db.digit.mode" match="figure">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="any" count="figure" from="chapter | appendix"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'figure.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % glossary = -->
-<xsl:template mode="db.digit.mode" match="glossary"/>
-
-<!-- = db.digit.mode % part = -->
-<xsl:template mode="db.digit.mode" match="part">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit" select="count(preceding-sibling::part) + 1"/>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'part.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % preface = -->
-<xsl:template mode="db.digit.mode" match="preface"/>
-
-<!-- = db.digit.mode % question = -->
-<xsl:template mode="db.digit.mode" match="question">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="any" format="1" count="question" from="qandaset"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'question.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % refsection = -->
-<xsl:template mode="db.digit.mode" match="
- refsection | refsect1 | refsect2 | refsect3">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="single" format="1" count="
- refsection | refsect1 | refsect2 | refsect3"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'refsection.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % section = -->
-<xsl:template mode="db.digit.mode" match="
- section | sect1 | sect2 | sect3 | sect4 | sect5 | simplesect">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="single" format="1" count="
- section | sect1 | sect2 | sect3 | sect4 | sect5 | simplesect"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'section.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % synopfragment = -->
-<xsl:template mode="db.digit.mode" match="synopfragment">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit" select="count(preceding-sibling::synopfragment) + 1"/>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'synopfragment.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.digit.mode % table = -->
-<xsl:template mode="db.digit.mode" match="table">
- <xsl:call-template name="db.digit.format">
- <xsl:with-param name="digit">
- <xsl:number level="any" count="table" from="chapter | appendix"/>
- </xsl:with-param>
- <xsl:with-param name="format">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'table.digit'"/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.number.parent.mode
-FIXME
-
-REMARK: Document this mode
--->
-<xsl:template mode="db.number.parent.mode" match="*">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.number.parent.mode % example = -->
-<xsl:template mode="db.number.parent.mode" match="example">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node"
- select="(ancestor::appendix | ancestor::chapter)[last()]"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.number.parent.mode % figure = -->
-<xsl:template mode="db.number.parent.mode" match="figure">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node"
- select="(ancestor::appendix | ancestor::chapter)[last()]"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.number.parent.mode % table = -->
-<xsl:template mode="db.number.parent.mode" match="table">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node"
- select="(ancestor::appendix | ancestor::chapter)[last()]"/>
- </xsl:call-template>
-</xsl:template>
-
-
-<!-- == msg:* ============================================================== -->
-<!--#% l10n.format.mode -->
-
-<xsl:template mode="l10n.format.mode" match="msg:digit">
- <xsl:param name="node"/>
- <xsl:call-template name="db.digit">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:glossterm">
- <xsl:param name="node"/>
- <xsl:apply-templates select="$node/glossterm"/>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:label">
- <xsl:param name="node"/>
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:number">
- <xsl:param name="node"/>
- <xsl:call-template name="db.number">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:parent">
- <xsl:param name="node"/>
- <xsl:apply-templates mode="db.number.parent.mode" select="$node"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/docbook/common/db-title.xsl b/xslt/docbook/common/db-title.xsl
deleted file mode 100644
index f8d821c..0000000
--- a/xslt/docbook/common/db-title.xsl
+++ /dev/null
@@ -1,1281 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<!--
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program; see the file COPYING.LGPL. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msg="http://www.gnome.org/~shaunm/gnome-doc-utils/l10n"
- version="1.0">
-
-<!--!!==========================================================================
-DocBook Titles
-:Requires: db-chunk gettext
--->
-
-
-<!--**==========================================================================
-db.title
-Processes the title of an element
-$node: The element to process the title of
-
-REMARK: Describe this, and how format templates and markup play in
--->
-<xsl:template name="db.title">
- <xsl:param name="node" select="."/>
- <xsl:apply-templates mode="db.title.mode" select="$node"/>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.titleabbrev
-Processes the abbreviated title of an element
-$node: The element to process the abbreviated title of
-
-REMARK: Describe this, and how format templates and markup play in,
-and fallback to db.title
--->
-<xsl:template name="db.titleabbrev">
- <xsl:param name="node" select="."/>
- <xsl:apply-templates mode="db.titleabbrev.mode" select="$node"/>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.subtitle
-Processes the subtitle of an element
-$node: The element to process the subtitle of
-
-REMARK: Describe this, and how format templates and markup play in
--->
-<xsl:template name="db.subtitle">
- <xsl:param name="node" select="."/>
- <xsl:apply-templates mode="db.subtitle.mode" select="$node"/>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.title.mode
-FIXME
-
-REMARK: Describe this mode
--->
-<xsl:template mode="db.title.mode" match="*">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="blockinfo/title">
- <xsl:apply-templates select="blockinfo/title/node()"/>
- </xsl:when>
- <xsl:when test="objectinfo/title">
- <xsl:apply-templates select="objectinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % appendix = -->
-<xsl:template mode="db.title.mode" match="anchor">
- <xsl:variable name="target_chunk_id">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="target_chunk" select="key('idkey', $target_chunk_id)"/>
- <xsl:choose>
- <xsl:when test="$target_chunk">
- <xsl:apply-templates mode="db.title.mode" select="$target_chunk"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % appendix = -->
-<xsl:template mode="db.title.mode" match="appendix">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="appendixinfo/title">
- <xsl:apply-templates select="appendixinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % article = -->
-<xsl:template mode="db.title.mode" match="article">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="articleinfo/title">
- <xsl:apply-templates select="articleinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % bibliography = -->
-<xsl:template mode="db.title.mode" match="bibliography">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="bibliographyinfo/title">
- <xsl:apply-templates select="bibliographyinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Bibliography'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % book = -->
-<xsl:template mode="db.title.mode" match="book">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="bookinfo/title">
- <xsl:apply-templates select="bookinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % chapter = -->
-<xsl:template mode="db.title.mode" match="chapter">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="chapterinfo/title">
- <xsl:apply-templates select="chapterinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % glossary = -->
-<xsl:template mode="db.title.mode" match="glossary">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="glossaryinfo/title">
- <xsl:apply-templates select="glossaryinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Glossary'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % index = -->
-<xsl:template mode="db.title.mode" match="index">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="indexinfo/title">
- <xsl:apply-templates select="indexinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Index'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % part = -->
-<xsl:template mode="db.title.mode" match="part">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="partinfo/title">
- <xsl:apply-templates select="partinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % preface = -->
-<xsl:template mode="db.title.mode" match="preface">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="prefaceinfo/title">
- <xsl:apply-templates select="prefaceinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refentry = -->
-<xsl:template mode="db.title.mode" match="refentry">
- <xsl:choose>
- <xsl:when test="refmeta/refentrytitle">
- <xsl:apply-templates select="refmeta/refentrytitle/node()"/>
- <xsl:if test="refmeta/manvolnum">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'manvolnum.format'"/>
- <xsl:with-param name="node" select="refmeta/manvolnum[1]"/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:apply-templates select="refentryinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="refnamediv/refname[1]/node()"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % reference = -->
-<xsl:template mode="db.title.mode" match="reference">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="referenceinfo/title">
- <xsl:apply-templates select="referenceinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refsect1 = -->
-<xsl:template mode="db.title.mode" match="refsect1">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect1info/title">
- <xsl:apply-templates select="refsect1info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refsect2 = -->
-<xsl:template mode="db.title.mode" match="refsect2">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect2info/title">
- <xsl:apply-templates select="refsect2info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refsect3 = -->
-<xsl:template mode="db.title.mode" match="refsect3">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect3info/title">
- <xsl:apply-templates select="refsect3info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refsection = -->
-<xsl:template mode="db.title.mode" match="refsection">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsectioninfo/title">
- <xsl:apply-templates select="refsectioninfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % refsynopsisdiv = -->
-<xsl:template mode="db.title.mode" match="refsynopsisdiv">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdivinfo/title">
- <xsl:apply-templates select="refsynopsisdivinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Synopsis'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sect1 = -->
-<xsl:template mode="db.title.mode" match="sect1">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect1info/title">
- <xsl:apply-templates select="sect1info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sect2 = -->
-<xsl:template mode="db.title.mode" match="sect2">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect2info/title">
- <xsl:apply-templates select="sect2info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sect3 = -->
-<xsl:template mode="db.title.mode" match="sect3">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect3info/title">
- <xsl:apply-templates select="sect3info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sect4 = -->
-<xsl:template mode="db.title.mode" match="sect4">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect4info/title">
- <xsl:apply-templates select="sect4info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sect5 = -->
-<xsl:template mode="db.title.mode" match="sect5">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect5info/title">
- <xsl:apply-templates select="sect5info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % section = -->
-<xsl:template mode="db.title.mode" match="section">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sectioninfo/title">
- <xsl:apply-templates select="sectioninfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % set = -->
-<xsl:template mode="db.title.mode" match="set">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="setinfo/title">
- <xsl:apply-templates select="setinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % setindex = -->
-<xsl:template mode="db.title.mode" match="setindex">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="setindexinfo/title">
- <xsl:apply-templates select="setindexinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Index'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.title.mode % sidebar = -->
-<xsl:template mode="db.title.mode" match="sidebar">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sidebarinfo/title">
- <xsl:apply-templates select="sidebarinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.titleabbrev.mode
-FIXME
-
-REMARK: Describe this mode
--->
-<xsl:template mode="db.titleabbrev.mode" match="*">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="blockinfo/titleabbrev">
- <xsl:apply-templates select="blockinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="objectinfo/titleabbrev">
- <xsl:apply-templates select="objectinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="blockinfo/title">
- <xsl:apply-templates select="blockinfo/title/node()"/>
- </xsl:when>
- <xsl:when test="objectinfo/title">
- <xsl:apply-templates select="objectinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % appendix = -->
-<xsl:template mode="db.titleabbrev.mode" match="appendix">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="appendixinfo/titleabbrev">
- <xsl:apply-templates select="appendixinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="appendixinfo/title">
- <xsl:apply-templates select="appendixinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % article = -->
-<xsl:template mode="db.titleabbrev.mode" match="article">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="articleinfo/titleabbrev">
- <xsl:apply-templates select="articleinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="articleinfo/title">
- <xsl:apply-templates select="articleinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % bibliography = -->
-<xsl:template mode="db.titleabbrev.mode" match="bibliography">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="bibliographyinfo/titleabbrev">
- <xsl:apply-templates select="bibliographyinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="bibliographyinfo/title">
- <xsl:apply-templates select="bibliographyinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Bibliography'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % book = -->
-<xsl:template mode="db.titleabbrev.mode" match="book">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="bookinfo/titleabbrev">
- <xsl:apply-templates select="bookinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="bookinfo/title">
- <xsl:apply-templates select="bookinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % chapter = -->
-<xsl:template mode="db.titleabbrev.mode" match="chapter">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="chapterinfo/titleabbrev">
- <xsl:apply-templates select="chapterinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="chapterinfo/title">
- <xsl:apply-templates select="chapterinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % glossary = -->
-<xsl:template mode="db.titleabbrev.mode" match="glossary">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="glossaryinfo/titleabbrev">
- <xsl:apply-templates select="glossaryinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="glossaryinfo/title">
- <xsl:apply-templates select="glossaryinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Glossary'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % index = -->
-<xsl:template mode="db.titleabbrev.mode" match="index">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="indexinfo/titleabbrev">
- <xsl:apply-templates select="indexinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="indexinfo/title">
- <xsl:apply-templates select="indexinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Index'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % part = -->
-<xsl:template mode="db.titleabbrev.mode" match="part">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="partinfo/titleabbrev">
- <xsl:apply-templates select="partinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="partinfo/title">
- <xsl:apply-templates select="partinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % preface = -->
-<xsl:template mode="db.titleabbrev.mode" match="preface">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="prefaceinfo/titleabbrev">
- <xsl:apply-templates select="prefaceinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="prefaceinfo/title">
- <xsl:apply-templates select="prefaceinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refentry = -->
-<xsl:template mode="db.titleabbrev.mode" match="refentry">
- <xsl:choose>
- <xsl:when test="refentryinfo/titleabbrev">
- <xsl:apply-templates select="refentryinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refmeta/refentrytitle">
- <xsl:apply-templates select="refmeta/refentrytitle/node()"/>
- <xsl:if test="refmeta/manvolnum">
- <!-- FIXME: I18N -->
- <xsl:text>(</xsl:text>
- <xsl:apply-templates select="refmeta/manvolnum[1]/node()"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:apply-templates select="refentryinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="refnamediv/refname[1]/node()"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % reference = -->
-<xsl:template mode="db.titleabbrev.mode" match="reference">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="referenceinfo/titleabbrev">
- <xsl:apply-templates select="referenceinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="referenceinfo/title">
- <xsl:apply-templates select="referenceinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refsect1 = -->
-<xsl:template mode="db.titleabbrev.mode" match="refsect1">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsect1info/titleabbrev">
- <xsl:apply-templates select="refsect1info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect1info/title">
- <xsl:apply-templates select="refsect1info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refsect2 = -->
-<xsl:template mode="db.titleabbrev.mode" match="refsect2">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsect2info/titleabbrev">
- <xsl:apply-templates select="refsect2info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect2info/title">
- <xsl:apply-templates select="refsect2info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refsect3 = -->
-<xsl:template mode="db.titleabbrev.mode" match="refsect3">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsect3info/titleabbrev">
- <xsl:apply-templates select="refsect3info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsect3info/title">
- <xsl:apply-templates select="refsect3info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refsection = -->
-<xsl:template mode="db.titleabbrev.mode" match="refsection">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsectioninfo/titleabbrev">
- <xsl:apply-templates select="refsectioninfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsectioninfo/title">
- <xsl:apply-templates select="refsectioninfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % refsynopsisdiv = -->
-<xsl:template mode="db.titleabbrev.mode" match="refsynopsisdiv">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdivinfo/titleabbrev">
- <xsl:apply-templates select="refsynopsisdivinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdivinfo/title">
- <xsl:apply-templates select="refsynopsisdivinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sect1 = -->
-<xsl:template mode="db.titleabbrev.mode" match="sect1">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sect1info/titleabbrev">
- <xsl:apply-templates select="sect1info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect1info/title">
- <xsl:apply-templates select="sect1info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sect2 = -->
-<xsl:template mode="db.titleabbrev.mode" match="sect2">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sect2info/titleabbrev">
- <xsl:apply-templates select="sect2info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect2info/title">
- <xsl:apply-templates select="sect2info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sect3 = -->
-<xsl:template mode="db.titleabbrev.mode" match="sect3">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sect3info/titleabbrev">
- <xsl:apply-templates select="sect3info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect3info/title">
- <xsl:apply-templates select="sect3info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sect4 = -->
-<xsl:template mode="db.titleabbrev.mode" match="sect4">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sect4info/titleabbrev">
- <xsl:apply-templates select="sect4info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect4info/title">
- <xsl:apply-templates select="sect4info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sect5 = -->
-<xsl:template mode="db.titleabbrev.mode" match="sect5">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sect5info/titleabbrev">
- <xsl:apply-templates select="sect5info/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sect5info/title">
- <xsl:apply-templates select="sect5info/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % section = -->
-<xsl:template mode="db.titleabbrev.mode" match="section">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sectioninfo/titleabbrev">
- <xsl:apply-templates select="sectioninfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sectioninfo/title">
- <xsl:apply-templates select="sectioninfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % set = -->
-<xsl:template mode="db.titleabbrev.mode" match="set">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="setinfo/titleabbrev">
- <xsl:apply-templates select="setinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="setinfo/title">
- <xsl:apply-templates select="setinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % setindex = -->
-<xsl:template mode="db.titleabbrev.mode" match="setindex">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="setindexinfo/titleabbrev">
- <xsl:apply-templates select="setindexinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="setindexinfo/title">
- <xsl:apply-templates select="setindexinfo/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'Index'"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.titleabbrev.mode % sidebar = -->
-<xsl:template mode="db.titleabbrev.mode" match="sidebar">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="sidebarinfo/titleabbrev">
- <xsl:apply-templates select="sidebarinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="sidebarinfo/title">
- <xsl:apply-templates select="sidebarinfo/title/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.subtitle.mode
-FIXME
-
-REMARK: Describe this mode
--->
-<xsl:template mode="db.subtitle.mode" match="*">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="blockinfo/subtitle">
- <xsl:apply-templates select="blockinfo/subtitle/node()"/>
- </xsl:when>
- <xsl:when test="objectinfo/subtitle">
- <xsl:apply-templates select="objectinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % appendix = -->
-<xsl:template mode="db.subtitle.mode" match="appendix">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="appendixinfo/subtitle">
- <xsl:apply-templates select="appendixinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % article = -->
-<xsl:template mode="db.subtitle.mode" match="article">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="articleinfo/subtitle">
- <xsl:apply-templates select="articleinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % bibliography = -->
-<xsl:template mode="db.subtitle.mode" match="bibliography">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="bibliographyinfo/subtitle">
- <xsl:apply-templates select="bibliographyinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % book = -->
-<xsl:template mode="db.subtitle.mode" match="book">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="bookinfo/subtitle">
- <xsl:apply-templates select="bookinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % chapter = -->
-<xsl:template mode="db.subtitle.mode" match="chapter">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="chapterinfo/subtitle">
- <xsl:apply-templates select="chapterinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % glossary = -->
-<xsl:template mode="db.subtitle.mode" match="glossary">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="glossaryinfo/subtitle">
- <xsl:apply-templates select="glossaryinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % index = -->
-<xsl:template mode="db.subtitle.mode" match="index">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="indexinfo/subtitle">
- <xsl:apply-templates select="indexinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % part = -->
-<xsl:template mode="db.subtitle.mode" match="part">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="partinfo/subtitle">
- <xsl:apply-templates select="partinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % preface = -->
-<xsl:template mode="db.subtitle.mode" match="preface">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="prefaceinfo/subtitle">
- <xsl:apply-templates select="prefaceinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refentry = -->
-<xsl:template mode="db.subtitle.mode" match="refentry">
- <xsl:if test="refentryinfo/subtitle">
- <xsl:apply-templates select="refentryinfo/subtitle/node()"/>
- </xsl:if>
-</xsl:template>
-
-<!-- = db.subtitle.mode % reference = -->
-<xsl:template mode="db.subtitle.mode" match="reference">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="referenceinfo/subtitle">
- <xsl:apply-templates select="referenceinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refsect1 = -->
-<xsl:template mode="db.subtitle.mode" match="refsect1">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="refsect1info/subtitle">
- <xsl:apply-templates select="refsect1info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refsect2 = -->
-<xsl:template mode="db.subtitle.mode" match="refsect2">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="refsect2info/subtitle">
- <xsl:apply-templates select="refsect2info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refsect3 = -->
-<xsl:template mode="db.subtitle.mode" match="refsect3">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="refsect3info/subtitle">
- <xsl:apply-templates select="refsect3info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refsection = -->
-<xsl:template mode="db.subtitle.mode" match="refsection">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="refsectioninfo/subtitle">
- <xsl:apply-templates select="refsectioninfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % refsynopsisdiv = -->
-<xsl:template mode="db.subtitle.mode" match="refsynopsisdiv">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdivinfo/subtitle">
- <xsl:apply-templates select="refsynopsisdivinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sect1 = -->
-<xsl:template mode="db.subtitle.mode" match="sect1">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sect1info/subtitle">
- <xsl:apply-templates select="sect1info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sect2 = -->
-<xsl:template mode="db.subtitle.mode" match="sect2">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sect2info/subtitle">
- <xsl:apply-templates select="sect2info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sect3 = -->
-<xsl:template mode="db.subtitle.mode" match="sect3">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sect3info/subtitle">
- <xsl:apply-templates select="sect3info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sect4 = -->
-<xsl:template mode="db.subtitle.mode" match="sect4">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sect4info/subtitle">
- <xsl:apply-templates select="sect4info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sect5 = -->
-<xsl:template mode="db.subtitle.mode" match="sect5">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sect5info/subtitle">
- <xsl:apply-templates select="sect5info/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % section = -->
-<xsl:template mode="db.subtitle.mode" match="section">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="sectioninfo/subtitle">
- <xsl:apply-templates select="sectioninfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % set = -->
-<xsl:template mode="db.subtitle.mode" match="set">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="setinfo/subtitle">
- <xsl:apply-templates select="setinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % setindex = -->
-<xsl:template mode="db.subtitle.mode" match="setindex">
- <xsl:choose>
- <xsl:when test="subtitle">
- <xsl:apply-templates select="subtitle/node()"/>
- </xsl:when>
- <xsl:when test="setindexinfo/subtitle">
- <xsl:apply-templates select="setindexinfo/subtitle/node()"/>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.subtitle.mode % sidebar = -->
-<xsl:template mode="db.subtitle.mode" match="sidebar">
- <xsl:if test="sidebarinfo/subtitle">
- <xsl:apply-templates select="sidebarinfo/subtitle/node()"/>
- </xsl:if>
-</xsl:template>
-
-
-<!-- == msg:* ============================================================== -->
-<!--#% l10n.format.mode -->
-
-<xsl:template mode="l10n.format.mode" match="msg:title">
- <xsl:param name="node"/>
- <xsl:call-template name="db.title">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:titleabbrev">
- <xsl:param name="node"/>
- <xsl:call-template name="db.titleabbrev">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="l10n.format.mode" match="msg:subtitle">
- <xsl:param name="node"/>
- <xsl:call-template name="db.subtitle">
- <xsl:with-param name="node" select="$node"/>
- </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/xslt/docbook/common/db-xref.xsl b/xslt/docbook/common/db-xref.xsl
deleted file mode 100644
index 7f7386b..0000000
--- a/xslt/docbook/common/db-xref.xsl
+++ /dev/null
@@ -1,456 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
-<!--
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License
-along with this program; see the file COPYING.LGPL. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
--->
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:set="http://exslt.org/sets"
- exclude-result-prefixes="set"
- version="1.0">
-
-<!--!!==========================================================================
-DocBook Cross References
-:Requires: db-chunk db-label db-title gettext
--->
-
-
-<!--**==========================================================================
-db.ulink.tooltip
-Generates the tooltip for an external link
-$node: The element to generate a tooltip for
-$url: The URL of the link, usually from the #{url} attribute
--->
-<xsl:template name="db.ulink.tooltip">
- <xsl:param name="node" select="."/>
- <xsl:param name="url" select="$node/@url"/>
- <xsl:choose>
- <xsl:when test="starts-with($url, 'mailto:')">
- <xsl:variable name="addy" select="substring-after($url, 'mailto:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'email.tooltip'"/>
- <xsl:with-param name="string" select="$addy"/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="normalize-space($url)"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.xref.content
-Generates the content of a cross reference
-$linkend: The id of the linked-to element, usually from the #{linkend} attribute
-$target: The linked-to element
-$xrefstyle: The cross reference style, usually from the #{xrefstyle} attribute
-$role: For a role-based ${xrefstyle}, the role of the cross reference
-
-REMARK: The xrefstyle/role stuff needs to be documented
--->
-<xsl:template name="db.xref.content">
- <xsl:param name="linkend" select="@linkend"/>
- <xsl:param name="target" select="key('idkey', $linkend)"/>
- <xsl:param name="xrefstyle" select="@xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:choose>
- <!-- FIXME: should we prefer xrefstyle over xreflabel? -->
- <xsl:when test="$target/@xreflabel">
- <xsl:value-of select="$target/@xreflabel"/>
- </xsl:when>
- <xsl:when test="$xrefstyle = 'role:title'">
- <xsl:call-template name="db.title">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$xrefstyle = 'role:titleabbrev'">
- <xsl:call-template name="db.titleabbrev">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$xrefstyle = 'role:subtitle'">
- <xsl:call-template name="db.subtitle">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$xrefstyle = 'role:label'">
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="$xrefstyle = 'role:number'">
- <xsl:call-template name="db.number">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates mode="db.xref.content.mode" select="$target">
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="role" select="$role"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.xref.content.mode
-FIXME
-$xrefstyle: The cross reference style, usually from the #{xrefstyle} attribute
-$role: For a role-based ${xrefstyle}, the role of the cross reference
-
-REMARK: Document this mode
--->
-<xsl:template mode="db.xref.content.mode" match="*">
- <xsl:variable name="target_chunk_id">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="target_chunk" select="key('idkey', $target_chunk_id)"/>
- <xsl:choose>
- <xsl:when test="$target_chunk">
- <xsl:apply-templates mode="db.xref.content.mode" select="$target_chunk"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>No cross reference formatter found for </xsl:text>
- <xsl:value-of select="local-name(.)"/>
- <xsl:text> elements</xsl:text>
- </xsl:message>
- <xsl:variable name="title">
- <xsl:call-template name="db.title"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="string($title) != ''">
- <xsl:copy-of select="$title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@id"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- = db.xref.content.mode % appendix = -->
-<xsl:template mode="db.xref.content.mode" match="appendix">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'appendix.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % biblioentry = -->
-<xsl:template mode="db.xref.content.mode" match="biblioentry">
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % bibliography = -->
-<xsl:template mode="db.xref.content.mode" match="bibliography">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'bibliography.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % bibliomixed = -->
-<xsl:template mode="db.xref.content.mode" match="bibliomixed">
- <xsl:call-template name="db.label">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % book = -->
-<xsl:template mode="db.xref.content.mode" match="book">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'book.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % chapter = -->
-<xsl:template mode="db.xref.content.mode" match="chapter">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'chapter.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % example = -->
-<xsl:template mode="db.xref.content.mode" match="example">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'example.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % figure = -->
-<xsl:template mode="db.xref.content.mode" match="figure">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'figure.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % glossary = -->
-<xsl:template mode="db.xref.content.mode" match="glossary">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'glossary.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % glossentry = -->
-<xsl:template mode="db.xref.content.mode" match="glossentry">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'glossentry.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % part = -->
-<xsl:template mode="db.xref.content.mode" match="part">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'part.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % preface = -->
-<xsl:template mode="db.xref.content.mode" match="preface">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'preface.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % qandaentry = -->
-<xsl:template mode="db.xref.content.mode" match="qandaentry">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:apply-templates mode="db.xref.content.mode" select="question">
- <xsl:with-param name="xrefstyle" select="$xrefstyle"/>
- <xsl:with-param name="role" select="$role"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<!-- = db.xref.content.mode % question = -->
-<xsl:template mode="db.xref.content.mode" match="question">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'question.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % refentry = -->
-<xsl:template mode="db.xref.content.mode" match="refentry">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'refentry.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % refsection = -->
-<xsl:template mode="db.xref.content.mode" match="
- refsection | refsect1 | refsect2 | refsect3">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'refsection.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % refsynopsisdiv = -->
-<xsl:template mode="db.xref.content.mode" match="refsynopsisdiv">
- <xsl:call-template name="db.title"/>
-</xsl:template>
-
-<!-- = db.xref.content.mode % section = -->
-<xsl:template mode="db.xref.content.mode" match="
- section | sect1 | sect2 | sect3 | sect4 | sect5 | simplesect">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'section.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % synopfragment = -->
-<xsl:template mode="db.xref.content.mode" match="synopfragment">
- <xsl:param name="xrefstyle"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'synopfragment.label'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.content.mode % table = -->
-<xsl:template mode="db.xref.content.mode" match="table">
- <xsl:param name="xrefstyle"/>
- <xsl:param name="role" select="substring-after($xrefstyle, 'role:')"/>
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'table.xref'"/>
- <xsl:with-param name="role" select="$role"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.xref.target
-Generates the target identifier of a cross reference
-$linkend: The id of the linked-to element, usually from the #{linkend} attribute
-$target: The linked-to element
-$is_chunk: Whether ${target} is known to be a chunked element
-
-REMARK: Talk about how this works with chunking
--->
-<xsl:template name="db.xref.target">
- <xsl:param name="linkend" select="@linkend"/>
- <xsl:param name="target" select="key('idkey', $linkend)"/>
- <xsl:param name="is_chunk" select="false()"/>
- <xsl:choose>
- <xsl:when test="$linkend = $db.chunk.info_basename">
- <xsl:value-of
- select="concat($db.chunk.info_basename, $db.chunk.extension)"/>
- </xsl:when>
- <xsl:when test="set:has-same-node($target, /*)">
- <xsl:value-of select="concat($db.chunk.basename, $db.chunk.extension)"/>
- </xsl:when>
- <xsl:when test="$is_chunk">
- <xsl:value-of select="concat($linkend, $db.chunk.extension)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="target_chunk_id">
- <xsl:call-template name="db.chunk.chunk-id">
- <xsl:with-param name="node" select="$target"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="concat($target_chunk_id, $db.chunk.extension)"/>
- <xsl:if test="string($linkend) != '' and string($target_chunk_id) != string($linkend)">
- <xsl:value-of select="concat('#', $linkend)"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-
-<!--**==========================================================================
-db.xref.tooltip
-Generates the tooltip for a cross reference
-$linkend: The id of the linked-to element, usually from the #{linkend} attribute
-$target: The linked-to element
-
-REMARK: Document this
--->
-<xsl:template name="db.xref.tooltip">
- <xsl:param name="linkend" select="@linkend"/>
- <xsl:param name="target" select="key('idkey', $linkend)"/>
- <xsl:apply-templates mode="db.xref.tooltip.mode" select="$target"/>
-</xsl:template>
-
-
-<!--%%==========================================================================
-db.xref.tooltip.mode
-FIXME
-
-REMARK: Document this
--->
-<xsl:template mode="db.xref.tooltip.mode" match="*">
- <xsl:call-template name="db.title">
- <xsl:with-param name="node" select="."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.tooltip.mode % biblioentry | bibliomixed = -->
-<xsl:template mode="db.xref.tooltip.mode" match="biblioentry | bibliomixed">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'biblioentry.tooltip'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- = db.xref.tooltip.mode % glossentry = -->
-<xsl:template mode="db.xref.tooltip.mode" match="glossentry">
- <xsl:call-template name="l10n.gettext">
- <xsl:with-param name="msgid" select="'glossentry.tooltip'"/>
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="format" select="true()"/>
- </xsl:call-template>
-</xsl:template>
-
-</xsl:stylesheet>