Uploaded image for project: 'Commons JXPath'
  1. Commons JXPath
  2. JXPATH-100

Core union operation does not sort result nodes according to document order

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Final, Nightly Builds
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bsp Sergey Vladimirov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: