|
Subject: RE: [xsl] xsl:number function error From: cknell@xxxxxxxxxx Date: Mon, 25 Apr 2005 13:25:27 -0400 |
I get "11" using Saxon 6.5.3 and MSXSL. With Xalan-J I get "8". I suspect a problem with your XSLT processor.
--
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From: tsterlin@xxxxxxxxxxxxxxxxx
Sent: Sun, 24 Apr 2005 14:25:27 -0700
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] 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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] xsl:number function error, Michael Kay | Thread | [xsl] ENCODING COUNTRY CODES, Arulxml |
| Re: [xsl] First attempt at xsl:resu, JBryant | Date | [xsl] QName from variable, Norbert Heidbrink |
| Month |