summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2003-10-22 23:56:28 +0000
committerShaun McCance <shaunm@src.gnome.org>2003-10-22 23:56:28 +0000
commit348ebfbb5245d928cd49d8abd7527e3a07887f54 (patch)
tree7bd11008e65c90156269b5588df81f726ddab675
parentd97b04d57d84de50cf82d90b22ad9a597f5c2a91 (diff)
downloadyelp-348ebfbb5245d928cd49d8abd7527e3a07887f54.tar.gz
- Removing db2html-node.xsl, replace with db2html-header.xsl
* stylesheets/ db2html-node.xsl: - Removing db2html-node.xsl, replace with db2html-header.xsl * stylesheets/ db2html-header.xsl: - Adding db2html-header.xsl - Does much of what db2html-node.xsl did, but better * stylesheets/ db2html-title.xsl: - New title-handling code * stylesheets/ db2html-chunk.xsl: - More intelligent chunking templates. Fewer hoops, easier to extend. * stylesheets/ db2html-admon.xsl: * stylesheets/ db2html-block.xsl: * stylesheets/ db2html-division.xsl: * stylesheets/ db2html-glossary.xsl: * stylesheets/ db2html-list.xsl: * stylesheets/ db2html-media.xsl: * stylesheets/ db2html-refentry.xsl: * stylesheets/ db2html-toc.xsl: - Rearranged block-handling code a bit - Using new title-handling code - Using new chunk-handling code - Using new title-handling code * stylesheets/ db2html-html.xsl: - New title-handling code necessitated changing how the HTML title was obtained. Current implementation is bad. * stylesheets/ db2html-inline.xsl: - Moved attribution from inline to block - Changed arrow for menuchoice * stylesheets/ db2html-navbar.xsl: - Temporarily disabled. Needs to work with new chunk-handling code. * stylesheets/ db2html-xref.xsl: - Created xref.content.mode, which will replace node.header.inline.mode. Needs work. * stylesheets/ db2html.xsl: - Using new chunk-handling code * stylesheets/ gettext.xsl: - Changes for the new title- and header-handling code
-rw-r--r--stylesheets/ChangeLog49
-rw-r--r--stylesheets/db2html-admon.xsl5
-rw-r--r--stylesheets/db2html-block.xsl264
-rw-r--r--stylesheets/db2html-chunk.xsl623
-rw-r--r--stylesheets/db2html-common.xsl1
-rw-r--r--stylesheets/db2html-division.xsl290
-rw-r--r--stylesheets/db2html-glossary.xsl2
-rw-r--r--stylesheets/db2html-header.xsl541
-rw-r--r--stylesheets/db2html-html.xsl3
-rw-r--r--stylesheets/db2html-inline.xsl6
-rw-r--r--stylesheets/db2html-list.xsl46
-rw-r--r--stylesheets/db2html-media.xsl2
-rw-r--r--stylesheets/db2html-navbar.xsl95
-rw-r--r--stylesheets/db2html-node.xsl782
-rw-r--r--stylesheets/db2html-param.xsl1
-rw-r--r--stylesheets/db2html-refentry.xsl51
-rw-r--r--stylesheets/db2html-title.xsl259
-rw-r--r--stylesheets/db2html-titlepage.xsl4
-rw-r--r--stylesheets/db2html-toc.xsl4
-rw-r--r--stylesheets/db2html-xref.xsl18
-rw-r--r--stylesheets/db2html.xsl6
-rw-r--r--stylesheets/gettext.xsl27
22 files changed, 1308 insertions, 1771 deletions
diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog
index a4234113..d23c21d1 100644
--- a/stylesheets/ChangeLog
+++ b/stylesheets/ChangeLog
@@ -1,3 +1,52 @@
+2003-10-22 Shaun McCance <shaunm@gnome.org>
+
+ * db2html-node.xsl:
+ - Removing db2html-node.xsl, replace with db2html-header.xsl
+
+ * db2html-header.xsl:
+ - Adding db2html-header.xsl
+ - Does much of what db2html-node.xsl did, but better
+
+ * db2html-title.xsl:
+ - New title-handling code
+
+ * db2html-chunk.xsl:
+ - More intelligent chunking templates. Fewer hoops, easier to extend.
+
+ * db2html-admon.xsl:
+ * db2html-block.xsl:
+ * db2html-division.xsl:
+ * db2html-glossary.xsl:
+ * db2html-list.xsl:
+ * db2html-media.xsl:
+ * db2html-refentry.xsl:
+ * db2html-toc.xsl:
+ - Rearranged block-handling code a bit
+ - Using new title-handling code
+ - Using new chunk-handling code
+ - Using new title-handling code
+
+ * db2html-html.xsl:
+ - New title-handling code necessitated changing how the HTML title
+ was obtained. Current implementation is bad.
+
+ * db2html-inline.xsl:
+ - Moved attribution from inline to block
+ - Changed arrow for menuchoice
+
+ * db2html-navbar.xsl:
+ - Temporarily disabled. Needs to work with new chunk-handling code.
+
+ * db2html-xref.xsl:
+ - Created xref.content.mode, which will replace node.header.inline.mode.
+ Needs work.
+
+ * db2html.xsl:
+ - Using new chunk-handling code
+
+ * gettext.xsl:
+ - Changes for the new title- and header-handling code
+
2003-10-16 Shaun McCance <shaunm@gnome.org>
* db2html-node.xsl:
diff --git a/stylesheets/db2html-admon.xsl b/stylesheets/db2html-admon.xsl
index f2b2b8b5..7a21387a 100644
--- a/stylesheets/db2html-admon.xsl
+++ b/stylesheets/db2html-admon.xsl
@@ -7,8 +7,7 @@
<xsl:call-template name="anchor"/>
<xsl:choose>
<xsl:when test="$text_only">
- <xsl:call-template name="node.heading"/>
- <xsl:apply-templates select="*[name(.) != 'title']"/>
+ <xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<table style="border: none;">
@@ -23,7 +22,7 @@
</img>
</td>
<th align="left" valign="top">
- <xsl:call-template name="node.heading"/>
+ <xsl:apply-templates select="title"/>
</th>
</tr>
<tr>
diff --git a/stylesheets/db2html-block.xsl b/stylesheets/db2html-block.xsl
index 038d2ff2..86f5d04b 100644
--- a/stylesheets/db2html-block.xsl
+++ b/stylesheets/db2html-block.xsl
@@ -1,175 +1,42 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-division "
-(name(.) = 'appendix') or (name(.) = 'article') or
-(name(.) = 'book') or (name(.) = 'bibliography') or
-(name(.) = 'chapter') or (name(.) = 'colophon') or
-(name(.) = 'glossary') or (name(.) = 'index') or
-(name(.) = 'part') or (name(.) = 'preface') or
-(name(.) = 'reference') or (name(.) = 'refentry') or
-(name(.) = 'refsect1') or (name(.) = 'refsect2') or
-(name(.) = 'refsect3') or (name(.) = 'refsection') or
-(name(.) = 'sect1') or (name(.) = 'sect2') or
-(name(.) = 'sect3') or (name(.) = 'sect4') or
-(name(.) = 'sect5') or (name(.) = 'section') or
-(name(.) = 'set') or (name(.) = 'setindex') or
-(name(.) = 'simplesect') ">
-<!ENTITY is-info "
-(name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or
-(name(.) = 'bibliographyinfo') or (name(.) = 'bookinfo') or
-(name(.) = 'chapterinfo') or (name(.) = 'glossaryinfo') or
-(name(.) = 'indexinfo') or (name(.) = 'partinfo') or
-(name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or
-(name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or
-(name(.) = 'refsect2info') or (name(.) = 'refsect3info') or
-(name(.) = 'refsectioninfo') or (name(.) = 'sect1info') or
-(name(.) = 'sect2info') or (name(.) = 'sect3info') or
-(name(.) = 'sect4info') or (name(.) = 'sect5info') or
-(name(.) = 'sectioninfo') or (name(.) = 'setinfo') or
-(name(.) = 'setindexinfo') ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- ======================================================================= -->
-<xsl:template name="block">
+<xsl:template name="block.simple" match="
+ abstract | attribution | authorblurb | caption |
+ dedication | example | figure | formalpara |
+ highlights | informalexample | informalfigure | informaltable |
+ msg | msgentry | msgexplan | msginfo |
+ partintro | simplemsgentry | sidebar | table ">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
<xsl:apply-templates/>
</div>
</xsl:template>
-<xsl:template name="block.pre">
- <pre class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </pre>
-</xsl:template>
-
-<!-- ======================================================================= -->
-
-<xsl:template match="abstract">
+<xsl:template name="block.blockquote" match="blockquote | epigraph">
<div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:if test="title or sidebarinfo/title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[name(.) != 'title']"/>
- </div>
-</xsl:template>
-
-<xsl:template match="authorblurb">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="blockquote | epigraph">
- <div class="{name(.)}">
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
+ <xsl:apply-templates select="title"/>
<blockquote>
<xsl:apply-templates
select="*[name(.) != 'title' and name(.) != 'attribution']"/>
</blockquote>
- <xsl:if test="attribution">
- <div class="attribution">
- <xsl:apply-templates select="attribution"/>
- </div>
- </xsl:if>
- </div>
-</xsl:template>
-
-<xsl:template match="caption">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="dedication">
- <div class="{name(.)}">
- <xsl:call-template name="node.heading"/>
- <xsl:apply-templates select="*[
- name(.) != 'title' and
- name(.) != 'subtitle' and
- name(.) != 'titleabbrev' ]"/>
+ <xsl:apply-templates select="attribution"/>
</div>
</xsl:template>
-<xsl:template match="example">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <div class="heading">
- <i>
- <xsl:apply-templates select="." mode="node.header.header.mode"/>
- </i>
- <xsl:apply-templates select="title/node()"/>
- </div>
- <xsl:apply-templates select="*[
- name(.) != 'blockinfo' and
- name(.) != 'title' and
- name(.) != 'titleabbrev' ]"/>
- </div>
-</xsl:template>
-
-<xsl:template match="figure">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <div class="heading">
- <i>
- <xsl:apply-templates select="." mode="node.header.header.mode"/>
- </i>
- <xsl:apply-templates select="title/node()"/>
- </div>
- <xsl:apply-templates select="*[
- name(.) != 'blockinfo' and
- name(.) != 'title' and
- name(.) != 'titleabbrev' ]"/>
- </div>
-</xsl:template>
-
-<xsl:template match="formalpara">
- <div class="{name(.)}">
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[name(.) != 'title']"/>
- </div>
-</xsl:template>
-
-<xsl:template match="highlights">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="informalexample">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </div>
-</xsl:template>
-
-<xsl:template match="informalfigure">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </div>
-</xsl:template>
-
-<xsl:template match="informaltable">
- <div class="{name(.)}">
+<xsl:template name="block.pre" match="
+ literallayout | programlisting | screen | synopsis">
+ <pre class="{name(.)}">
<xsl:call-template name="anchor"/>
<xsl:apply-templates/>
- </div>
-</xsl:template>
-
-<xsl:template match="literallayout">
- <xsl:call-template name="block.pre"/>
-</xsl:template>
-
-<xsl:template match="msg">
- <xsl:call-template name="block"/>
+ </pre>
</xsl:template>
-<xsl:template match="msgaud | msglevel | msgorig">
+<xsl:template name="block.header" match="msgaud | msglevel | msgorig">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
<xsl:call-template name="node.heading"/>
@@ -177,17 +44,7 @@
</div>
</xsl:template>
-<xsl:template match="msgentry">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="msgexplan">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="msginfo">
- <xsl:call-template name="block"/>
-</xsl:template>
+<!-- ======================================================================= -->
<xsl:template match="para">
<p>
@@ -202,31 +59,6 @@
</p>
</xsl:template>
-<xsl:template match="partintro">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="programlisting">
- <xsl:call-template name="block.pre"/>
-</xsl:template>
-
-<xsl:template match="screen">
- <xsl:call-template name="block.pre"/>
-</xsl:template>
-
-<xsl:template match="sidebar">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:if test="title or sidebarinfo/title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[
- (name(.) != 'sidebarinfo') and
- (name(.) != 'title') and
- (name(.) != 'titleabbrev') ]"/>
- </div>
-</xsl:template>
-
<xsl:template match="simpara">
<p>
<xsl:call-template name="anchor"/>
@@ -234,72 +66,6 @@
</p>
</xsl:template>
-<xsl:template match="simplemsgentry">
- <xsl:call-template name="block"/>
-</xsl:template>
-
-<xsl:template match="subtitle">
- <xsl:param name="depth" select="count(ancestor::*[&is-division;]) - 1"/>
- <xsl:variable name="element">
- <xsl:choose>
- <xsl:when test="$depth &lt; 6">
- <xsl:value-of select="concat('h', $depth + 2)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'h7'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="{$element}">
- <xsl:attribute name="class" select="'subtitle'"/>
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="synopsis">
- <xsl:call-template name="block.pre"/>
-</xsl:template>
-
-<xsl:template match="table">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <div class="heading">
- <i>
- <xsl:apply-templates select="." mode="node.header.header.mode"/>
- </i>
- <xsl:apply-templates select="title/node()"/>
- </div>
- <xsl:apply-templates select="*[
- name(.) != 'blockinfo' and
- name(.) != 'title' and
- name(.) != 'titleabbrev' ]"/>
- </div>
-</xsl:template>
-
-<xsl:template match="title">
- <xsl:param name="depth" select="count(ancestor::*[&is-division;]) - 1"/>
- <xsl:variable name="element">
- <xsl:choose>
- <xsl:when test="$depth &lt; 7">
- <xsl:value-of select="concat('h', $depth + 1)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'h7'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="parent" select="(parent::*[&is-info;]/.. | parent::*)[1]"/>
- <xsl:element name="{$element}">
- <xsl:attribute name="class">
- <xsl:value-of select="name($parent)"/>
- </xsl:attribute>
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates select="$parent" mode="node.header.header.mode"/>
- <xsl:apply-templates/>
- </xsl:element>
-</xsl:template>
-
<!-- ======================================================================= -->
</xsl:stylesheet>
diff --git a/stylesheets/db2html-chunk.xsl b/stylesheets/db2html-chunk.xsl
index 412ddfb2..ffa65857 100644
--- a/stylesheets/db2html-chunk.xsl
+++ b/stylesheets/db2html-chunk.xsl
@@ -1,33 +1,4 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-division "
- (name(.) = 'appendix') or (name(.) = 'article') or
- (name(.) = 'book') or (name(.) = 'bibliography') or
- (name(.) = 'chapter') or (name(.) = 'colophon') or
- (name(.) = 'glossary') or (name(.) = 'index') or
- (name(.) = 'part') or (name(.) = 'preface') or
- (name(.) = 'reference') or (name(.) = 'refentry') or
- (name(.) = 'refsect1') or (name(.) = 'refsect2') or
- (name(.) = 'refsect3') or (name(.) = 'refsection') or
- (name(.) = 'sect1') or (name(.) = 'sect2') or
- (name(.) = 'sect3') or (name(.) = 'sect4') or
- (name(.) = 'sect5') or (name(.) = 'section') or
- (name(.) = 'set') or (name(.) = 'setindex') or
- (name(.) = 'simplesect') ">
-<!ENTITY is-info "
- (name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or
- (name(.) = 'bibliographyinfo') or (name(.) = 'bookinfo') or
- (name(.) = 'chapterinfo') or (name(.) = 'glossaryinfo') or
- (name(.) = 'indexinfo') or (name(.) = 'partinfo') or
- (name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or
- (name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or
- (name(.) = 'refsect2info') or (name(.) = 'refsect3info') or
- (name(.) = 'refsectioninfo') or (name(.) = 'sect1info') or
- (name(.) = 'sect2info') or (name(.) = 'sect3info') or
- (name(.) = 'sect4info') or (name(.) = 'sect5info') or
- (name(.) = 'sectioninfo') or (name(.) = 'setinfo') or
- (name(.) = 'setindexinfo') ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
@@ -38,273 +9,487 @@
<xsl:template name="chunk">
<xsl:param name="node" select="."/>
- <xsl:param name="info" select="false()"/>
- <xsl:param name="divisions" select="false()"/>
<xsl:param name="id" select="$node/@id"/>
+ <xsl:variable name="depth_chunk">
+ <xsl:call-template name="depth.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
<exsl:document href="{concat($id, $html_extension)}">
<xsl:call-template name="html">
<xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="leaf" select="
- count($node/ancestor::*[&is-division;]) &gt;= $chunk_depth"/>
+ <xsl:with-param name="leaf" select="$depth_chunk &gt;= $chunk_depth"/>
</xsl:call-template>
</exsl:document>
- <xsl:if test="$generate_titlepage and $info and ($node = /*)">
- <xsl:apply-templates select="$info" mode="chunk.mode"/>
+ <xsl:if test="$generate_titlepage and ($node = /*)">
+ <xsl:apply-templates mode="chunk.info.mode" select="."/>
</xsl:if>
- <xsl:if test="count($node/ancestor::*[&is-division;]) &lt; $chunk_depth">
- <xsl:apply-templates select="$divisions" mode="chunk.mode"/>
+ <xsl:if test="$depth_chunk &lt; $chunk_depth">
+ <xsl:apply-templates mode="chunk.divisions.mode" select="."/>
</xsl:if>
</xsl:template>
-<!-- ======================================================================= -->
+<!-- == chunk.info.mode ==================================================== -->
-<xsl:template mode="chunk.mode" match="
- appendixinfo | articleinfo | bibliographyinfo | bookinfo |
- chapterinfo | glossaryinfo | indexinfo | partinfo |
- prefaceinfo | refentryinfo | referenceinfo | refsect1info |
- refsect2info | refsect3info | refsectioninfo | sect1info |
- sect2info | sect3info | sect4info | sect5info |
- sectioninfo | setinfo | setindexinfo ">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="id" select="'titlepage'"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="appendix">
+ <xsl:if test="appendixinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="appendixinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="appendix">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="appendixinfo"/>
- <xsl:with-param name="divisions" select="
- refentry | sect1 | section | simplesect "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="article">
+ <xsl:if test="articleinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="articleinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="article">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="articleinfo"/>
- <xsl:with-param name="divisions" select="
- refentry | sect1 | section | simplesect "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="bibliography">
+ <xsl:if test="bibliographyinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="bibliographyinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="book">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="bookinfo"/>
- <xsl:with-param name="divisions" select="
- appendix | article | bibliography | chapter | colophon | glossary |
- index | part | preface | reference | setindex "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="book">
+ <xsl:if test="bookinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="bookinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="bibliography">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="bibliographyinfo"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="chapter">
+ <xsl:if test="chapterinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="chapterinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="chapter">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="chapterinfo"/>
- <xsl:with-param name="divisions" select="
- refentry | sect1 | section | simplesect "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="glossary">
+ <xsl:if test="glossaryinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="glossaryinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="colophon">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="false()"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="index">
+ <xsl:if test="indexinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="indexinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="glossary">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="glossaryinfo"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="part">
+ <xsl:if test="partinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="partinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="index">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="indexinfo"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="preface">
+ <xsl:if test="prefaceinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="prefaceinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="part">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="partinfo"/>
- <xsl:with-param name="divisions" select="
- appendix | article | bibliography | chapter | glossary |
- index | preface | refentry | reference "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="refentry">
+ <xsl:if test="refentryinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="refentryinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="preface">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="prefaceinfo"/>
- <xsl:with-param name="divisions" select="
- refentry | sect1 | section | simplesect "/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="reference">
+ <xsl:if test="referenceinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="referenceinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="reference">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="referenceinfo"/>
- <xsl:with-param name="divisions" select="refentry"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="refsect1">
+ <xsl:if test="refsect1info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="refsect1info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="refentry">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="refentryinfo"/>
- <xsl:with-param name="divisions" select="refsect1 | refsection"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="refsect2">
+ <xsl:if test="refsect2info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="refsect2info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="refsect1">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="refsect1info"/>
- <xsl:with-param name="divisions" select="refsect2"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="refsect3">
+ <xsl:if test="refsect3info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="refsect3info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="refsect2">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="refsect2info"/>
- <xsl:with-param name="divisions" select="refsect3"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="refsection">
+ <xsl:if test="refsectioninfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="refsectioninfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="refsect3">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="refsect3info"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="sect1">
+ <xsl:if test="sect1info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sect1info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="refsection">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="refsectioninfo"/>
- <xsl:with-param name="divisions" select="refsection"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="sect2">
+ <xsl:if test="sect2info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sect2info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="sect1">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sect1info"/>
- <xsl:with-param name="divisions" select="refentry | sect2 | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="sect3">
+ <xsl:if test="sect3info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sect3info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="sect2">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sect2info"/>
- <xsl:with-param name="divisions" select="refentry | sect3 | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="sect4">
+ <xsl:if test="sect4info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sect4info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="sect3">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sect3info"/>
- <xsl:with-param name="divisions" select="refentry | sect4 | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="sect5">
+ <xsl:if test="sect5info">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sect5info"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="sect4">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sect4info"/>
- <xsl:with-param name="divisions" select="refentry | sect5 | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="section">
+ <xsl:if test="sectioninfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="sectioninfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="sect5">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sect5info"/>
- <xsl:with-param name="divisions" select="refentry | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="set">
+ <xsl:if test="setinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="setinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="section">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="sectioninfo"/>
- <xsl:with-param name="divisions" select="refentry | section | simplesect"/>
- </xsl:call-template>
+<xsl:template mode="chunk.info.mode" match="setindex">
+ <xsl:if test="setindexinfo">
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="setindexinfo"/>
+ <xsl:with-param name="id" select="'titlepage'"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:template>
-<xsl:template mode="chunk.mode" match="set">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="setinfo"/>
- <xsl:with-param name="divisions" select="book | setindex"/>
- </xsl:call-template>
+<!-- == chunk.divisions.mode =============================================== -->
+
+<xsl:template mode="chunk.divisions.mode" match="
+ appendix | article | chapter | preface">
+ <xsl:for-each select="refentry | sect1 | section | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
</xsl:template>
-<xsl:template mode="chunk.mode" match="setindex">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="setindexinfo"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.divisions.mode" match="book">
+ <xsl:for-each select="
+ appendix | article | bibliography | chapter |
+ colophon | glossary | index | part |
+ preface | reference | setindex ">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
</xsl:template>
-<xsl:template mode="chunk.mode" match="simplesect">
- <xsl:call-template name="chunk">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="info" select="false()"/>
- <xsl:with-param name="divisions" select="false()"/>
- </xsl:call-template>
+<xsl:template mode="chunk.divisions.mode" match="
+ bibliography | colophon | glossary | index |
+ reference | refsect3 | setindex | simplesect"/>
+
+<xsl:template mode="chunk.divisions.mode" match="part">
+ <xsl:for-each select="
+ appendix | article | bibliography | chapter | glossary |
+ index | preface | refentry | reference ">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="refentry">
+ <xsl:for-each select="refsect1 | refsection">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="refsect1">
+ <xsl:for-each select="refsect2">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="refsect2">
+ <xsl:for-each select="refsect3">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="refsection">
+ <xsl:for-each select="refsection">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="sect1">
+ <xsl:for-each select="refentry | sect2 | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="sect2">
+ <xsl:for-each select="refentry | sect3 | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="sect3">
+ <xsl:for-each select="refentry | sect4 | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="sect4">
+ <xsl:for-each select="refentry | sect5 | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="sect5">
+ <xsl:for-each select="refentry | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="section">
+ <xsl:for-each select="refentry | section | simplesect">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template mode="chunk.divisions.mode" match="set">
+ <xsl:for-each select="book | setindex">
+ <xsl:call-template name="chunk"/>
+ </xsl:for-each>
</xsl:template>
<!-- ======================================================================= -->
-<xsl:template mode="chunk.id.mode" match="*">
+<xsl:template name="depth.in.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="is_chunk">
+ <xsl:call-template name="is.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
<xsl:choose>
-<!--
- <xsl:when test="self::preface[@role = 'bookintro']">
- <xsl:apply-templates select=".." mode="chunk.id.mode"/>
- </xsl:when>
--->
- <xsl:when test="(&is-info;) and ($generate_titlepage) and (.. = /*)">
- <xsl:value-of select="'titlepage'"/>
+ <xsl:when test="$is_chunk = 1">0</xsl:when>
+ <xsl:when test="$node = /*">0</xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="parent_depth">
+ <xsl:call-template name="depth.in.chunk">
+ <xsl:with-param name="node" select="$node/.."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$parent_depth + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="depth.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:variable name="is_chunk">
+ <xsl:call-template name="is.chunk">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$node = /*">0</xsl:when>
+ <xsl:when test="$is_chunk = 1">
+ <xsl:variable name="parent_depth">
+ <xsl:call-template name="depth.chunk">
+ <xsl:with-param name="node" select="$node/.."/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="$parent_depth + 1"/>
</xsl:when>
- <xsl:when test="
- (&is-division;) and
- (count(ancestor::*[&is-division;]) &lt;= $chunk_depth)">
+ <xsl:otherwise>
+ <xsl:call-template name="depth.chunk">
+ <xsl:with-param name="node" select="$node/.."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ======================================================================= -->
+
+<xsl:template name="chunk.id">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="chunk.id.mode" select="$node"/>
+</xsl:template>
+
+<xsl:template mode="chunk.id.mode" match="
+ appendix | article | bibliography | book | chapter |
+ colophon | glossary | index | part | preface |
+ refentry | reference | refsect1 | refsect2 | refsect3 |
+ refsection | sect1 | sect2 | sect3 | sect4 |
+ sect5 | section | set | setindex | simplesect">
+ <xsl:variable name="is_chunk">
+ <xsl:call-template name="is.chunk"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$is_chunk = 1">
<xsl:value-of select="@id"/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select=".." mode="chunk.id.mode"/>
+ <xsl:call-template name="chunk.id">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="chunk.id.mode" match="
+ appendixinfo | articleinfo | bibliographyinfo |
+ bookinfo | chapterinfo | glossaryinfo |
+ indexinfo | partinfo | prefaceinfo |
+ refentryinfo | referenceinfo | refsect1info |
+ refsect2info | refsect3info | refsectioninfo |
+ sect1info | sect2info | sect3info |
+ sect4info | sect5info | sectioninfo |
+ setinfo | setindexinfo ">
+ <xsl:choose>
+ <xsl:when test="$generate_titlepage and (.. = /*)">
+ <xsl:text>titlepage</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="chunk.id">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+<xsl:template mode="chunk.id.mode" match="*">
+ <xsl:call-template name="chunk.id">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- ======================================================================= -->
+
+<xsl:template name="is.chunk">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="is.chunk.mode" select="$node"/>
+</xsl:template>
+
+<xsl:template mode="is.chunk.mode" match="
+ appendix | article | bibliography | book | chapter |
+ colophon | glossary | index | part | preface |
+ refentry | reference | refsect1 | refsect2 | refsect3 |
+ refsection | sect1 | sect2 | sect3 | sect4 |
+ sect5 | section | set | setindex | simplesect">
+ <xsl:choose>
+ <xsl:when test="count(
+ ancestor::appendix | ancestor::article |
+ ancestor::bibliography | ancestor::book |
+ ancestor::chapter | ancestor::colophon |
+ ancestor::glossary | ancestor::index |
+ ancestor::part | ancestor::preface |
+ ancestor::refentry | ancestor::reference |
+ ancestor::refsect1 | ancestor::refsect2 |
+ ancestor::refsect3 | ancestor::refsection |
+ ancestor::sect1 | ancestor::sect2 |
+ ancestor::sect3 | ancestor::sect4 |
+ ancestor::sect5 | ancestor::section |
+ ancestor::set | ancestor::setindex |
+ ancestor::simplesect )
+ &lt;= $chunk_depth ">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="is.chunk.mode" match="
+ appendixinfo | articleinfo | bibliographyinfo |
+ bookinfo | chapterinfo | glossaryinfo |
+ indexinfo | partinfo | prefaceinfo |
+ refentryinfo | referenceinfo | refsect1info |
+ refsect2info | refsect3info | refsectioninfo |
+ sect1info | sect2info | sect3info |
+ sect4info | sect5info | sectioninfo |
+ setinfo | setindexinfo ">
+ <xsl:choose>
+ <xsl:when test="$generate_titlepage and (.. = /*)">1</xsl:when>
+ <xsl:otherwise>0</xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="is.chunk.mode" match="*">0</xsl:template>
+
<!-- ======================================================================= -->
</xsl:stylesheet>
diff --git a/stylesheets/db2html-common.xsl b/stylesheets/db2html-common.xsl
index e96fb745..d473c530 100644
--- a/stylesheets/db2html-common.xsl
+++ b/stylesheets/db2html-common.xsl
@@ -1,4 +1,5 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
diff --git a/stylesheets/db2html-division.xsl b/stylesheets/db2html-division.xsl
index 44fd6de3..6943ba18 100644
--- a/stylesheets/db2html-division.xsl
+++ b/stylesheets/db2html-division.xsl
@@ -1,22 +1,4 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY divcomponent "
-abstract | address | anchor | authorblurb |
-beginpage | blockquote | bridgehead | calloutlist |
-caution | classsynopsis | cmdsynopsis | constraintdef |
-constructorsynopsis | desctructorsynopsis | epigraph | equation |
-example | fieldsynopsis | figure | formalpara |
-funcsynopsis | glosslist | graphic | graphicco |
-highlights | important | indexterm | informalequation |
-informalexample | informalfigure | informaltable | itemizedlist |
-literallayout | mediaobject | mediaobjectco | methodsynopsis |
-msgset | note | orderedlist | para |
-procedure | productionset | programlisting | programlistingco |
-qandaset | remark | screen | screenco |
-screenshot | segmentedlist | sidebar | simpara |
-simplelist | synopsis | table | tip |
-variablelist | warning ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -29,260 +11,84 @@ variablelist | warning ">
reference | refsect1 | refsect2 | refsect3 | refsection |
sect1 | sect2 | sect3 | sect4 | sect5 |
section | set | setindex | simplesect ">
- <xsl:param name="depth" select="0"/>
- <xsl:param name="leaf" select="true()"/>
+ <xsl:param name="depth_chunk">
+ <xsl:call-template name="depth.chunk"/>
+ </xsl:param>
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="depth.in.chunk"/>
+ </xsl:param>
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:apply-templates select="." mode="content.mode">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
<xsl:choose>
- <xsl:when test="$leaf">
- <xsl:apply-templates select="." mode="division.mode">
- <xsl:with-param name="depth" select="$depth"/>
+ <xsl:when test="$depth_chunk &lt; $chunk_depth">
+ <xsl:apply-templates mode="sans.divisions.mode">
+ <xsl:with-param name="depth_chunk" select="$depth_chunk"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
+ <xsl:call-template name="toc"/>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="toc"/>
+ <xsl:apply-templates>
+ <xsl:with-param name="depth_chunk" select="$depth_chunk"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
+ </xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template match="refentry">
- <xsl:param name="depth" select="0"/>
- <xsl:param name="leaf" select="true()"/>
+ <xsl:param name="depth_chunk">
+ <xsl:call-template name="depth.chunk"/>
+ </xsl:param>
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="depth_in_chunk"/>
+ </xsl:param>
<xsl:if test="preceding-sibling::refentry and $depth &gt; 0">
<hr class="refentry.seperator"/>
</xsl:if>
<div class="{name(.)}">
- <xsl:apply-templates select="." mode="content.mode">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
<xsl:choose>
- <xsl:when test="$leaf">
- <xsl:apply-templates select="." mode="division.mode">
- <xsl:with-param name="depth" select="$depth"/>
+ <xsl:when test="$depth_chunk &lt;= $chunk_depth">
+ <xsl:apply-templates mode="sans.divisions.mode">
+ <xsl:with-param name="depth_chunk" select="$depth_chunk"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
</xsl:apply-templates>
+ <xsl:call-template name="toc"/>
</xsl:when>
<xsl:otherwise>
- <xsl:call-template name="toc"/>
+ <xsl:apply-templates>
+ <xsl:with-param name="depth_chunk" select="$depth_chunk"/>
+ <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
+ </xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
-<!-- ======================================================================= -->
+<!-- == sans.divisions.mode =============================================== -->
-<xsl:template mode="content.mode" match="
- appendix | article | chapter | colophon | preface | refsect1 |
- refsect2 | refsect3 | refsection | sect1 | sect2 | sect3 |
- sect4 | sect5 | section | simplesect ">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="&divcomponent;"/>
-</xsl:template>
+<xsl:template mode="sans.divisions.mode" match="
+ appendix | article | book | bibliography | chapter |
+ colophon | glossary | index | part | preface |
+ reference | refentry | refsect1 | refsect2 | refsect3 |
+ refsection | sect1 | sect2 | sect3 | sect4 |
+ sect5 | section | set | setindex | simplesect"/>
-<xsl:template mode="content.mode" match="book">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="dedication"/>
- <xsl:apply-templates select="preface[@role = 'bookintro']"/>
-</xsl:template>
-
-<xsl:template mode="content.mode" match="bibliography">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="
- &divcomponent; | bibliodiv | biblioentry | bibliomixed"/>
-</xsl:template>
-
-<xsl:template mode="content.mode" match="glossary">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="&divcomponent; | glossdiv | glossentry"/>
-</xsl:template>
-
-<xsl:template mode="content.mode" match="index | setindex">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="
- &divcomponent; | indexdiv | indexentry"/>
-</xsl:template>
+<xsl:template mode="sans.divisions.mode" match="
+ appendixinfo | articleinfo | bibliographyinfo |
+ bookinfo | chapterinfo | glossaryinfo |
+ indexinfo | partinfo | prefaceinfo |
+ refentryinfo | referenceinfo | refsect1info |
+ refsect2info | refsect3info | refsectioninfo |
+ sect1info | sect2info | sect3info |
+ sect4info | sect5info | sectioninfo |
+ setinfo | setindexinfo "/>
-<xsl:template mode="content.mode" match="part | reference">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="partintro"/>
+<xsl:template mode="sans.divisions.mode" match="*">
+ <xsl:apply-templates select="."/>
</xsl:template>
-<xsl:template mode="content.mode" match="refentry">
- <xsl:param name="depth" select="0"/>
- <xsl:choose>
- <xsl:when test="refmeta/refentrytitle">
- <xsl:apply-templates select="refmeta/refentrytitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:apply-templates select="refentryinfo/title">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
- </xsl:when>
- </xsl:choose>
- <xsl:apply-templates
- select="*[name(.) != 'refsect1' and name(.) != 'refsection']"/>
-</xsl:template>
-
-<xsl:template mode="content.mode" match="set">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="title | subtitle">
- <xsl:with-param name="depth" select="$depth"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<!-- ======================================================================= -->
-
-<xsl:template mode="division.mode" match="
- appendix | article | chapter | preface">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | sect1 | section | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="book">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="
- appendix | article | bibliography | chapter | colophon |
- glossary | index | part | reference | setindex |
- preface[@role != 'bookintro'] ">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="bibliography"/>
-<xsl:template mode="division.mode" match="colophon"/>
-
-<xsl:template mode="division.mode" match="glossary">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="bibliography">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="index"/>
-
-<xsl:template mode="division.mode" match="part">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="
- appendix | article | bibliography | chapter | glossary |
- index | preface | refentry | reference ">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="refentry">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refsect1 | refsection">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="reference">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="refsect1">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refsect2">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="refsect2">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refsect3">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="refsect3"/>
-
-<xsl:template mode="division.mode" match="refsection">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refsection">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="sect1">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | sect2 | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="sect2">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | sect3 | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="sect3">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | sect4 | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="sect4">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | sect5 | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="sect5">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="section">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="refentry | section | simplesect">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="set">
- <xsl:param name="depth" select="0"/>
- <xsl:apply-templates select="book | setindex">
- <xsl:with-param name="depth" select="$depth + 1"/>
- </xsl:apply-templates>
-</xsl:template>
-
-<xsl:template mode="division.mode" match="setindex"/>
-<xsl:template mode="division.mode" match="simplesect"/>
-
<!-- ======================================================================= -->
</xsl:stylesheet>
diff --git a/stylesheets/db2html-glossary.xsl b/stylesheets/db2html-glossary.xsl
index 807e9344..157a5879 100644
--- a/stylesheets/db2html-glossary.xsl
+++ b/stylesheets/db2html-glossary.xsl
@@ -37,7 +37,7 @@
</xsl:template>
<xsl:template match="glossentry">
- <xsl:call-template name="block"/>
+ <xsl:call-template name="block.simple"/>
</xsl:template>
<xsl:template match="glosslist">
diff --git a/stylesheets/db2html-header.xsl b/stylesheets/db2html-header.xsl
new file mode 100644
index 00000000..0cda16b3
--- /dev/null
+++ b/stylesheets/db2html-header.xsl
@@ -0,0 +1,541 @@
+<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- == header.prefix ====================================================== -->
+
+<!-- header.prefix -->
+<xsl:template name="header.prefix">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="header.prefix.mode" select="$node"/>
+</xsl:template>
+
+<!-- header.prefix.named -->
+<xsl:template name="header.prefix.named" mode="header.prefix.mode" match="
+ appendix | chapter | example | figure | part | table">
+ <xsl:call-template name="format.header.prefix.named">
+ <xsl:with-param name="header">
+ <xsl:call-template name="header"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- header.prefix.unnamed -->
+<xsl:template name="header.prefix.unnamed" mode="header.prefix.mode" match="
+ sect1 | sect2 | sect3 | sect4 | sect5 | section | simplesect ">
+ <xsl:call-template name="format.header.prefix.unnamed">
+ <xsl:with-param name="header">
+ <xsl:call-template name="header.number"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.prefix.mode" match="article | reference">
+ <xsl:if test="
+ (preceding-sibling::*[name(.) = name(current())]) or
+ (following-sibling::*[name(.) = name(current())]) or
+ (parent::part/preceding-sibling::part/*[name(.) = name(current())]) or
+ (parent::part/following-sibling::part/*[name(.) = name(current())]) ">
+ <xsl:call-template name="header.prefix.unnamed"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template mode="header.prefix.mode" match="title | subtitle">
+ <xsl:apply-templates mode="header.prefix.mode" select=".."/>
+</xsl:template>
+
+<xsl:template mode="header.prefix.mode" match="*"/>
+
+<!-- == header ============================================================= -->
+
+<!-- header -->
+<xsl:template name="header">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="header.mode" select="$node"/>
+</xsl:template>
+
+<!-- header -->
+<xsl:template name="header.named" mode="header.mode" match="
+ appendix | chapter | part | sect1 | sect2 |
+ sect3 | sect4 | sect5 | section | simplesect">
+ <xsl:call-template name="format.header">
+ <xsl:with-param name="header">
+ <xsl:call-template name="header.name"/>
+ </xsl:with-param>
+ <xsl:with-param name="number">
+ <xsl:call-template name="header.number"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="article | reference">
+ <xsl:if test="
+ (preceding-sibling::*[name(.) = name(current())]) or
+ (following-sibling::*[name(.) = name(current())]) or
+ (parent::part/preceding-sibling::part/*[name(.) = name(current())]) or
+ (parent::part/following-sibling::part/*[name(.) = name(current())]) ">
+ <xsl:call-template name="header.named"/>
+ </xsl:if>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="example | figure | table">
+ <xsl:choose>
+ <xsl:when test="@label">
+ <xsl:value-of select="@label"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="header.named"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="title | subtitle">
+ <xsl:apply-templates mode="header.mode" select=".."/>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="appendixinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Appendix'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="articleinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Article'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="bibliographyinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Bibliography'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="bookinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Book'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="chapterinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Chapter'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="glossaryinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Glossary'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="indexinfo | setindexinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Index'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="partinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Part'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="prefaceinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Preface'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="refentryinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Entry'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="referenceinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Reference'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="
+ refsect1info | refsect2info | refsect3info | refsectioninfo |
+ sect1info | sect2info | sect3info | sect4info |
+ sect5info | sectioninfo ">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Section'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="setinfo">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'About This Set'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.mode" match="*"/>
+
+<!-- == header.name ======================================================== -->
+
+<xsl:template name="header.name">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="header.name.mode" select="$node"/>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="appendix">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Appendix'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="article">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Article'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="book">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Book'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="bibliography">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Bigliography'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="caution">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Caution'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="chapter">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Chapter'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="colophon">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Colophon'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="dedication">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Dedication'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="example">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Example'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="figure">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Figure'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="glossary">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Glossary'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="important">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Important'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="index">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Index'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="msgaud">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Message Audience'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="msglevel">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Message Level'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="msgorig">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Message Origin'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="note">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Note'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="part">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Part'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="preface">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Preface'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="reference">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Reference'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="refentry">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Reference Entry'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="
+ refsect1 | refsect2 | refsect3 | refsection">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Reference Section'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="
+ sect1 | sect2 | sect3 | sect4 | section | simplesect">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Section'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="setindex">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Set Index'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="table">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Table'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="tip">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Tip'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="warning">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Warning'"/>
+ </xsl:call-template>
+</xsl:template>
+
+
+<xsl:template mode="header.name.mode" match="subtitle">
+ <xsl:apply-templates mode="header.name.mode" select=".."/>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="title">
+ <xsl:apply-templates mode="header.name.mode" select=".."/>
+</xsl:template>
+
+<xsl:template mode="header.name.mode" match="*">
+ <xsl:call-template name="gettext">
+ <xsl:with-param name="key" select="'Unknown'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- == header.number.mode ================================================= -->
+
+<xsl:template name="header.number">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="header.number.mode" select="$node"/>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="appendix">
+ <xsl:call-template name="format.appendix.number">
+ <xsl:with-param name="appendix" select="
+ count(preceding-sibling::appendix) + 1 +
+ count(parent::part/preceding-sibling::part/appendix)"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="article">
+ <xsl:call-template name="format.article.number">
+ <xsl:with-param name="article" select="
+ count(preceding-sibling::article) + 1 +
+ count(parent::part/preceding-sibling::part/article)"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="chapter">
+ <xsl:call-template name="format.chapter.number">
+ <xsl:with-param name="chapter" select="
+ count(preceding-sibling::chapter) + 1 +
+ count(parent::part/preceding-sibling::part/chapter)"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="part">
+ <xsl:call-template name="format.part.number">
+ <xsl:with-param name="part" select="
+ count(preceding-sibling::part) + 1"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="reference">
+ <xsl:call-template name="format.reference.number">
+ <xsl:with-param name="reference" select="
+ count(preceding-sibling::reference) + 1 +
+ count(parent::part/preceding-sibling::part/reference)"/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="
+ refentry | refsect1 | refsect2 | refsect3 | refsection |
+ sect1 | sect2 | sect3 | sect4 | sect5 |
+ section | simplesect">
+ <xsl:variable name="sect" select="."/>
+ <xsl:choose>
+ <xsl:when test="
+ name(..) = 'article' or name(..) = 'partintro' or name(..) = 'preface'">
+ <xsl:call-template name="format.section.number">
+ <xsl:with-param name="section" select="
+ count(preceding-sibling::*[name(.) = name($sect)]) + 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="format.subsection.number">
+ <xsl:with-param name="parent">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+ </xsl:with-param>
+ <xsl:with-param name="section" select="
+ count(preceding-sibling::*[name(.) = name($sect)]) + 1"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="
+ book | bibliography | colophon | glossary |
+ index | preface | set | setindex "/>
+
+<xsl:template mode="header.number.mode" match="subtitle">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="title">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="*">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template mode="header.number.mode" match="example | figure | table">
+ <xsl:variable name="parent">
+ <xsl:choose>
+ <xsl:when test="
+ ancestor::*[
+ (name(.) = 'refentry') or (name(.) = 'sect1') or
+ (name(.) = 'section') or (name(.) = 'simplesect') ]
+ [parent::article]">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select="
+ ancestor::*[
+ (name(.) = 'refentry') or (name(.) = 'sect1') or
+ (name(.) = 'section') or (name(.) = 'simplesect') ]
+ [parent::article][last()]"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="ancestor::*[name(.) = 'appendix' or name(.) = 'chapter']">
+ <xsl:call-template name="header.number">
+ <xsl:with-param name="node" select="
+ ancestor::*[name(.) = 'appendix' or name(.) = 'chapter'][1]"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="num">
+ <xsl:choose>
+ <xsl:when test="
+ ancestor::*[
+ (name(.) = 'refentry') or (name(.) = 'sect1') or
+ (name(.) = 'section') or (name(.) = 'simplesect') ]
+ [parent::article]">
+ <xsl:value-of select="count(
+ ancestor-or-self::*[ancestor::*[
+ (name(.) = 'refentry') or (name(.) = 'sect1') or
+ (name(.) = 'section') or (name(.) = 'simplesect') ]
+ [parent::article]
+ ]/preceding-sibling::*/descendant-or-self::*[
+ name(.) = name(current())]
+ ) + 1"/>
+ </xsl:when>
+ <xsl:when test="ancestor::*[name(.) = 'appendix' or name(.) = 'chapter']">
+ <xsl:value-of select="count(
+ ancestor-or-self::*[ancestor::*[
+ name(.) = 'appendix' or name(.) = 'chapter' ]
+ ]/preceding-sibling::*/descendant-or-self::*[
+ name(.) = name(current())]
+ ) + 1"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="count(preceding::*[name(.) = name(current())]) + 1"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="not($parent)">
+ <xsl:value-of select="$num"/>
+ </xsl:when>
+ <xsl:when test="name(.) = 'example'">
+ <xsl:call-template name="format.example.number">
+ <xsl:with-param name="parent" select="$parent"/>
+ <xsl:with-param name="example" select="$num"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="name(.) = 'figure'">
+ <xsl:call-template name="format.figure.number">
+ <xsl:with-param name="parent" select="$parent"/>
+ <xsl:with-param name="figure" select="$num"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="name(.) = 'table'">
+ <xsl:call-template name="format.table.number">
+ <xsl:with-param name="parent" select="$parent"/>
+ <xsl:with-param name="table" select="$num"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- ======================================================================= -->
+
+</xsl:stylesheet>
diff --git a/stylesheets/db2html-html.xsl b/stylesheets/db2html-html.xsl
index ae9b6ed3..bfed2397 100644
--- a/stylesheets/db2html-html.xsl
+++ b/stylesheets/db2html-html.xsl
@@ -1,4 +1,5 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -15,7 +16,7 @@
<html>
<head>
<title>
- <xsl:apply-templates select="$node" mode="title.text.mode"/>
+ <xsl:value-of select="title"/>
</title>
<style type="text/css">
<xsl:call-template name="html.css">
diff --git a/stylesheets/db2html-inline.xsl b/stylesheets/db2html-inline.xsl
index 67414c4e..7f4fd2cf 100644
--- a/stylesheets/db2html-inline.xsl
+++ b/stylesheets/db2html-inline.xsl
@@ -82,10 +82,6 @@
<xsl:call-template name="inline.italic"/>
</xsl:template>
-<xsl:template match="attribution">
- <xsl:call-template name="inline"/>
-</xsl:template>
-
<xsl:template match="author">
<span class="{name(.)}"><xsl:call-template name="person.name"/></span>
</xsl:template>
@@ -351,7 +347,7 @@
<span class="{name(.)}">
<xsl:for-each select="*[name(.) != 'shortcut']">
<xsl:if test="position() &gt; 1">
- <xsl:text>&#8201;&#8594;&#8201;</xsl:text>
+ <xsl:text>&#x2009;&#x2192;&#x2009;</xsl:text>
</xsl:if>
<xsl:apply-templates select="."/>
</xsl:for-each>
diff --git a/stylesheets/db2html-list.xsl b/stylesheets/db2html-list.xsl
index f6208e23..4c45163e 100644
--- a/stylesheets/db2html-list.xsl
+++ b/stylesheets/db2html-list.xsl
@@ -1,18 +1,4 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY listcomponent "
-abstract | address | anchor | authorblurb |
-beginpage | blockquote | bridgehead | caution |
-classsynopsis | cmdsynopsis | constructorsynopsis | desctructorsynopsis |
-epigraph | fieldsynopsis | formalpara | funcsynopsis |
-graphic | graphicco | highlights | important |
-indexterm | informalequation | informalexample | informalfigure |
-informaltable | literallayout | mediaobject | mediaobjectco |
-methodsynopsis | note | para | programlisting |
-programlistingco | remark | screen | screenco |
-screenshot | simpara | synopsis | tip |
-warning ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -22,10 +8,7 @@ warning ">
<xsl:template match="itemizedlist">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="&listcomponent;"/>
+ <xsl:apply-templates select="*[name(.) != 'listitem']"/>
<ul>
<xsl:if test="@mark">
<xsl:attribute name="style">
@@ -100,10 +83,7 @@ warning ">
</xsl:variable>
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="&listcomponent;"/>
+ <xsl:apply-templates select="*[name(.) != 'listitem']"/>
<ol>
<xsl:if test="@numeration">
<xsl:attribute name="type">
@@ -150,12 +130,7 @@ warning ">
<xsl:template match="procedure">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[
- (name(.) != 'blockinfo') and (name(.) != 'title') and
- (name(.) != 'titleabbrev') and (name(.) != 'step') ]"/>
+ <xsl:apply-templates select="*[name(.) != 'step']"/>
<xsl:choose>
<xsl:when test="count(step) = 1">
<ul>
@@ -173,11 +148,7 @@ warning ">
<xsl:template match="step">
<li>
- <xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[name(.) != 'title']"/>
+ <xsl:apply-templates/>
</li>
</xsl:template>
@@ -195,9 +166,7 @@ warning ">
<xsl:template match="segmentedlist">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
+ <xsl:apply-templates select="title"/>
<ul style="list-style-type: none;">
<xsl:apply-templates select="seglistitem"/>
</ul>
@@ -246,10 +215,7 @@ warning ">
<xsl:template match="variablelist">
<div class="{name(.)}">
<xsl:call-template name="anchor"/>
- <xsl:if test="title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="&listcomponent;"/>
+ <xsl:apply-templates select="*[name(.) != 'varlistentry']"/>
<dl>
<xsl:apply-templates select="varlistentry"/>
</dl>
diff --git a/stylesheets/db2html-media.xsl b/stylesheets/db2html-media.xsl
index 86f93a60..d372ba7a 100644
--- a/stylesheets/db2html-media.xsl
+++ b/stylesheets/db2html-media.xsl
@@ -175,7 +175,7 @@
</xsl:template>
<xsl:template match="screenshot">
- <xsl:call-template name="block"/>
+ <xsl:call-template name="block.simple"/>
</xsl:template>
<xsl:template match="textdata">
diff --git a/stylesheets/db2html-navbar.xsl b/stylesheets/db2html-navbar.xsl
index ac1e12da..ea273fb9 100644
--- a/stylesheets/db2html-navbar.xsl
+++ b/stylesheets/db2html-navbar.xsl
@@ -1,46 +1,26 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-division "
- (name(.) = 'appendix') or (name(.) = 'article') or
- (name(.) = 'book') or (name(.) = 'bibliography') or
- (name(.) = 'chapter') or (name(.) = 'colophon') or
- (name(.) = 'glossary') or (name(.) = 'index') or
- (name(.) = 'part') or (name(.) = 'preface') or
- (name(.) = 'reference') or (name(.) = 'refentry') or
- (name(.) = 'refsect1') or (name(.) = 'refsect2') or
- (name(.) = 'refsect3') or (name(.) = 'refsection') or
- (name(.) = 'sect1') or (name(.) = 'sect2') or
- (name(.) = 'sect3') or (name(.) = 'sect4') or
- (name(.) = 'sect5') or (name(.) = 'section') or
- (name(.) = 'set') or (name(.) = 'setindex') or
- (name(.) = 'simplesect') ">
-<!ENTITY is-info "
- (name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or
- (name(.) = 'bibliographyinfo') or (name(.) = 'bookinfo') or
- (name(.) = 'chapterinfo') or (name(.) = 'glossaryinfo') or
- (name(.) = 'indexinfo') or (name(.) = 'partinfo') or
- (name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or
- (name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or
- (name(.) = 'refsect2info') or (name(.) = 'refsect3info') or
- (name(.) = 'refsectioninfo') or (name(.) = 'sect1info') or
- (name(.) = 'sect2info') or (name(.) = 'sect3info') or
- (name(.) = 'sect4info') or (name(.) = 'sect5info') or
- (name(.) = 'sectioninfo') or (name(.) = 'setinfo') or
- (name(.) = 'setindexinfo') ">
-]>
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
+<!-- == navbar.following.link ============================================== -->
+
+<xsl:template name="navbar.following.link">
+ <xsl:param name="node" select="."/>
+ <xsl:apply-templates mode="navbar.following.link.mode" select="$node"/>
+</xsl:template>
+
<xsl:template match="*" mode="navbar.following.link.mode">
- <xsl:variable name="depth" select="count(ancestor::*[&is-division;])"/>
+<!--
+ <xsl:variable name="depth" select="count(ancestor::*[&is-div;])"/>
<xsl:choose>
- <xsl:when test="not(&is-division;)">
+ <xsl:when test="not(&is-div;)">
<xsl:apply-templates mode="navbar.following.link.mode"
- select="ancestor::*[&is-division;][1]"/>
+ select="ancestor::*[&is-div;][1]"/>
</xsl:when>
- <xsl:when test="following-sibling::*[&is-division;]">
+ <xsl:when test="following-sibling::*[&is-div;]">
<xsl:variable name="foll"
- select="following-sibling::*[&is-division;][1]"/>
+ select="following-sibling::*[&is-div;][1]"/>
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="$foll/@id"/>
<xsl:with-param name="target" select="$foll"/>
@@ -50,14 +30,16 @@
<xsl:apply-templates select=".." mode="navbar.following.link.mode"/>
</xsl:when>
</xsl:choose>
+-->
</xsl:template>
<xsl:template match="*" mode="navbar.last.link.mode">
- <xsl:variable name="depth" select="count(ancestor::*[&is-division;])"/>
+<!--
+ <xsl:variable name="depth" select="count(ancestor::*[&is-div;])"/>
<xsl:choose>
- <xsl:when test="not(&is-division;)">
+ <xsl:when test="not(&is-div;)">
<xsl:apply-templates mode="navbar.last.link.mode"
- select="ancestor::*[&is-division;][1]"/>
+ select="ancestor::*[&is-div;][1]"/>
</xsl:when>
<xsl:when test="$depth &gt; $chunk_depth">
<xsl:apply-templates select="." mode="navbar.prev.link.mode"/>
@@ -68,9 +50,9 @@
<xsl:with-param name="target" select="."/>
</xsl:call-template>
</xsl:when>
- <xsl:when test="*[&is-division;]">
+ <xsl:when test="*[&is-div;]">
<xsl:apply-templates mode="navbar.last.link.mode"
- select="*[&is-division;][last()]"/>
+ select="*[&is-div;][last()]"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="xref">
@@ -79,10 +61,12 @@
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
+-->
</xsl:template>
<xsl:template match="*" mode="navbar.prev.link.mode">
- <xsl:variable name="depth" select="count(ancestor::*[&is-division;])"/>
+<!--
+ <xsl:variable name="depth" select="count(ancestor::*[&is-div;])"/>
<xsl:variable name="chunk_id">
<xsl:apply-templates select="." mode="chunk.id.mode"/>
</xsl:variable>
@@ -90,56 +74,58 @@
<xsl:when test="string($chunk_id) != @id">
<xsl:apply-templates select="id($chunk_id)" mode="navbar.prev.link.mode"/>
</xsl:when>
- <xsl:when test="&is-info;"/>
+ <xsl:when test="&is-div-info;"/>
<xsl:when test="$depth &gt; $chunk_depth">
<xsl:apply-templates select=".." mode="navbar.prev.link.mode"/>
</xsl:when>
<xsl:when test="
- ($depth = $chunk_depth) and (preceding-sibling::*[&is-division;])">
- <xsl:variable name="prev" select="preceding-sibling::*[&is-division;][1]"/>
+ ($depth = $chunk_depth) and (preceding-sibling::*[&is-div;])">
+ <xsl:variable name="prev" select="preceding-sibling::*[&is-div;][1]"/>
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="$prev/@id"/>
<xsl:with-param name="target" select="$prev"/>
</xsl:call-template>
</xsl:when>
- <xsl:when test="preceding-sibling::*[&is-division;]">
+ <xsl:when test="preceding-sibling::*[&is-div;]">
<xsl:apply-templates mode="navbar.last.link.mode"
- select="preceding-sibling::*[&is-division;][1]"/>
+ select="preceding-sibling::*[&is-div;][1]"/>
</xsl:when>
- <xsl:when test="parent::*[&is-division;]">
+ <xsl:when test="parent::*[&is-div;]">
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="../@id"/>
<xsl:with-param name="target" select=".."/>
</xsl:call-template>
</xsl:when>
- <xsl:when test="$generate_titlepage and (. = /*) and *[&is-info;]">
- <xsl:variable name="prev" select="*[&is-info;][1]"/>
+ <xsl:when test="$generate_titlepage and (. = /*) and *[&is-div-info;]">
+ <xsl:variable name="prev" select="*[&is-div-info;][1]"/>
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="$prev/@id"/>
<xsl:with-param name="target" select="$prev"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
+-->
</xsl:template>
<xsl:template match="*" mode="navbar.next.link.mode">
- <xsl:variable name="depth" select="count(ancestor::*[&is-division;])"/>
+<!--
+ <xsl:variable name="depth" select="count(ancestor::*[&is-div;])"/>
<xsl:choose>
- <xsl:when test="&is-info;">
+ <xsl:when test="&is-div-info;">
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="../@id"/>
<xsl:with-param name="target" select=".."/>
</xsl:call-template>
</xsl:when>
- <xsl:when test="not(&is-division;)">
+ <xsl:when test="not(&is-div;)">
<xsl:apply-templates mode="navbar.next.link.mode"
- select="ancestor::*[&is-division;][1]"/>
+ select="ancestor::*[&is-div;][1]"/>
</xsl:when>
<xsl:when test="$depth &gt; $chunk_depth">
<xsl:apply-templates select="." mode="navbar.next.link.mode"/>
</xsl:when>
- <xsl:when test="($depth &lt; $chunk_depth) and (*[&is-division;])">
- <xsl:variable name="next" select="*[&is-division;][1]"/>
+ <xsl:when test="($depth &lt; $chunk_depth) and (*[&is-div;])">
+ <xsl:variable name="next" select="*[&is-div;][1]"/>
<xsl:call-template name="xref">
<xsl:with-param name="linkend" select="$next/@id"/>
<xsl:with-param name="target" select="$next"/>
@@ -149,6 +135,7 @@
<xsl:apply-templates select="." mode="navbar.following.link.mode"/>
</xsl:otherwise>
</xsl:choose>
+-->
</xsl:template>
</xsl:stylesheet>
diff --git a/stylesheets/db2html-node.xsl b/stylesheets/db2html-node.xsl
deleted file mode 100644
index 3ac23854..00000000
--- a/stylesheets/db2html-node.xsl
+++ /dev/null
@@ -1,782 +0,0 @@
-<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-info "
- (name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or
- (name(.) = 'bibliographyinfo') or (name(.) = 'bookinfo') or
- (name(.) = 'chapterinfo') or (name(.) = 'glossaryinfo') or
- (name(.) = 'indexinfo') or (name(.) = 'partinfo') or
- (name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or
- (name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or
- (name(.) = 'refsect2info') or (name(.) = 'refsect3info') or
- (name(.) = 'refsectioninfo') or (name(.) = 'sect1info') or
- (name(.) = 'sect2info') or (name(.) = 'sect3info') or
- (name(.) = 'sect4info') or (name(.) = 'sect5info') or
- (name(.) = 'sectioninfo') or (name(.) = 'setinfo') or
- (name(.) = 'setindexinfo') or (name(.) = 'sidebarinfo') ">
-]>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="1.0">
-
-<!-- == node.heading ======================================================= -->
-
-<xsl:template name="node.heading">
- <xsl:param name="node" select="."/>
- <xsl:param name="content" select="false()"/>
- <div class="header"><b>
- <xsl:choose>
- <xsl:when test="$content">
- <xsl:copy-of select="$content"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="$node" mode="title.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
- </b></div>
-</xsl:template>
-
-<!-- == node.header.header.mode ============================================ -->
-
-<!-- Defaults -->
-<xsl:template mode="node.header.header.mode" match="*">
- <xsl:apply-templates select="." mode="node.name.mode"/>
-</xsl:template>
-
-<!-- Divisions -->
-<xsl:template mode="node.header.header.mode" match="appendix | chapter | part">
- <xsl:call-template name="format.header.header">
- <xsl:with-param name="header">
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:with-param>
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.header.mode" match="article | reference">
- <xsl:variable name="node" select="."/>
- <xsl:if test="
- (preceding-sibling::*[name(.) = name($node)]) or
- (following-sibling::*[name(.) = name($node)]) or
- (parent::part/preceding-sibling::part/*[name(.) = name($node)]) or
- (parent::part/following-sibling::part/*[name(.) = name($node)]) ">
- <xsl:call-template name="format.header.number">
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
-</xsl:template>
-
-<xsl:template mode="node.header.header.mode" match="book"/>
-<xsl:template mode="node.header.header.mode" match="bibliography"/>
-<xsl:template mode="node.header.header.mode" match="colophon"/>
-<xsl:template mode="node.header.header.mode" match="glossary"/>
-<xsl:template mode="node.header.header.mode" match="index"/>
-<xsl:template mode="node.header.header.mode" match="preface"/>
-<xsl:template mode="node.header.header.mode" match="refentry"/>
-<xsl:template mode="node.header.header.mode" match="refsect1"/>
-<xsl:template mode="node.header.header.mode" match="refsect2"/>
-<xsl:template mode="node.header.header.mode" match="refsect3"/>
-<xsl:template mode="node.header.header.mode" match="refsection"/>
-
-<xsl:template mode="node.header.header.mode" match="
- sect1 | sect2 | sect3 | sect4 |
- sect5 | section | simplesect ">
- <xsl:call-template name="format.header.number">
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.header.mode" match="set"/>
-<xsl:template mode="node.header.header.mode" match="setindex"/>
-
-<!-- Infos -->
-<xsl:template mode="node.header.header.mode" match="*[&is-info;]"/>
-
-<!-- Titles -->
-<xsl:template match="subtitle" mode="node.header.header.mode">
- <xsl:apply-templates select=".." mode="node.header.header.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="node.header.header.mode">
- <xsl:apply-templates select=".." mode="node.header.header.mode"/>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="node.header.header.mode">
- <xsl:apply-templates select=".." mode="node.header.header.mode"/>
-</xsl:template>
-
-<!-- Blocks -->
-<xsl:template match="example | figure | table" mode="node.header.header.mode">
- <xsl:choose>
- <xsl:when test="@label">
- <xsl:call-template name="format.header">
- <xsl:with-param name="header" select="@label"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="format.header.header">
- <xsl:with-param name="header">
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:with-param>
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- == node.header.inline.mode ============================================ -->
-
-<!-- Defaults -->
-<xsl:template mode="node.header.inline.mode" match="*">
- <xsl:apply-templates select="." mode="node.name.mode"/>
-</xsl:template>
-
-<!-- Divisions -->
-<xsl:template mode="node.header.inline.mode" match="
- appendix | chapter | part | refsect1 | refsect2 | refsect3 |
- refsection | sect1 | sect2 | sect3 | sect4 | sect5 |
- section | simplesect ">
- <xsl:call-template name="format.header.inline">
- <xsl:with-param name="header">
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:with-param>
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="article | reference">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/titleabbrev">
- <xsl:apply-templates select="*[&is-info;]/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/title">
- <xsl:apply-templates select="*[&is-info;]/title/node()"/>
- </xsl:when>
- <xsl:when test="
- (preceding-sibling::*[name(.) = name($node)]) or
- (following-sibling::*[name(.) = name($node)]) or
- (parent::part/preceding-sibling::part/*[name(.) = name($node)]) or
- (parent::part/following-sibling::part/*[name(.) = name($node)]) ">
- <xsl:call-template name="format.header.inline">
- <xsl:with-param name="header">
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:with-param>
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="
- book | bibliography | colophon | glossary |
- index | preface | set | setindex ">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/titleabbrev">
- <xsl:apply-templates select="*[&is-info;]/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/title">
- <xsl:apply-templates select="*[&is-info;]/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="refentry">
- <xsl:choose>
- <xsl:when test="refentryinfo/titleabbrev">
- <xsl:apply-templates select="refentryinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:apply-templates select="refentryinfo/title/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdiv/titleabbrev">
- <xsl:apply-templates select="refsynopsisdiv/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdiv/title">
- <xsl:apply-templates select="refsynopsisdiv/title/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdiv/refsynopsisdivinfo/titleabbrev">
- <xsl:apply-templates
- select="refsynopsisdiv/refsynopsisdivinfo/titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="refsynopsisdiv/refsynopsisdivinfo/title">
- <xsl:apply-templates
- select="refsynopsisdiv/refsynopsisdivinfo/title/node()"/>
- </xsl:when>
- <xsl:when test="refnamediv/refdescriptor">
- <xsl:apply-templates select="refnamediv/refdescriptor/node()"/>
- </xsl:when>
- <xsl:when test="refnamediv/refname">
- <xsl:apply-templates select="refnamediv/refname[1]/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- Infos -->
-<xsl:template mode="node.header.inline.mode" match="appendixinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Appendix'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="articleinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Article'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="bibliographyinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Bibliography'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="bookinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Book'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="chapterinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Chapter'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="glossaryinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Glossary'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="indexinfo | setindexinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Index'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="partinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Part'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="prefaceinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Preface'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="refentryinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Entry'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="referenceinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Reference'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="
- refsect1info | refsect2info | refsect3info | refsectioninfo |
- sect1info | sect2info | sect3info | sect4info |
- sect5info | sectioninfo ">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.header.inline.mode" match="setinfo">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'About This Set'"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- Titles -->
-<xsl:template match="subtitle" mode="node.header.inline.mode">
- <xsl:apply-templates select=".." mode="node.header.inline.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="node.header.inline.mode">
- <xsl:apply-templates select=".." mode="node.header.inline.mode"/>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="node.header.inline.mode">
- <xsl:apply-templates select=".." mode="node.header.inline.mode"/>
-</xsl:template>
-
-<!-- Blocks -->
-<xsl:template match="example | figure | table" mode="node.header.inline.mode">
- <xsl:choose>
- <xsl:when test="@label">
- <xsl:value-of select="@label"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="format.header.inline">
- <xsl:with-param name="header">
- <xsl:apply-templates select="." mode="node.name.mode"/>
- </xsl:with-param>
- <xsl:with-param name="number">
- <xsl:apply-templates select="." mode="node.number.mode"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="glossentry" mode="node.header.inline.mode">
- <xsl:apply-templates select="glossterm[1]" mode="node.header.inline.mode"/>
-</xsl:template>
-
-<xsl:template match="glossterm" mode="node.header.inline.mode">
- <xsl:apply-templates/>
-</xsl:template>
-
-<!-- == node.name.mode ===================================================== -->
-
-<!-- Defaults -->
-<xsl:template match="*" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Unknown'"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- Divisions -->
-<xsl:template match="appendix" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Appendix'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="article" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Article'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="book" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Book'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="bibliography" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Bigliography'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="chapter" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Chapter'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="colophon" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Colophon'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="glossary" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Glossary'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="index" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Index'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="part" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Part'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="preface" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Preface'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="reference" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="refentry" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference Entry'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="refsect1" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="refsect2" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="refsect3" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="refsection" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Reference Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect1" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect2" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect3" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect4" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="sect5" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="section" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Section'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="set" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Set'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="setindex" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Set Index'"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- Titles -->
-<xsl:template match="subtitle" mode="node.name.mode">
- <xsl:apply-templates select=".." mode="node.name.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="node.name.mode">
- <xsl:apply-templates select=".." mode="node.name.mode"/>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="node.name.mode">
- <xsl:apply-templates select=".." mode="node.name.mode"/>
-</xsl:template>
-
-<!-- Blocks -->
-<xsl:template match="caution" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Caution'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="dedication" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Dedication'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="example" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Example'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="figure" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Figure'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="important" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Important'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="msgaud" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Message Audience'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="msglevel" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Message Level'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="msgorig" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Message Origin'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="note" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Note'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="table" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Table'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="tip" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Tip'"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="warning" mode="node.name.mode">
- <xsl:call-template name="gettext">
- <xsl:with-param name="key" select="'Warning'"/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- == node.number.mode =================================================== -->
-
-<!-- Defaults -->
-<xsl:template match="*" mode="node.number.mode">
- <xsl:apply-templates select=".." mode="node.number.mode"/>
-</xsl:template>
-
-<!-- Divisions -->
-<xsl:template mode="node.number.mode" match="appendix">
- <xsl:call-template name="format.appendix.number">
- <xsl:with-param name="appendix" select="
- count(preceding-sibling::appendix) + 1 +
- count(parent::part/preceding-sibling::part/appendix)"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="article">
- <xsl:call-template name="format.article.number">
- <xsl:with-param name="article" select="
- count(preceding-sibling::article) + 1 +
- count(parent::part/preceding-sibling::part/article)"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="book"/>
-<xsl:template mode="node.number.mode" match="bibliography"/>
-<xsl:template mode="node.number.mode" match="colophon"/>
-
-<xsl:template mode="node.number.mode" match="chapter">
- <xsl:call-template name="format.chapter.number">
- <xsl:with-param name="chapter" select="
- count(preceding-sibling::chapter) + 1 +
- count(parent::part/preceding-sibling::part/chapter)"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="glossary"/>
-<xsl:template mode="node.number.mode" match="index"/>
-
-<xsl:template mode="node.number.mode" match="part">
- <xsl:call-template name="format.part.number">
- <xsl:with-param name="part" select="
- count(preceding-sibling::part) + 1"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="preface"/>
-
-<xsl:template mode="node.number.mode" match="reference">
- <xsl:call-template name="format.reference.number">
- <xsl:with-param name="reference" select="
- count(preceding-sibling::reference) + 1 +
- count(parent::part/preceding-sibling::part/reference)"/>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="
- refentry | refsect1 | refsect2 | refsect3 | refsection |
- sect1 | sect2 | sect3 | sect4 | sect5 |
- section | simplesect ">
- <xsl:variable name="sect" select="."/>
- <xsl:choose>
- <xsl:when test="
- name(..) = 'article' or name(..) = 'partintro' or name(..) = 'preface'">
- <xsl:call-template name="format.section.number">
- <xsl:with-param name="section" select="
- count(preceding-sibling::*[name(.) = name($sect)]) + 1"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="format.subsection.number">
- <xsl:with-param name="parent">
- <xsl:apply-templates select=".." mode="node.number.mode"/>
- </xsl:with-param>
- <xsl:with-param name="section" select="
- count(preceding-sibling::*[name(.) = name($sect)]) + 1"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template mode="node.number.mode" match="set"/>
-<xsl:template mode="node.number.mode" match="setindex"/>
-
-<!-- Titles -->
-<xsl:template match="subtitle" mode="node.number.mode">
- <xsl:apply-templates select=".." mode="node.number.mode"/>
-</xsl:template>
-
-<xsl:template match="title" mode="node.number.mode">
- <xsl:apply-templates select=".." mode="node.number.mode"/>
-</xsl:template>
-
-<xsl:template match="titleabbrev" mode="node.number.mode">
- <xsl:apply-templates select=".." mode="node.number.mode"/>
-</xsl:template>
-
-<!-- Blocks -->
-<xsl:template mode="node.number.mode" match="example | figure | table">
- <xsl:variable name="parent">
- <xsl:choose>
- <xsl:when test="
- ancestor::*[
- (name(.) = 'refentry') or (name(.) = 'sect1') or
- (name(.) = 'section') or (name(.) = 'simplesect') ]
- [parent::article]">
- <xsl:apply-templates mode="node.number.mode" select="
- ancestor::*[
- (name(.) = 'refentry') or (name(.) = 'sect1') or
- (name(.) = 'section') or (name(.) = 'simplesect') ]
- [parent::article][last()]"/>
- </xsl:when>
- <xsl:when test="ancestor::*[name(.) = 'appendix' or name(.) = 'chapter']">
- <xsl:apply-templates mode="node.number.mode" select="
- ancestor::*[name(.) = 'appendix' or name(.) = 'chapter'][1]"/>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="num">
- <xsl:choose>
- <xsl:when test="
- ancestor::*[
- (name(.) = 'refentry') or (name(.) = 'sect1') or
- (name(.) = 'section') or (name(.) = 'simplesect') ]
- [parent::article]">
- <xsl:value-of select="count(
- ancestor-or-self::*[ancestor::*[
- (name(.) = 'refentry') or (name(.) = 'sect1') or
- (name(.) = 'section') or (name(.) = 'simplesect') ]
- [parent::article]
- ]/preceding-sibling::*/descendant-or-self::*[
- name(.) = name(current())]
- ) + 1"/>
- </xsl:when>
- <xsl:when test="ancestor::*[name(.) = 'appendix' or name(.) = 'chapter']">
- <xsl:value-of select="count(
- ancestor-or-self::*[ancestor::*[
- name(.) = 'appendix' or name(.) = 'chapter' ]
- ]/preceding-sibling::*/descendant-or-self::*[
- name(.) = name(current())]
- ) + 1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="count(preceding::*[name(.) = name(current())]) + 1"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="not($parent)">
- <xsl:value-of select="$num"/>
- </xsl:when>
- <xsl:when test="name(.) = 'example'">
- <xsl:call-template name="format.example.number">
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="example" select="$num"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="name(.) = 'figure'">
- <xsl:call-template name="format.figure.number">
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="figure" select="$num"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="name(.) = 'table'">
- <xsl:call-template name="format.table.number">
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="table" select="$num"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<!-- ======================================================================= -->
-
-</xsl:stylesheet>
diff --git a/stylesheets/db2html-param.xsl b/stylesheets/db2html-param.xsl
index 43697288..712b0c19 100644
--- a/stylesheets/db2html-param.xsl
+++ b/stylesheets/db2html-param.xsl
@@ -1,4 +1,5 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
diff --git a/stylesheets/db2html-refentry.xsl b/stylesheets/db2html-refentry.xsl
index e02b62f5..0610af4f 100644
--- a/stylesheets/db2html-refentry.xsl
+++ b/stylesheets/db2html-refentry.xsl
@@ -1,20 +1,4 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-division "
- (name(.) = 'appendix') or (name(.) = 'article') or
- (name(.) = 'book') or (name(.) = 'bibliography') or
- (name(.) = 'chapter') or (name(.) = 'colophon') or
- (name(.) = 'glossary') or (name(.) = 'index') or
- (name(.) = 'part') or (name(.) = 'preface') or
- (name(.) = 'reference') or (name(.) = 'refentry') or
- (name(.) = 'refsect1') or (name(.) = 'refsect2') or
- (name(.) = 'refsect3') or (name(.) = 'refsection') or
- (name(.) = 'sect1') or (name(.) = 'sect2') or
- (name(.) = 'sect3') or (name(.) = 'sect4') or
- (name(.) = 'sect5') or (name(.) = 'section') or
- (name(.) = 'set') or (name(.) = 'setindex') or
- (name(.) = 'simplesect') ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -38,28 +22,11 @@
</xsl:template>
<xsl:template match="refdescriptor">
- <xsl:call-template name="block"/>
+ <xsl:call-template name="block.simple"/>
</xsl:template>
<xsl:template match="refentrytitle">
- <xsl:param name="depth" select="count(ancestor::*[&is-division;]) - 1"/>
- <xsl:variable name="element">
- <xsl:choose>
- <xsl:when test="$depth &lt; 7">
- <xsl:value-of select="concat('h', $depth + 1)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'h7'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="{$element}">
- <xsl:attribute name="class">
- <xsl:value-of select="'refentry'"/>
- </xsl:attribute>
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </xsl:element>
+ <xsl:call-template name="title.h"/>
</xsl:template>
<xsl:template match="refname">
@@ -70,7 +37,7 @@
</xsl:template>
<xsl:template match="refnamediv">
- <xsl:call-template name="block"/>
+ <xsl:call-template name="block.simple"/>
</xsl:template>
<xsl:template match="refpurpose">
@@ -79,17 +46,7 @@
</xsl:template>
<xsl:template match="refsynopsisdiv">
- <div class="{name(.)}">
- <xsl:call-template name="anchor"/>
- <xsl:if test="title or refsynopsisdivinfo/title">
- <xsl:call-template name="node.heading"/>
- </xsl:if>
- <xsl:apply-templates select="*[
- name(.) != 'refsynopsisdivinfo' and
- name(.) != 'title' and
- name(.) != 'subtitle' and
- name(.) != 'titleabbrev' ]"/>
- </div>
+ <xsl:call-template name="block.simple"/>
</xsl:template>
</xsl:stylesheet>
diff --git a/stylesheets/db2html-title.xsl b/stylesheets/db2html-title.xsl
index defdd417..5ffaaf44 100644
--- a/stylesheets/db2html-title.xsl
+++ b/stylesheets/db2html-title.xsl
@@ -1,127 +1,178 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
-<!DOCTYPE xsl:stylesheet [
-<!ENTITY is-info "
-(name(.) = 'appendixinfo') or (name(.) = 'articleinfo') or
-(name(.) = 'bibliographyinfo') or (name(.) = 'blockinfo') or
-(name(.) = 'bookinfo') or (name(.) = 'chapterinfo') or
-(name(.) = 'glossaryinfo') or (name(.) = 'indexinfo') or
-(name(.) = 'objectinfo') or (name(.) = 'partinfo') or
-(name(.) = 'prefaceinfo') or (name(.) = 'refentryinfo') or
-(name(.) = 'referenceinfo') or (name(.) = 'refsect1info') or
-(name(.) = 'refsect2info') or (name(.) = 'refsect3info') or
-(name(.) = 'refsectioninfo') or (name(.) = 'refsynopsisdivinfo') or
-(name(.) = 'sect1info') or (name(.) = 'sect2info') or
-(name(.) = 'sect3info') or (name(.) = 'sect4info') or
-(name(.) = 'sect5info') or (name(.) = 'sectioninfo') or
-(name(.) = 'setinfo') or (name(.) = 'setindexinfo') or
-(name(.) = 'sidebarinfo') ">
-]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- ======================================================================= -->
-<xsl:template mode="title.text.mode" match="*">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:value-of select="title"/>
- </xsl:when>
- <xsl:when test="(&is-info;) and ../title">
- <xsl:value-of select="../title"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/title">
- <xsl:value-of select="*[&is-info;]/title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.header.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<xsl:template match="biblioentry/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="bibliomixed/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="bibliomset/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="biblioset/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="constraintdef/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="glossdiv/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="indexdiv/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msg/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msgexplan/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msgmain/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msgrel/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msgset/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="msgsub/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="productionset/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="qandadiv/title">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="qandaset/title">
+ <xsl:call-template name="FIXME"/>
</xsl:template>
-<xsl:template mode="title.text.mode" match="refentry">
- <xsl:choose>
- <xsl:when test="refmeta/refentrytitle">
- <xsl:value-of select="refmeta/refentrytitle"/>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:value-of select="refentryinfo/title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.header.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<xsl:template match="biblioentry/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="bibliomixed/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="bibliomset/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="biblioset/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="glossidv/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="indexdiv/subtitle">
+ <xsl:call-template name="FIXME"/>
+</xsl:template>
+<xsl:template match="refsynopsisdiv/subtitle">
+ <xsl:call-template name="FIXME"/>
</xsl:template>
-<!-- ======================================================================= -->
+<!-- == title.simple ======================================================= -->
-<xsl:template mode="titleabbrev.text.mode" match="*">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:value-of select="titleabbrev"/>
- </xsl:when>
- <xsl:when test="(&is-info;) and ../titleabbrev">
- <xsl:value-of select="../titleabbrev"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/titleabbrev">
- <xsl:value-of select="*[&is-info;]/titleabbrev"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="title.text.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<xsl:template name="title.simple" match="
+ abstract/title | authorblurb/title | blockquote/title |
+ calloutlist/title | caution/title | dedication/title |
+ important/title | formalpara/title | itemizedlist/title |
+ note/title | orderedlist/title | personblurb/title |
+ procedure/title | refsynopsisdiv/title | segmentedlist/title |
+ sidebar/title | step/title | tip/title |
+ variablelist/title | warning/title ">
+ <div class="{name(.)}"><b><xsl:apply-templates/></b></div>
</xsl:template>
-<!-- ======================================================================= -->
+<xsl:template match="dedication/subtitle">
+ <xsl:call-template name="title.simple"/>
+</xsl:template>
-<xsl:template mode="title.inline.mode" match="*">
- <xsl:choose>
- <xsl:when test="title">
- <xsl:apply-templates select="title/node()"/>
- </xsl:when>
- <xsl:when test="(&is-info;) and ../title">
- <xsl:apply-templates select="../title/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/title">
- <xsl:apply-templates select="*[&is-info;]/title/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.header.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<!-- == title.header ======================================================= -->
+
+<xsl:template name="title.header" match="
+ equation/title | example/title | figure/title | table/title ">
+ <div class="{name(.)}">
+ <i>
+ <xsl:call-template name="header.prefix"/>
+ </i>
+ <xsl:apply-templates/>
+ </div>
</xsl:template>
-<xsl:template mode="title.inline.mode" match="refentry">
- <xsl:choose>
- <xsl:when test="refmeta/refentrytitle">
- <xsl:value-of select="refmeta/refentrytitle"/>
- </xsl:when>
- <xsl:when test="refentryinfo/title">
- <xsl:value-of select="refentryinfo/title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="node.header.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<!-- == title.h ============================================================ -->
+
+<xsl:template name="title.h" match="
+ appendix/title | article/title | bibliodiv/title |
+ bibliography/title | book/title | chapter/title |
+ colophon/title | glossary/title | index/title |
+ part/title | partintro/title | preface/title |
+ reference/title | refsect1/title | refsect2/title |
+ refsect3/title | refsection/title | sect1/title |
+ sect2/title | sect3/title | sect4/title |
+ sect5/title | section/title | set/title |
+ setindex/title | simplesect/title ">
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="depth.in.chunk"/>
+ </xsl:param>
+ <xsl:variable name="element">
+ <xsl:choose>
+ <xsl:when test="$depth_in_chunk &lt;= 7">
+ <xsl:value-of select="concat('h', $depth_in_chunk)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'h7'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="{$element}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(..)"/>
+ </xsl:attribute>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="header.prefix"/>
+ <xsl:apply-templates/>
+ </xsl:element>
</xsl:template>
-<!-- ======================================================================= -->
+<!-- == subtitle.h ========================================================= -->
-<xsl:template mode="titleabbrev.inline.mode" match="*">
- <xsl:choose>
- <xsl:when test="titleabbrev">
- <xsl:apply-templates select="titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="(&is-info;) and ../titleabbrev">
- <xsl:apply-templates select="../titleabbrev/node()"/>
- </xsl:when>
- <xsl:when test="*[&is-info;]/titleabbrev">
- <xsl:apply-templates select="*[&is-info;]/titleabbrev/node()"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." mode="title.inline.mode"/>
- </xsl:otherwise>
- </xsl:choose>
+<xsl:template name="subtitle.h" match="
+ appendix/subtitle | article/subtitle | bibliodiv/subtitle |
+ bibliography/subtitle | book/subtitle | chapter/subtitle |
+ colophon/subtitle | glossary/subtitle | index/subtitle |
+ part/subtitle | partintro/subtitle | preface/subtitle |
+ reference/subtitle | refsect1/subtitle | refsect2/subtitle |
+ refsect3/subtitle | refsection/subtitle | sect1/subtitle |
+ sect2/subtitle | sect3/subtitle | sect4/subtitle |
+ sect5/subtitle | section/subtitle | set/subtitle |
+ setindex/subtitle | simplesect/subtitle ">
+ <xsl:param name="depth_in_chunk">
+ <xsl:call-template name="depth.in.chunk"/>
+ </xsl:param>
+ <xsl:variable name="element">
+ <xsl:choose>
+ <xsl:when test="$depth_in_chunk &lt;= 6">
+ <xsl:value-of select="concat('h', $depth_in_chunk + 1)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'h7'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:element name="{$element}">
+ <xsl:attribute name="class">
+ <xsl:value-of select="name(.)"/>
+ </xsl:attribute>
+ <xsl:call-template name="anchor"/>
+ <xsl:call-template name="header.prefix"/>
+ <xsl:apply-templates/>
+ </xsl:element>
</xsl:template>
<!-- ======================================================================= -->
diff --git a/stylesheets/db2html-titlepage.xsl b/stylesheets/db2html-titlepage.xsl
index d85a21d4..ddf5e552 100644
--- a/stylesheets/db2html-titlepage.xsl
+++ b/stylesheets/db2html-titlepage.xsl
@@ -209,14 +209,14 @@
<xsl:call-template name="gettext">
<xsl:with-param name="key" select="'Copyright'"/>
</xsl:call-template>
- <xsl:text>&#160;&#169;&#160;</xsl:text>
+ <xsl:text>&#x00A0;&#x00A9;&#x00A0;</xsl:text>
<xsl:for-each select="year">
<xsl:if test="position() &gt; 1">
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:apply-templates select="." mode="titlepage.mode"/>
</xsl:for-each>
- <xsl:text>&#8195;</xsl:text>
+ <xsl:text>&#x2003;</xsl:text>
<xsl:for-each select="holder">
<xsl:if test="position() &gt; 1">
<xsl:text>, </xsl:text>
diff --git a/stylesheets/db2html-toc.xsl b/stylesheets/db2html-toc.xsl
index f726096e..5bdd2040 100644
--- a/stylesheets/db2html-toc.xsl
+++ b/stylesheets/db2html-toc.xsl
@@ -75,7 +75,7 @@
<div class="toc"><ul>
<xsl:for-each select="*[&is-division;]">
<xsl:variable name="chunk_id">
- <xsl:apply-templates select="." mode="chunk.id.mode"/>
+ <xsl:call-template name="chunk.id"/>
</xsl:variable>
<xsl:if test="string($chunk_id) = @id">
<xsl:apply-templates select="." mode="toc.verbose.mode"/>
@@ -92,7 +92,7 @@
<xsl:with-param name="linkend" select="@id"/>
</xsl:call-template>
</xsl:attribute>
- <xsl:apply-templates select="." mode="node.header.inline.mode"/>
+ <xsl:call-template name="header"/>
</a>
<xsl:choose>
<xsl:when test="title">
diff --git a/stylesheets/db2html-xref.xsl b/stylesheets/db2html-xref.xsl
index 07b68023..cb82c796 100644
--- a/stylesheets/db2html-xref.xsl
+++ b/stylesheets/db2html-xref.xsl
@@ -94,6 +94,8 @@
</xsl:if>
</xsl:template>
+<!-- ======================================================================= -->
+
<xsl:template name="xref.content">
<xsl:param name="linkend" select="@linkend"/>
<xsl:param name="target" select="id($linkend)"/>
@@ -102,11 +104,25 @@
<xsl:value-of select="$target/@xreflabel"/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="$target" mode="node.header.inline.mode"/>
+ <xsl:apply-templates mode="xref.content.mode" select="$target"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+<xsl:template mode="header.mode" match="glossentry">
+ <xsl:apply-templates mode="xref.content.mode" select="glossterm[1]"/>
+</xsl:template>
+
+<xsl:template mode="xref.content.mode" match="glossterm">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template mode="xref.content.mode" match="*">
+ <xsl:call-template name="header"/>
+</xsl:template>
+
+
<!-- ======================================================================= -->
+
</xsl:stylesheet>
diff --git a/stylesheets/db2html.xsl b/stylesheets/db2html.xsl
index 15d3ab8b..cf9863aa 100644
--- a/stylesheets/db2html.xsl
+++ b/stylesheets/db2html.xsl
@@ -7,7 +7,7 @@
<xsl:include href="gettext.xsl"/>
<xsl:include href="db2html-common.xsl"/>
-<xsl:include href="db2html-node.xsl"/>
+<xsl:include href="db2html-header.xsl"/>
<xsl:include href="db2html-title.xsl"/>
<xsl:include href="db2html-chunk.xsl"/>
@@ -34,7 +34,9 @@
<xsl:include href="db2html-xref.xsl"/>
<xsl:template match="/">
- <xsl:apply-templates select="book | article" mode="chunk.mode"/>
+ <xsl:call-template name="chunk">
+ <xsl:with-param name="node" select="*"/>
+ </xsl:call-template>
</xsl:template>
<xsl:template match="*">
diff --git a/stylesheets/gettext.xsl b/stylesheets/gettext.xsl
index 9a585fe8..70184dca 100644
--- a/stylesheets/gettext.xsl
+++ b/stylesheets/gettext.xsl
@@ -1,4 +1,5 @@
<?xml version='1.0'?><!-- -*- Mode: fundamental; tab-width: 3 -*- -->
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
@@ -25,42 +26,36 @@
<xsl:param name="dingbat"/>
<xsl:choose>
<xsl:when test="$dingbat = 'copyright'">
- <xsl:value-of select="'&#169;'"/>
+ <xsl:value-of select="'&#x00A9;'"/>
</xsl:when>
<xsl:when test="$dingbat = 'registered'">
- <xsl:value-of select="'&#174;'"/>
+ <xsl:value-of select="'&#x00AE;'"/>
</xsl:when>
<xsl:when test="$dingbat = 'trade'">
- <xsl:value-of select="'&#8482;'"/>
+ <xsl:value-of select="'&#x2122;'"/>
</xsl:when>
<xsl:when test="$dingbat = 'service'">
- <xsl:value-of select="'&#8480;'"/>
+ <xsl:value-of select="'&#x2120;'"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- ======================================================================= -->
-<xsl:template name="format.header">
+<xsl:template name="format.header.prefix.named">
<xsl:param name="header"/>
- <xsl:value-of select="concat($header, '&#8199;')"/>
+ <xsl:value-of select="concat($header, '&#x2003;')"/>
</xsl:template>
-<xsl:template name="format.header.header">
+<xsl:template name="format.header.prefix.unnamed">
<xsl:param name="header"/>
- <xsl:param name="number"/>
- <xsl:value-of select="concat($header, '&#160;', $number, '&#8199;')"/>
+ <xsl:value-of select="concat($header, '&#x2003;')"/>
</xsl:template>
-<xsl:template name="format.header.number">
- <xsl:param name="number"/>
- <xsl:value-of select="concat($number, '&#8199;')"/>
-</xsl:template>
-
-<xsl:template name="format.header.inline">
+<xsl:template name="format.header">
<xsl:param name="header"/>
<xsl:param name="number"/>
- <xsl:value-of select="concat($header, '&#160;', $number)"/>
+ <xsl:value-of select="concat($header, '&#x00A0;', $number)"/>
</xsl:template>
<!-- ======================================================================= -->