W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2002

what schema to include?

From: Evyatar Kafkafi <Evyatar@orsus.com>
Date: Thu, 24 Oct 2002 16:20:59 +0200
Message-ID: <B17109C0B09CF8409145E629B64EF4FB257631@hermes.il.orsus.org>
To: <xmlschema-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT