[xsd-users] xsd questions

Graham Bennett graham-xsd at simulcra.org
Sun Oct 9 18:21:59 EDT 2005


Hi,

I'm evaluating xsd and I have a couple of questions:

It seems that the generated code parses instance documents with xerces
validation enabled.  Is it possible to disable this, which would remove
the overhead of validation for each instance document, or is the code
making assumptions that the document is always valid?  Other
implementations I have seen generate a 'perfect parser' for the
document, which means the elements expected at each stage are hard coded
in the generated code and an exception will be thrown if anything else
is encountered.

The second question is a side-effect of the behaviour described above.
In my environment we rarely specify schema location via the
schemaLocation attribute in the instance document, but instead prefer to
specify it externally on the parser (e.g. Xerces setSchemaLocation).  Is
there a way to get xsd to make the generated code 'remember' the schema
location and set it on the parser when creating instances?
Alternatively is there a way to get at the xerces internals to set it
manually?

Thanks in advance,

Graham.

-- 
Graham Bennett



More information about the xsd-users mailing list