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

Re: Import Vs. Include.

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 19 Jun 2002 11:15:51 +0100
Message-ID: <175-1633585572.20020619111551@jenitennison.com>
To: "sunil" <supadhye@cisco.com>
CC: xmlschema-dev@w3.org

Hi Sunil,

> Which is right? How should I include/import the ims schema, and
> what's the difference between the way I did it and they did it?

The fundamental difference between include and import is that you must
use import to refer to declarations or definitions that are in a
*different* target namespace and you must use include to refer to
declarations or definitions that are (or will be) in the *same* target

You are absolutely right to use xs:import in your schema because the
target namespace of your schema is
http://www.cisco.com/elearning/xsd/ciscomd_v001 but the target
namespace of the schema that you're importing is

In the documentation that you quote, the schemas are being included
because they are in the same target namespace as the schema in which
they're being included.

(As Bob said, you'll probably want to associate the namespace
http://www.imsglobal.org/xsd/imsmd_rootv1p2p2 with a prefix in your
schema, so that you can refer to specific elements or attributes from
it, although I guess you could be using wildcards in your schema, in
which case you don't have to worry about that.)



Jeni Tennison
Received on Wednesday, 19 June 2002 06:15:53 UTC

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