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

Re: A request for help with understanding the scope of an < import namespace />

From: Eddie Robertsson <erobertsson@allette.com.au>
Date: Wed, 27 Mar 2002 10:41:11 +1100
Message-ID: <3CA10717.8F2792DF@allette.com.au>
To: John Utz <utz@singingfish.com>
CC: xmlschema-dev@w3.org
Hi John,

> the author of foo.xsd believes that the import namespace line in foo.xsd
> should be sufficient for the namespace aware parts of foobar-2001.xsd
> and bazbar-2001.xsd to be resolved.
> this is a quote from this person:
> * I don't understand why the insertion of the import to every
>   sub-schema is the right implementation without a construct
>   such as "#ifdef" in C++ to avoid collisions.
> the current version of xerces2-j disagrees with him alot. :-)
> it gets very unhappy and spews zillions of namespace based errors if i
> dont put the import namespace line into each included schema.
> this is a recent feature of xerces, and when i asked about it on the
> xerces-j list it was asserted that this was the correct behavior.
> i believe that the xerces gang is correct. but i am unsure, so i am asking
> on this list because i feel like i'll get an authoritative answer.
> i really need an authoritative answer because this is just about the very
> last step before this major new xsd based specification goes out the door
> and i only want to reply to this important person once with a
> correct, succinct, answer.
> a pointer to the place in the spec that calls this behavior out would be
> wonderful.

Xerces2-j is indeed correct here. The place in the spec where this is specified is
at [1]. Point 4 says:

"4 its ·namespace name· is either the target namespace of the schema document
containing the ·QName· or that schema document contains an <import> element
information item the ·actual value· of whose namespace [attribute] is identical to
that ·namespace name·."

This means that to allow references in schema documents foobar-2001.xsd and
bazbar-2001.xsd to components defined in schema documents with different
namespaces, schema documents foobar-2001.xsd and bazbar-2001.xsd must import these
documents explicitly.
See [2] for more information about this.


[1] http://www.w3.org/TR/xmlschema-1/#src-resolve
[2] http://lists.w3.org/Archives/Public/xmlschema-dev/2002Jan/0186.html
Received on Tuesday, 26 March 2002 18:28:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC