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

Incomplete handling of undefined namespaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2 Final, Nightly Builds
    • 1.3
    • None

    Description

      Mcduffey, Joe <jdmcduf@nsa.gov>

      Can someone tell me how to register namespaces so that attributes with namespaces does not cause the exception

      org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
      unknown namespace prefix: xsi

      For example the following
      <ElementA A:myAttr="Mytype">
      <B:ElementB>MY VALUE</B:ElementB>
      </ElementA>

      Would result in the following exception:
      org.apache.common.ri.model.dom.DOMNodePointer.createAttribute
      unknown namespace prefix: A

      FYI: In this example there was a namespace decaration in the file and I also manually called the
      registerNamespace(A,"/http...");
      registerNamespace(B,"/http...");

      There was no problem encountered for elements. Only attributes. Can someone help? Thanks.

      Attachments

        1. patch.txt
          19 kB
          Sergey Vladimirov
        2. NamespacesTest.java
          1.0 kB
          Sergey Vladimirov

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: