[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:number function error
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|