Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1924

DaffodilXMLLoader needs to explicitly specify which instance to use

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: Front End
    • Labels:
      None

      Description

      The SAXParserFactory.newInstance() method is used to create a new instance of a SAXParser. There are a handful of steps taken to find a SAXParser to use, as documented in the newInstance() JavaDocs. The problem with this is that Daffodil sets the entity-resolver property to an instance of the DFDLCatalogResolver, which extends a specific Xerces XMLEntityResolver. In order for this to work, we must be guaranteed that the SAXParserFactory instance we get is the Xerces one, and not some other one overridden by one of the ways described in newInstace().

      So instead, we should use the newInstance method that lets you provide a string specifying which factory class to use, and specify our Xerces one.

        Attachments

          Activity

            People

            • Assignee:
              dfthompson Dave Thompson
              Reporter:
              slawrence Steve Lawrence
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: