Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: help with xsl:number help with xsl:numberTo: NULL Date: 11/2/2005 1:32:00 PM Hi everyone, I'm trying to get the xsl:number element to work and am having
some issues. I'm not sure if what I'm trying to do is even supported. I
have figure elements at various levels underneath chapter elements and am
trying to number them sequentially by chapter.figure number. The
XML/XSL/CURRENT OUTPUT/DESIRED OUTPUT I have shown below is what I have so
far.
any help is appreciated.
thanks, dan
CURRENT OUTPUT:
1.1
1.2
1.1
1.1
2.1
2.1
DESIRED OUTPUT:
1.1
1.2
1.3
1.4
2.1
2.2
XSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="figure">
Figure <xsl:number format="1.1" level="multiple" count="chapter |
figure"/>
</xsl:template>
</xsl:stylesheet>
XML:
<root>
<chapter>
<figure/>
<figure/>
<section>
<para>
<figure/>
</para>
</section>
<section>
<subsection>
<para>
<figure/>
</para>
</subsection>
</section>
</chapter>
<chapter>
<section>
<para>
<figure/>
</para>
</section>
<section>
<subsection>
<para>
<figure/>
</para>
</subsection>
</section>
</chapter>
</root>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
