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

Re: Integrating XLink attributes into XML Schema

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 21 Nov 2002 16:19:50 +0000
Message-ID: <152-2053584508.20021121161950@jenitennison.com>
To: xmlschema-dev@w3.org, "Michael Ryan Bannnon" <mrbannon@uwaterloo.ca>

Hi Ryann,

> Another question (indirectly) involving schemas and imported
> namespaces. There's a posting in the mailing list that says to use
> the XML Schema <import> element to include an XLink schema into
> another schema. This seems to work fine. however, would it be
> possible to use the XML Schema <include> attribute just as well?

The distinction between import and include is that include brings in
external schemas that have the *same* target namespace as your schema,
whereas import brings in external schemas that have a *different*
target namespace from your schema.

It wouldn't work to include an XLink schema unless your schema had the
XLink target namespace -- you'd get an error. Similarly, it wouldn't
work to import an XLink schema if your schema had the XLink namespace
as its target namespace -- you'd get an error.

Actually, there is one time when you can include a schema with a
different target namespace from your schema, and that's if the schema
you're including has *no* target namespace. In this case, the included
schema adopts the namespace of your schema (it's known as a "chameleon
schema").

I hope that clarifies things for you.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 21 November 2002 11:19:51 GMT

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