Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-302

getNamespaceURI() implementation in ODFDOM is not aware of duplicate namespace prefixes

    XMLWordPrintableJSON

Details

    Description

      The getNamespaceURI() implementation in OdfFileDom is not aware of duplicate namespace prefixes. It is aware only of the default namespace prefixes, despite there being support for duplicate namespace prefixes in the implementation of OdfFileDom.

      I am submitting a patched test case "xpathtest-case-patch.txt" and the corresponding odt file used by the test.

      To simulate the problem –

      1) apply the patch xpathtest-case-patch.txt on the ODFDOM source
      2) put the XPathTest-duplicate-prefix.odt in odfdom/src/test/resources
      3) Run the src/test/java/org/odftoolkit/odfdom/dom/XPathTest.java unit test. It fails.
      4) apply the patch odffiledom-patch.txt on OdfFileDom and run the unit test again. It passes.

      I have added explanatory comments in the patched unit test and the patched getNamespaceURI().

      Attachments

        1. odffiledom-patch.txt
          1 kB
          Ashok Hariharan
        2. xpathtest-case-patch.txt
          5 kB
          Ashok Hariharan
        3. XPathTest-duplicate-prefix.odt
          28 kB
          Ashok Hariharan

        Activity

          People

            devinhan Biao Han
            kohsa Ashok Hariharan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified