xsl-list
[Top] [All Lists]

[xsl] Re: An unintended incompatibility with xsl:number

2010-06-24 13:02:37
Hi, Michael.

Michael Kay wrote on 06/24/2010 01:39:46 PM:
Consider this source document:

<doc>
<a>
<title/>
</a>
</doc>

and this stylesheet:

[snip]
<xsl:for-each select="//title">
<xsl:number from="a" count="a" level="single"/>
</xsl:for-each>
[snip]

The XSLT 2.0 specification is explicit that the result should be 
<out>1</out>

The XSLT 1.0 specification is not quite so clear-cut, but the simplest 
reading of it is to produce the result <out/>

I tried this with the Xalan-J interpreter and XSLTC.  In both cases, the 
result was

<out>1</out>

I also tried the XSLT compiling processor (mostly unrelated to XSLTC) that 
is included in IBM's Java 6.0.  The result on that processor was

<out/>

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Canada Lab   T/L 313-6044;  Phone +1 905 413-6044
mailto:zongaro(_at_)ca(_dot_)ibm(_dot_)com

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>