xsl-list
[Top] [All Lists]

Weird XPath evaluation differences between Saxon and Xalan

2005-06-08 14:46:37
Hi,

I have a question regarding a XPath evaluation difference between Saxon and Xalan (using the latest release of both tools), with the same XML datas and the XPath query !

Considering this XML tree :

<GROUP>
 <SOMETHING>
   <NAME>AA</NAME>
 </SOMETHING>
 <SOMETHING>
   <NAME>BB</NAME>
 </SOMETHING>
 <SOMETHING>
   <NAME>CC</NAME>
 </SOMETHING>
</GROUP>

and the following XPath query :

<xsl:value-of select="./SOMETHING/NAME"/>
in the context of a <xsl:apply-templates select="/GROUP"/>

Xalan will output "AA" but Saxon output "AABBCC" !

Stranger is than changing the version of the stylesheet modify the comportment of Saxon : using a 1.0 stylesheet, Saxon will output "AA" (as Xalan do !), but using à 2.0 stylesheet, Saxon output "AABBCC".

What's the standard says about that ? I'd like to follow W3C prescription !

Should I change my XPath query with GROUP like :

<xsl:value-of select="./SOMETHING//NAME"/>

or maybe :

<xsl:value-of select="./SOMETHING[*]/NAME"/>

Thanks forward for any information on this subject. For information, the result I expect is "AABBCC".

Symon


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