I try to validate the OAI-PMH protocol which embeds an xml-document within another document by using:

<any namespace="##other" processContents="strict"/>


When validating with
$ xmllint -schema oai-pmh.xsd test.xml
I get the following error on the embedded document:
> ... No matching global element declaration available, but demanded by the strict wildcard.

The embedded document has another namespace with a different schema, provided by an xsi:schemaLocation on the inner document. If I manually switch the processContents to "lax", schema-validity of the inner document is not required, and the document validates.

How can I make xmllint or generally libxml validate against two or more independent schema? Or how can I persuade libxml to automatically fetch the schema of the inner document?

The full schema and details on the OAI-PMH protocol can be found at: http://www.openarchives.org/OAI/openarchivesprotocol.html

An example can be retrieved from:
http://dokipy.met.no/r2/pmh/oai2.php?verb=ListRecords&metadataPrefix=dif

Best regards,

Heiko

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to