Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1102

Wrong value of xml:base attribute after resolving XInclude references

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.7.1
    • Fix Version/s: None
    • Component/s: XInclude 1.0
    • Labels:
      None
    • Environment:
      J2SE 1.5.0_04

      Description

      The value of the xml:base attribute is not computed correctly for files included with XInclude starting with nesting level 2. After resolving the XInclude references the path stored in the xml:base value should be relative to the including document, not relative to the master document.

      To reproduce the bug, unarchive the attached zip in the Xerces install directory and in that directory execute the command line

      java -cp xercesImpl.jar;xercesSamples.jar sax.Writer -xi XercesXIncludeBug\a.xml

      The document echoed in the console contains a "c" element with xml:base="b/c/c.xml". It should be xml:base="c/c.xml".

        Attachments

        1. 1102-tested.patch
          4 kB
          Jan Tošovský
        2. 1102-improved.patch
          1 kB
          Franziska Meyer
        3. bug-1102.patch
          1 kB
          Franziska Meyer
        4. XercesXIncludeBug.zip
          1.0 kB
          Sorin Ristache

          Activity

            People

            • Assignee:
              mrglavas@ca.ibm.com Michael Glavassevich
              Reporter:
              sorin Sorin Ristache
            • Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: