JAXP: How to dynamically resolve a Schema during XML parsing?
Imagine a xml file which refers to a schema using noNamespaceSchemaLocation
.
I'd like to resolv开发者_Python百科e the value defined in noNamespaceSchemaLocation
dynamically using some kind of resolving technique (like ResourceResolver
for resolving schema includes) during parsing (default values in the schema have to be considered)
Is there a way to do this?
I would guess that when you call Validator.setResourceResolver()
, the LSResourceResolver you supply is used for this purpose (it is in the Saxon implementation of the JAXP interface, but you would need to run a test to check that it's also true of the Xerces implementation).
精彩评论