> You need to either provide the location of test.xsd (which is used to
> resolve the relative reference to test2.xsd) (by using a string or input
> source instead of a stream), or you need to register an EntityResolver (the
> javadoc [1] tells you what it's for and how to use it).[1]
> http://xml.apache.org/xerces2-j/javadocs/api/org/xml/sax/EntityResolver.html

  Ok, this is valid if I use SAX, but I want to use DOM parser and to
get a DOM tree at the end. The real problem about validation and schema
locations is when document instances are created somewhere else and they
have to be validated on some other places. In such situations,
schemaLocation attribute does not help much, because its value is
usually binded to some local files.

  Therefore, I would like to have a possibility to specify the locations
of all needed schemas during run-time, so the parser could know where to
look for.

  I have found property
http://apache.org/xml/properties/schema/external-schemaLocation, but it
is not JAXP compliant and it matches only schemaLocation attributes from
import elements, so it does not help in general.

  Any idea?

Predrag


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to