woodstox
woodstox copied to clipboard
Allow configuration of DTD entity resolver for DTDSchemaFactory
While it is possible to configure an XMLResolver
to use for resolving either general parsed entities, or for processing entities only relevant for DTD subsets, when parsing XML documents with embedded DTD subsets and/or references, there is no way to do that currently when reading DTDs externally.
It would make sense to allow similar configurability via DTDSchemaFactory
as well.
@cowtowncoder I think this is most likely the equivalent of setting the property http://apache.org/xml/properties/internal/entity-resolver
and providing an org.apache.xerces.util.XMLCatalogResolver
in Xerces.
I am switching eXist-db from Xerces to Woodstox (keeping to the SAX API) and so need this feature. Can you give me a few pointers on how you would like to see this implemented in Woodstox? From there I should be able to code it up and send you a PR.
@cowtowncoder Also can you tell me how to setup an XMLResolver equivalent for the SAX API in Woodstox? I need something akin to org.apache.xerces.util.XMLCatalogResolver
@adamretter I do not remember how it works with Woodstox SAX API; I'd have to dig into sources to remember. But mechanism supported are just the basic SAX API (and wrapping), AND Woodstox native entity resolver, configured via underlying pull parser, nothing fancier.