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

RE: what schema to include?

From: Evyatar Kafkafi <Evyatar@orsus.com>
Date: Thu, 24 Oct 2002 16:35:38 +0200
Message-ID: <B17109C0B09CF8409145E629B64EF4FB738793@hermes.il.orsus.org>
To: "Jeni Tennison" <jeni@jenitennison.com>, <xmlschema-dev@w3.org>

Yes, but there are still at least 2 cases when I don't have the URL:

1) suppose a.xsd and b.xsd are not files. Suppose I supply them as InputSource in my custom Entity Resolver (They are in my database as strings). When my Entity Resolver is requested to resolve c.xsd, how should it know which one?
2) if in a.xsd and in b.xsd I have <xsd:include schemaLocation="c.xsd"/> - where is the URL ?

	Evyatar

-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Thu, October 24, 2002 4:32 PM
To: xmlschema-dev@w3.org; Evyatar Kafkafi
Subject: 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:36:02 GMT

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