Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


help with xsl:number

From: "news.microsoft.com" <djo267 at hotmail dot com>
To: 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> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent