Hello,
until today, I've used xerces very successfully to validate my XML documents. But now I have a problem which might be a Xerces (design) bug.
I'm trying to validate an XForms description. The XForms schema has something that makes it different from any other schema I have used before: documents may include an XML Schema instance:
...
<xsd:element name="model">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:choice>
<xsd:element ref="xforms:instance"/>
<xsd:element ref="xsd:schema"/> <!-- << here! -->
<xsd:element ref="xforms:submission"/>
<xsd:element ref="xforms:bind"/>
<xsd:group ref="xforms:actionGroup"/>
<xsd:element ref="xforms:extension"/>
</xsd:choice>
</xsd:sequence>
...In order to allow the xsd:element to ref xsd:schema, it must be known what xsd:schema is. The XForms schema accomplishes this by importing XMLSchema:
<xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
Now Xerces says that it cannot find the schema to be imported. Strange, isn't it, because Xerces must know about this schema, else it couldn't verify schemas. ;-)
But obviously, the built-in support for http://www.w3.org/2001/XMLSchema only applies to namespace declarations, not for imports.
I tried to explicitly declare XMLSchema, i.e. I downloaded the schema file for XML schema (sounds like a bootstrap problem already) and added it to the schemaLocation property (needs an entry in the DTD catalog as well, but I did all that). This seems to override the built-in XML schema definition successfully as it leads to complete chaos... (as could be expected).
Any help?
Regards,
Michael
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
