开发者

JAXP: How to dynamically resolve a Schema during XML parsing?

开发者 https://www.devze.com 2023-02-14 15:57 出处:网络
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 resolv

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

0

精彩评论

暂无评论...
验证码 换一张
取 消