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

XInclude processor treats malformed bytes sequences as resource errors.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.6.2
    • None
    • XInclude 1.0
    • None
    • Operating System: All
      Platform: All
    • 27422

    Description

      While parsing a resource at an include location (both parse=xml and
      parse=text), the XInclude processor is unable to detect whether the resource it
      was parsing contained malformed byte sequences [1]. This is because the
      IOException thrown by the Reader does not provide enough information to
      determine the cause of the exception. It may very well have been something else
      such as not being able to open an input stream. Instead of reporting a fatal
      error, the processor treats it as a resource error and then looks for a
      fallback. If a fallback exists the resulting stream will be malformed.

      See Bug #27083, it's somewhat related to this problem. Although we cannot
      change the behaviour of Java's readers, we should at least catch malformed byte
      sequences with our own UTF8Reader and ASCIIReader and report them as with other
      well-formedness violations.

      [1] http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            mrglavas@ca.ibm.com Michael Glavassevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: