You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sergey Vladimirov (JIRA)" <ji...@apache.org> on 2007/08/19 12:55:32 UTC

[jira] Updated: (JXPATH-100) Core union operation does not sort result nodes according to document order

     [ https://issues.apache.org/jira/browse/JXPATH-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Vladimirov updated JXPATH-100:
-------------------------------------

    Attachment: UnionOperationTest.java

Test case

> Core union operation does not sort result nodes according to document order
> ---------------------------------------------------------------------------
>
>                 Key: JXPATH-100
>                 URL: https://issues.apache.org/jira/browse/JXPATH-100
>             Project: Commons JXPath
>          Issue Type: Bug
>    Affects Versions: 1.2 Final, Nightly Builds
>            Reporter: Sergey Vladimirov
>         Attachments: UnionOperationTest.java
>
>
> Source document:
> <MAIN><A>avalue</A><B>bvalue</B></MAIN>
> According to string() function defintion:
> "A node-set is converted to a string by returning the string-value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned."
> Following XPath calculated incorrectly:
>  string(/MAIN/B | /MAIN/A)
> Expected result: "avalue"
> Actual value: "bvalue"
> Reason:
> sorting of result nodes is missing from CoreOperationUnion

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.