[xml] XML Schema: Validating an instance document with multiple schemas

I’m porting a Win32 app that uses MSXML to a POSIX environment that will use libxml2. This app uses XML schema for validation.


There is basically a ‘main’ schema that (among other things) includes an element with a complex type sequence of ‘any’ type:


<xs:element name="Properties" minOccurs="0">



                             <xs:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>





The idea is that the app data model is extensible, and that the ‘any’ node will contain data that will declare a new namespace and be validated by a different schema. These schemas are not currently designed to use schema include (xs:include).


The MSXML parser allows multiple schemas to be loaded into a collection, which is then associated with the document that is to be validated. However, it looks like the libxml2 schema API is designed to work with one schema/context at a time. Am I correct?


Thanks in advance,

- Paul



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