summaryrefslogtreecommitdiff
path: root/common/gentext.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'common/gentext.xsl')
-rw-r--r--common/gentext.xsl57
1 files changed, 28 insertions, 29 deletions
diff --git a/common/gentext.xsl b/common/gentext.xsl
index 65fe480..38dc46e 100644
--- a/common/gentext.xsl
+++ b/common/gentext.xsl
@@ -1,15 +1,14 @@
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
- exclude-result-prefixes="doc"
+ xmlns:d="http://docbook.org/ns/docbook"
+ xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
+ exclude-result-prefixes="doc d"
version='1.0'>
<!-- ********************************************************************
- $Id: gentext.xsl 9790 2013-08-28 22:55:38Z bobstayton $
- ********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
- See ../README or http://docbook.sf.net/release/xsl/current/ for
+ See ../README or http://cdn.docbook.org/release/xsl/current/ for
copyright and other information.
******************************************************************** -->
@@ -26,7 +25,7 @@
</xsl:call-template>
</xsl:template>
-<xsl:template match="chapter" mode="object.title.template">
+<xsl:template match="d:chapter" mode="object.title.template">
<xsl:choose>
<xsl:when test="string($chapter.autolabel) != 0">
<xsl:call-template name="gentext.template">
@@ -47,7 +46,7 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="appendix" mode="object.title.template">
+<xsl:template match="d:appendix" mode="object.title.template">
<xsl:choose>
<xsl:when test="string($appendix.autolabel) != 0">
<xsl:call-template name="gentext.template">
@@ -68,7 +67,7 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="part" mode="object.title.template">
+<xsl:template match="d:part" mode="object.title.template">
<xsl:choose>
<xsl:when test="string($part.autolabel) != 0">
<xsl:call-template name="gentext.template">
@@ -89,8 +88,8 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
- |bridgehead|topic"
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5|d:simplesect
+ |d:bridgehead|d:topic"
mode="object.title.template">
<xsl:variable name="is.numbered">
<xsl:call-template name="label.this.section"/>
@@ -115,8 +114,8 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="procedure" mode="object.title.template">
- <xsl:variable name="title" select="title|blockinfo/title|info/title"/>
+<xsl:template match="d:procedure" mode="object.title.template">
+ <xsl:variable name="title" select="d:title|d:blockinfo/d:title|d:info/d:title"/>
<xsl:choose>
<xsl:when test="$formal.procedures != 0 and $title">
<xsl:call-template name="gentext.template">
@@ -155,35 +154,35 @@
<xsl:value-of select="'0'"/>
</xsl:template>
-<xsl:template match="section|sect1|sect2|sect3|sect4|sect5"
+<xsl:template match="d:section|d:sect1|d:sect2|d:sect3|d:sect4|d:sect5"
mode="is.autonumber">
<xsl:call-template name="label.this.section"/>
</xsl:template>
-<xsl:template match="figure|example|table|equation" mode="is.autonumber">
+<xsl:template match="d:figure|d:example|d:table|d:equation" mode="is.autonumber">
<xsl:value-of select="'1'"/>
</xsl:template>
-<xsl:template match="appendix" mode="is.autonumber">
+<xsl:template match="d:appendix" mode="is.autonumber">
<xsl:value-of select="$appendix.autolabel"/>
</xsl:template>
-<xsl:template match="chapter" mode="is.autonumber">
+<xsl:template match="d:chapter" mode="is.autonumber">
<xsl:value-of select="$chapter.autolabel"/>
</xsl:template>
-<xsl:template match="part" mode="is.autonumber">
+<xsl:template match="d:part" mode="is.autonumber">
<xsl:value-of select="$part.autolabel"/>
</xsl:template>
-<xsl:template match="preface" mode="is.autonumber">
+<xsl:template match="d:preface" mode="is.autonumber">
<xsl:value-of select="$preface.autolabel"/>
</xsl:template>
-<xsl:template match="question|answer" mode="is.autonumber">
+<xsl:template match="d:question|d:answer" mode="is.autonumber">
<xsl:choose>
<xsl:when test="$qanda.defaultlabel = 'number'
- and not(label)">
+ and not(d:label)">
<xsl:value-of select="'1'"/>
</xsl:when>
<xsl:otherwise>
@@ -192,16 +191,16 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="qandadiv" mode="is.autonumber">
+<xsl:template match="d:qandadiv" mode="is.autonumber">
<xsl:value-of select="$qandadiv.autolabel"/>
</xsl:template>
-<xsl:template match="bridgehead" mode="is.autonumber">
+<xsl:template match="d:bridgehead" mode="is.autonumber">
<!-- bridgeheads are not numbered -->
<xsl:text>0</xsl:text>
</xsl:template>
-<xsl:template match="procedure" mode="is.autonumber">
+<xsl:template match="d:procedure" mode="is.autonumber">
<xsl:value-of select="$formal.procedures"/>
</xsl:template>
@@ -236,7 +235,7 @@
<xsl:variable name="context">
<xsl:choose>
- <xsl:when test="self::equation and not(title) and not(info/title)">
+ <xsl:when test="self::d:equation and not(d:title) and not(d:info/d:title)">
<xsl:value-of select="'xref-number'"/>
</xsl:when>
<xsl:when test="string($autonumber) != 0
@@ -386,11 +385,11 @@
</xsl:call-template>
</xsl:template>
-<xsl:template match="listitem" mode="object.xref.markup">
+<xsl:template match="d:listitem" mode="object.xref.markup">
<xsl:param name="verbose" select="1"/>
<xsl:choose>
- <xsl:when test="parent::orderedlist">
+ <xsl:when test="parent::d:orderedlist">
<xsl:variable name="template">
<xsl:apply-templates select="." mode="object.xref.template"/>
</xsl:variable>
@@ -409,7 +408,7 @@
</xsl:choose>
</xsl:template>
-<xsl:template match="question" mode="object.xref.markup">
+<xsl:template match="d:question" mode="object.xref.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="referrer"/>
@@ -429,7 +428,7 @@
<xsl:variable name="template">
<xsl:choose>
<!-- This avoids double Q: Q: in xref when defaultlabel=qanda -->
- <xsl:when test="$deflabel = 'qanda' and not(label)">%n</xsl:when>
+ <xsl:when test="$deflabel = 'qanda' and not(d:label)">%n</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="object.xref.template">
<xsl:with-param name="purpose" select="$purpose"/>
@@ -569,7 +568,7 @@
<xsl:choose>
<xsl:when test="$referrer">
<xsl:variable name="referent-is-below">
- <xsl:for-each select="preceding::xref">
+ <xsl:for-each select="preceding::d:xref">
<xsl:if test="generate-id(.) = generate-id($referrer)">1</xsl:if>
</xsl:for-each>
</xsl:variable>