what schema to include?

Hello all,
 
This question is not theorethic, it is because of a real problem I have...
 
I have an XML instance document, which useselements from two different schemas (each one with a different namespace).
In the XML instance, I tell the parser the location of the schemas.
 
for example:
<a:root xmlns:a="aaa" xsi:schemaLocation="aaa a.xsd bbb b.xsd">
...
</a:root>
 
(this could be if schema for a has an <any> node such as <xsd:any namespace="bbb"/>          )
 
Now, suppose both a.xsd and b.xsd have inside then <xsd:include schemaLocation="c.xsd"/>
 
but it is not the same c.xsd - a.xsd refers to a c.xsd with some content, and b.xsd refers to a c.xsd with another contents.
 
How would a schema validator know what c.xsd to include ?
 
If I write a custom Entity Resolver, how can I know which c.xsd to resolve? the resolveEntity method does not get the namespace !
 
    Evyatar
 

Received on Thursday, 24 October 2002 10:21:24 UTC