I have two schemas: a base schema that is extensible through an 'any'
element, and an extension schema that defines the element I expect to find
there for a certain project.
base schema fragment:
<xsd:complexType name="custom">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:any namespace="##any" processContents="lax"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element ref="custom"/>
extension schema fragment:
<xsd:element name="somethingnew">
...
</xsd:element>
instance fragment:
<custom>
<somethingnew>
...
</somethingnew>
</custom>
Using Xerces-C, I can validate the file using the base schema, which will
accept any well-formed xml in place of the 'any' element. My question is
how do I validate the 'somethingnew' element using the separate extension
schema? I could modify a copy of the base schema to include the extension
element, but I'd like to be able to use the two files in their unmodified
forms, as they are standard documents. Can I somehow load both schemas into
a grammar pool and validate the whole instance?
I'd really appreciate any help. Thanks for sharing your knowledge!
--
View this message in context:
http://old.nabble.com/Validation-of-Instance-Extended-Through-%27any%27-Element-tp31758318p31758318.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.