I have some XML instance documents that specify schemas via the xmlns
attribute.
I need to load these documents (with XmlDocument) and have them
verified against the XSD's that are mentioned.
However, the documents are intended to be shared between machines but
the location of where the XSD's are stored can vary from machine to
machine so I don't think it is possible for me to specify the
xsi:schemaLocation in the instance documents.
To load these documents and have them verified I can only think that I
should:
1. Load them once without validation
2. Parse the document and build a list of the namespaces they are
trying to use
3. Create an XmlSchemaSet and populate it with the known locations of
the schemas
4. Finally load them again with validation on using the schema set I
just built
Does this sound right?
thanks