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

Re: schemaLocation in instance documents - how many hints?

From: Eddie Robertsson <eddie@allette.com.au>
Date: Tue, 15 Jan 2002 10:16:11 +1100
Message-ID: <3C4366BB.63C45D9E@allette.com.au>
To: Simon.Cox@csiro.au
CC: xmlschema-dev@w3.org
Hi Simon,

> In an /instance document/, is it good practice to have
> a schemaLocation hint for every namespace used therein?
>
> Or if one schema document <imports> documents which
> (ultimately) describe all the other necessary namespaces,
> is it sufficient to only provide the schemaLocation hint
> for the ultimate schema document?

Yes, if you have one ultimate schema that imports all other schemas with
different namespaces then it is enough to only provide the schemaLocation
hint to this schema in the instance.
One reason to include a schemaLocation hint for every namespace used in the
instance can be to provide the users of the instance with information about
the location of the different schemas involved. But this can be risky
business since the instance and schemas may not be created by the same
application or user which means the schemaLocation hint in the schema can
differ from the schemaLocation hint in the instance for the same namespace
and I think this will lead to different behaviour depending on what
validator you're using.

Cheers,
/Eddie
Received on Monday, 14 January 2002 18:07:32 GMT

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