Question

While validating an XML document using Xerces, it tries to access internet resources in w3c.org. My application that needs to work offline/behind a firewall throws an exception because of that.

Is there a workaround?

ps. This link provides some insights but no workarounds: http://xerces.apache.org/xerces2-j/faq-general.html#faq-10

Was it helpful?

Solution

The workaround is to supply a "catalog resolver" which redirects these requests to local copies.

A convenient way of doing this, for some applications, is to do the parsing via Saxon, which contains local copies of the most commonly used resources and does the redirection by default, without any user intervention. But whether this is convenient for you depends on the nature of the application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top