Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


validating XML with XmlValidatingReader against schema that use xs:include

From: "davidmcb@-------.---" <--------@-------.--->
To: NULL
Date: 4/2/2005 9:43:00 AM
Hello,

I have a working validating parser, written with C#, that uses the
XmlValidatingReader class.  My schema library contains a set of nearly
identical schema, except for a few types.  The obvious thing to do is
to break out the common types into a single schema, then 'include'
(xs:include) that schema in the other schemas.

The problem is that when I try to do that, the validator is no longer
able to find the type definitions contained in the included schema,
even though the schema are all in the same directory.  Another point is
that I want to avoid hardcoding the schema or passing the schema as an
argument to the validator.  I just want to pass in the XML document
filename, then use the references to the schema found in the XML
document itself.

My code is pretty standard:

XmlTextReader xml = new  XmlTextReader(filename);
XmlValidatingReader xsd = new XmlValidatingReader(xml);
xsd.ValidationEventHandler += new
ValidationEventHandler(MyValidationEventHandler);
while  (xsd.Read()) {}

etc.

Any help is appreciated.



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent