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

systemId is modified with EntityResolver2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.11.0
    • None
    • SAX
    • None

    Description

      After updating to version 2.11.0 I noticed a different behavior with an EntityResolver2 implementation.

      If I parse an XML file with a schema defined with a relative systemId, Xerces always expands the systemId to an absolute one.This is the behavior of the EntityResolver interface and should not be the same with EntityResolver2, where the implementation should resolve relative systemIds. I expect the systemId to be an "ID" and not to change when given to the resolver.

      If xerces has no clue about the baseURI (source is inputstream, e.g. blob from database), it expands it to the current directory, where the Java process is started. Or else it uses the baseURI to expand it by itself. The standard parser of Oracle Java 6 SDK, does not do that. It is extremely sad, that Xerces 2.11.0 puts some logic into it, when this is expected to handled by the implementation of EntityResolver2.
      What makes this even more inconsistent is the fact, that XML Schema documents requested by other XML Schema documents are indeed requested as a relative URI.

      This bug was probably introduced by fixing XERCESJ-809. Maybe that bug would be better fixed by setting a feature or something.

      Attachments

        Activity

          People

            Unassigned Unassigned
            thosch Thomas Scheffler
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: