Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-245

Make use of the EntityResolver set in XmlOptions throughout the whole library

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: Version 2.1
    • Fix Version/s: Version 2.1
    • Component/s: None
    • Labels:
      None

      Description

      Appearently, XmlObject.Factory.parse(... XmlOptions) method to use the value set by XmlOptions.setEntityResolver in order to replace the default EntityResolver used (http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlOptions.html#setEntityResolver(org.xml.sax.EntityResolver)):

      "If this option is set when compiling a schema, then the given EntityResolver will be consulted in order to resolve any URIs while downloading imported schemas. EntityResolvers are currently only used by compileXsd; they are not consulted by other functions, for example, parse. This will likely change in the future."

      I am in need of this change to replace the EntitiyResolver used with one that uses getClass().getResourceAsStream() to load the schema from class path.

      Hopefully, it should be too much work IoC also helps out when doing JUnit tests etc.

      There might be a temporary work around using XmlOptions.setLoadUseXMLReader and the default JDK's SAX parser. I'll get back on that one.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jimisola Jimisola Laursen

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment