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" />



Jeni Tennison
Received on Wednesday, 19 February 2003 05:17:30 UTC

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