woodstox icon indicating copy to clipboard operation
woodstox copied to clipboard

Allow configuration of DTD entity resolver for DTDSchemaFactory

Open cowtowncoder opened this issue 9 years ago • 3 comments

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 avatar Jun 23 '15 20:06 cowtowncoder

@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.

adamretter avatar Jul 13 '16 16:07 adamretter

@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 avatar Jul 13 '16 16:07 adamretter

@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.

cowtowncoder avatar Jul 13 '16 19:07 cowtowncoder