i am using SAX to parse a huge
doc.
my Q is: How to set that Validation must occur?
The xerces parser I use seems to be only checking well-formedness, but noth validation ; although I force it to do so:
Approach 1: in the root element of the XML Document.
PS:By default the XML Docs I receive do not have either noNamespaceSchemaLocation or schemaLocation set. so I added them manually programmatically just to be able to
test; by using reader.set(..., ...);
Approach 2: within the SAX Parser:
PS: THE TARGETNAMESPACE OF THE XSD DOC and the DEFAULT NAMESPACE OF THE RECEIVED Instance XML DOC ARE THE SAME; I guess this means I should NOT use
noNamespaceSchemaLocation. Am I right?
also, xsi:schemaLocation="http://www.R�STEM.RU/XYZ.KUR file:/C:/schemas/schema1.xsd" this can or cannot exist in the XML Instance document. it should not make any difference. is this also correct?
In the Xerces web site, it claims when one programmatically defines the schema location, then the schemaLocation on the XML instance document (if ever exists) will be overwritten..
Thx
R�stem
[ January 26, 2005: Message edited by: R�stem-� Zal� ]