Commons JXPath
  1. Commons JXPath
  2. JXPATH-104

selectSingleNode() from a map should not select map values keyed by strings with embedded colons using namespaced element syntax

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      http://mail-archives.apache.org/mod_mbox/commons-user/200710.mbox/%3c5149CDBF9C1DD74EB9A1327B47BC2869028E4DAC@resmsg01.AME.ad.sag%3e

      Summary: selectNodes() treats colon as ns, while selectSingleNode() treats it as part of the string key. Which is correct is debatable, but some consistent solution must be identified/implemented.

        Activity

        Hide
        Matt Benson added a comment -

        Indeed; selectSingleNode() should interpret the colon-delimited portion of the path element as a namespace, and this does not seem to be occurring. The answer to the original user issue is to use the @name attribute to specify a non-XPath-compliant map key as a path element.

        Show
        Matt Benson added a comment - Indeed; selectSingleNode() should interpret the colon-delimited portion of the path element as a namespace, and this does not seem to be occurring. The answer to the original user issue is to use the @name attribute to specify a non-XPath-compliant map key as a path element.
        Hide
        Matt Benson added a comment -

        modified SimplePathInterpreter to discard invalid property paths, including any not in the default namespace.

        Show
        Matt Benson added a comment - modified SimplePathInterpreter to discard invalid property paths, including any not in the default namespace.

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Benson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development