problem referencing attributes from imported namespace

I have a problem validating a document against an external custom schema file with multiple namespaces. The validator uses Xerces 2.4.0 DOM.

These are the root and import element in my schema:

<xsd:schema targetNamespace="http://xxxxx/yyyyy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:myNS="http://xxxxx/yyyyy" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/"/>

I'm not setting the schemaLocation as I tell the validating application where to find the different schemas.
In the schema I have an attribute declaration referencing one from the imported schema

<xsd:attribute ref="soap:mustUnderstand" use="required"/>

When I try to validate my document using the above schema I get an exception with the following message:

org.xml.sax.SAXParseException: src-resolve.4.2: Components from namespace 'http://schemas.xmlsoap.org/soap/envelope' are not referenceable from schema document 'file:///C:/mySchema.xsd'

Is there anything wrong in the way I've imported the soap schema in my custom schema? Any help will be greatly appreciated.
Thanks. 

Received on Thursday, 24 July 2003 09:33:59 UTC