XalanJ2
  1. XalanJ2
  2. XALANJ-1030

XPathAPI selectNodeIterator(doc, xpath) with default namespace

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Incomplete
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: XPath
    • Labels:
      None
    • Environment:
      Operating System: Windows NT/2K
      Platform: PC

      Description

      In xalan-j2.3.1, on Windows 2000 SP2,
      the following xpath retrieval, using the ApplyXPath example
      java ApplyXPath trydef.xml "/xxx/yyy"
      fails on the file, trydef.xml, which uses the default namespace.

      <?xml version="1.0" ?>
      <xxx xmlns="a:b//c">
      <yyy>
      <zzz aaa="333">
      </zzz>
      </yyy>
      </xxx>

      The corresponding retrieval
      java ApplyXPath trynone.xml "/xxx/yyy"
      works as expected on the file, trynone.xml, which has no namespace

      <?xml version="1.0" ?>
      <xxx>
      <yyy>
      <zzz aaa="333">
      </zzz>
      </yyy>
      </xxx>

      The corresponding retrieval using a namespace prefix also works:
      java ApplyXPath trypref.xml "/q:xxx/q:yyy"

      <?xml version="1.0" ?>
      <q:xxx xmlns:q="a:b//c">
      <q:yyy>
      <q:zzz aaa="333">
      </q:zzz>
      </q:yyy>
      </q:xxx>

      Perhaps this is related to bug #6479?

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Jeff Greif
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development