[xml] Schema validation with processContents=strict, multiple schemata

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:

Best regards,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]