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

Possible endless loop in Namespace Resolving

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.3
    • 1.4
    • None

    Description

      When dealing with XML documents - org.w3c.dom - and when having a hierarchy of relative contexts, then, when trying to resolve the namespace prefix for some namespace uri, an endless loop is triggered.
      This happens if

      • the namespace is not programatically registered with JXPathContext
      • the context used to resolve the namespace
        • has a parent context
        • and neither the context nor the parent have the namespace defined within the document

      I attached a patch for org/apache/commons/jxpath/ri/NamespaceResolver.java
      as well as a tar ball with a junit test and test files

      Attachments

        1. patch.junit.tgz
          1 kB
          Stefan Albrecht
        2. patch.txt
          0.5 kB
          Stefan Albrecht

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stalbrecht Stefan Albrecht
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: