W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Re: importing schemas

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 19 Feb 2003 10:16:39 +0000
Message-ID: <9340171590.20030219101639@jenitennison.com>
To: Dinesh Sankaralingam <dsankara@cook-hurlbert.com>
CC: xmlschema-dev@w3.org

Hi Dinesh,

> My goal is to import test1.xsd into test.xsd and reference the root
> element of test1.xsd so that whenever i add or remove elements in
> test1.xsd i don't have to change anything in test.xsd.
>
> For example, if i add another element called "E3" in test1.xsd i
> should be able to access it without any code changes in test.xsd. Is
> it possible to do it?

The only elements that you can reference within test1.xsd are those
that are declared globally, such as Test1_Root in your example. The
elements E1 and E2 are declared locally, and thus can only appear
within the Test1_Root element.

If you want to allow any global elements that are in the test1
namespace (the target namespace of the test1.xsd schema) then you
should use the wildcard:

  <xs:any namespace="test1" />

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 19 February 2003 05:17:30 GMT

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