diff options
author | Shaun McCance <shaunm@src.gnome.org> | 2003-10-17 03:23:54 +0000 |
---|---|---|
committer | Shaun McCance <shaunm@src.gnome.org> | 2003-10-17 03:23:54 +0000 |
commit | 6bd0b12f7a22ef57e8a37b5a307e182d15e64006 (patch) | |
tree | 37aaae04b17dd2095ff45c77f7bc84b85fc1639d | |
parent | 658ae1aa229ba269ac69207494c331e1c5c2fed1 (diff) | |
download | yelp-6bd0b12f7a22ef57e8a37b5a307e182d15e64006.tar.gz |
- Only include parent number in section number when below something we
* db2html-node.xsl:
* gettext.xsl:
- Only include parent number in section number when below
something we typically number.
-rw-r--r-- | stylesheets/ChangeLog | 7 | ||||
-rw-r--r-- | stylesheets/db2html-node.xsl | 25 | ||||
-rw-r--r-- | stylesheets/gettext.xsl | 5 |
3 files changed, 30 insertions, 7 deletions
diff --git a/stylesheets/ChangeLog b/stylesheets/ChangeLog index bb88a188..a4234113 100644 --- a/stylesheets/ChangeLog +++ b/stylesheets/ChangeLog @@ -1,5 +1,12 @@ 2003-10-16 Shaun McCance <shaunm@gnome.org> + * db2html-node.xsl: + * gettext.xsl: + - Only include parent number in section number when below + something we typically number. + +2003-10-16 Shaun McCance <shaunm@gnome.org> + * db2html-chunk.xsl: * db2html-xref.xsl: - Fix links to titlepage diff --git a/stylesheets/db2html-node.xsl b/stylesheets/db2html-node.xsl index 28fe2179..3ac23854 100644 --- a/stylesheets/db2html-node.xsl +++ b/stylesheets/db2html-node.xsl @@ -666,13 +666,24 @@ sect1 | sect2 | sect3 | sect4 | sect5 | section | simplesect "> <xsl:variable name="sect" select="."/> - <xsl:call-template name="format.section.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: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"/> diff --git a/stylesheets/gettext.xsl b/stylesheets/gettext.xsl index 2a0f2e98..9a585fe8 100644 --- a/stylesheets/gettext.xsl +++ b/stylesheets/gettext.xsl @@ -105,6 +105,11 @@ </xsl:template> <xsl:template name="format.section.number"> + <xsl:param name="section"/> + <xsl:number value="$section"/> +</xsl:template> + +<xsl:template name="format.subsection.number"> <xsl:param name="parent"/> <xsl:param name="section"/> <xsl:value-of select="concat($parent, '.')"/> |