Validating document()
Added by Glen Bal over 9 years ago
Hi,
I'm using Saxon-EE 9.5.1.7 to validate against a schema. I have a main xml-document with references to content (= other xml-documents). The main xml has a different schema than the other xml-documents. For all files the schema is defined in the document itself. (xsi:noNamespaceSchemaLocation="documentSchema.xsd") During processing of the main xml I load the other documents with the document()-function. Now my problem is that the documents are processed with the schema of the main xml. I want them to be validated against the schema of itself. Is there a way to do this?
Thanks in advance! Glen
Replies (2)
RE: Validating document() - Added by Michael Kay over 9 years ago
Saxon only allows one schema to exist within a Configuration (a schema of course can be the union of multiple schemas, but it can't contain multiple or conflicting declarations of the same element or type).
So if the "different" schema is consistent with the parent schema this shouldn't be a problem, but if it is in conflict, so you can't form the union, then it gets difficult. You might have to resort to some kind of process forking.
RE: Validating document() - Added by Glen Bal over 9 years ago
Ok, I can start to solve all the conflicts then. Thanks for your quick answer.
Please register to reply