For some reason it seems that the xsl:number function is not functioning
properly...has anyone ever seen this before?
Here's the XML input I'm working with.
<?xml version="1.0" encoding="UTF-8"?>
<DOC>
<FRONT>
<MAINGRP>
<TITLE>NOTES TO READERS</TITLE>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
</MAINGRP>
<MAINGRP>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
</MAINGRP>
<MAINGRP>
<TITLE/>
</MAINGRP>
<MAINGRP>
<TITLE>LIST OF EFFECTIVE PAGES</TITLE>
<MAINGRPPARA0>
</MAINGRPPARA0>
</MAINGRP>
<MAINGRP>
<TITLE>LIST OF ASSOCIATED PUBLICATIONS</TITLE>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
<MAINGRPPARA0>
</MAINGRPPARA0>
</MAINGRP>
</FRONT>
<BODY>
<MAINGRP>
<TITLE>INTRODUCTION</TITLE>
<MAINGRPPARA0>
</MAINGRPPARA0>
</MAINGRP>
</BODY>
</DOC>
And here's the pertinent portion of my stylesheet:
<xsl:template match="MAINGRP">
<xsl:choose>
<xsl:when test="ancestor::FRONT"/>
<xsl:otherwise>
<xsl:number level="any" count="MAINGRPPARA0"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The strange thing is it's outputting a 9 when it reaches that first <MAINGRP>
child of <BODY>, but it should be an 11. Has anyone encountered this problem
with the xsl:number function before...is there some issue with the nesting of
the ancestoral children??
Thanks,
-Tracy
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--