Re: what schema to include?

Hi Evyatar,

> 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.

I don't understand: surely the two c.xsd files must have different
(absolute) URLs -- you can't have two different files with the same
URL. "c.xsd" should be resolved relative to the URL of a.xsd when it's
referred to in a.xsd, and to the URL of b.xsd when it's referred to in
b.xsd.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Thursday, 24 October 2002 10:31:56 UTC