Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.3
-
None
-
None
-
Operating System: Windows NT/2K
Platform: PC
-
8805
Description
I found a bug in Xalan 2.3.1 when using a predicate on the descendant-axis with
position. It was an example on the Mulberry XSL-list. For the XML see attached
test.xml, the XSL is the test.xsl, the result.xml stores the expected result.
The Xalan bug is in the line 21, when removing the () from the select.
<xsl:value-of select=".//description[$pos]"/> according to the spec at the end
of 5.2 can only return description elements for "$pos = 1":
"For example
appendix//ulist/item[position()=1]
matches a node if and only if all of the following are true:
...
evaluating the PredicateExpr position()=1 with the node as context node and the
siblings of the node that are item elements as the context node list yields true
..."
Xalan shows the same behaviour with or without ().
Joerg