Re: [xml] XML Schema 'any' element support

Kasimier Buchcik wrote:
On Wed, 2005-06-08 at 10:24 +0200, Kasimier Buchcik wrote:

On Tue, 2005-06-07 at 19:19 +0200, Martijn Faassen wrote:

libxml2 schemas seems to fail against it though.
After looking at the schema, it seems that the problem is not the
<any> wildcard: you need to validate with XSI-driven schema assembling.

At least the schema needs this. For my purposes, your hint that 'processContents' *defaults* to 'strict' gave me the solution, I changed it to 'skip' and now the thing validates. Thanks!

I am validating the OAI-PMH envelopes (as part of some test cases for OAI-PMH server code I'm writing), not the metadata payload, so I'm fine not having any schema assembling take place, at least for now.

The schema uses xsi:schemaLocation to load schemata dynamically when
needed. This is currently not accessibly via xmllint [2].
But you'll find an example at [1] about how do it otherwise -
Daniel did not add it to the code examples yet ;-)
If you need to use xmllint, you can create one additional schema,
<import> all other schemata and validate against this new schema.

In you lucky case the "##other" bug does not do any harm.

I've taken note of this example as something I might want to support with lxml one day. I think for now I know enough to make progress; luckily I can control the schema in my test cases and disable the strict checking.



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