1. Xerces doesn't actually use "XMLSchema.xsd" to validate the schema documents. There are far more constraints that need to be checked than those defined in this schema, so we just write a lot of code to check all the constraints. :-)
2. Did you make sure you have access to the file "http://www.w3.org/2001/XMLSchema.xsd" when you tried the following? I inserted it into one of my xsd files, and the parser (latest CVS version, but 2.2.0 should do the same) did find the schema file, and tried to read and parse it. <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/> 3. Whether you use the above <import>, or save the file locally and somehow refer to it, you will see many errors reported against the XMLSchema.xsd, about deriving from xsd:anySimpleType and facets. This schema document obviously violates many of the schema constrains of the current version of the schema spec. We (Xerces developers) believe that this document needs to be fixed, while some others think the schema spec needs to be changed so that it allows XMLSchema.xsd to violate those constraints. This is still a pending problem. Conclusion: Xerces2 is capable of handling the XMLSchema.xsd, but this document itself isn't valid with regard to the schema spec at this point of time. Hope this helps, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 [EMAIL PROTECTED] "Michael Lipp" <[EMAIL PROTECTED] To: [EMAIL PROTECTED] et.de> cc: Subject: Problem validating XForms 10/24/2002 08:47 AM Please respond to xerces-j-user 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
