- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 01 Aug 2009 12:23:49 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/markup/tools In directory hutz:/tmp/cvs-serv13914/tools Modified Files: specgen.xsl toc.xsl Log Message: made tweaks to section numbering and TOC numbering Index: specgen.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/specgen.xsl,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- specgen.xsl 31 Jul 2009 08:34:43 -0000 1.37 +++ specgen.xsl 1 Aug 2009 12:23:47 -0000 1.38 @@ -434,6 +434,9 @@ <xsl:choose> <xsl:when test='$section/ancestor::* = $sections'> <xsl:for-each select='$section/ancestor-or-self::h:section'> + <xsl:if test='not(position()=1) and position()=last() and 9 > count(preceding-sibling::h:section)'> + <xsl:text>0</xsl:text> + </xsl:if> <xsl:value-of select='count(preceding-sibling::h:section) + 1'/> <xsl:if test='position() != last()'> <xsl:text>.</xsl:text> Index: toc.xsl =================================================================== RCS file: /sources/public/html5/markup/tools/toc.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- toc.xsl 3 May 2009 09:26:41 -0000 1.3 +++ toc.xsl 1 Aug 2009 12:23:47 -0000 1.4 @@ -27,7 +27,12 @@ <xsl:for-each select='h:section[not(contains(@class,"no-toc"))]'> <xsl:variable name='number'> <xsl:value-of select='$prefix'/> - <xsl:if test='$prefix'>.</xsl:if> + <xsl:if test='$prefix'> + <xsl:text>.</xsl:text> + <xsl:if test='10 > position()'> + <xsl:text>0</xsl:text> + </xsl:if> + </xsl:if> <xsl:choose> <xsl:when test='$alpha'><xsl:number value='position()' format='A'/></xsl:when> <xsl:otherwise><xsl:value-of select='position()'/></xsl:otherwise> @@ -64,6 +69,12 @@ <xsl:value-of select="concat($frag,'-toc')"/> </xsl:attribute> </xsl:if> + <xsl:if test=" + count($subsections) > 9 and 10 > $number + and not(contains(@class,'no-number')) + and not($prefix)"> + <xsl:text> </xsl:text> + </xsl:if> <a href='{$filename}#{$frag}'> <xsl:if test="not(contains(@class,'no-number'))"> <xsl:value-of select='$number'/>
Received on Saturday, 1 August 2009 12:24:02 UTC