An SAXParseException associated with the XML Schema for Schemas

Reposted... Sorry for forgotting the subject line.
----- Original Message ----- 
From: XIANGMIN WANG<mailto:wxiangmin@msn.com> 
To: www-xml-schema-comments@w3.org<mailto:www-xml-schema-comments@w3.org> 
Cc: Xiangmin Wang<mailto:wxiangmin@msn.com> 
Sent: Saturday, April 09, 2005 10:04 PM


Hi, 

    The attached XMLSchema.xsd is a copy from Appendices  A Schema for Schemas (Normative) of your XML Schema Part 1: Structures 2nd Edition. I use it (the attached XMLSchema.xsd) to validate a XML schema document (a XSD file).

    I got the org.xml.sax.SAXParseEception exception when creating a Schema object from it. Please see the following code snippet and exception. I would incline to say that a problem in XMLSchema.xsd is a cause of the exception.

    I file this report. And if you could reply to this message indicating the source of the problem, I would appreciate in advance.

Xiangmin Wang



This is the exception that I got:

    org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'xs:derivationControl' to a(n) 'type definition' component.

This is the code segment. I am using the Sun Jaxp 1.3 APIs:

    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Source schemaSource = new StreamSource(new java.io.File(schemaDocFile)); // <<< the schemaDocFile is the attached XMLSchema.xsd

    try {
        Schema schema = schemaFactory.newSchema(schemaSource);
         schemaValidator = schema.newValidator();   // <<< this is the line where the exception occurs.
    }
     catch(SAXException e) {
         System.err.println(e);
    }

Received on Wednesday, 13 April 2005 00:55:29 UTC