DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8805>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8805

position-predicates of descendant-axis

           Summary: position-predicates of descendant-axis
           Product: XalanJ2
           Version: 2.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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

Reply via email to