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

Restricting global 'CommonType' elements in instance documents

From: Viju Mathew <tiruvila@yahoo.com>
Date: Mon, 24 Mar 2003 11:46:29 -0800 (PST)
Message-ID: <20030324194629.17860.qmail@web13307.mail.yahoo.com>
To: xmlschema-dev@w3.org

I am building a schema set that is comprised of numerous specific business scenario schemas (ie., Customer Create, etc.) and a 'common type' schema which defines elements that are made accessible to each of these client schemas.

The element declarations in the common type schema are global and are ref'd in the client schemas, which have included the commonTypes schema.

For instance:

CommonTypes.xsd defines...
  <element name="POBox" type="string" />

and a client schema includes and uses it...
  <include schemaLocation="CommonTypes.xsd">
  <element name="Foo">
      <element ref="POBox">

<POBox> is defined as a distinct string element (as opposed to Foo just employing a native string type in-line) for future consideration. It's likely that it (and others like it) will be expanded down the road.

The problem is that, under the current design, there is no way to restrict an instance document from providing <POBox> as the root element, since it's a global element in an included schema. 

I'd like to keep these basic commonTypes as they are (for future growth) but also constrain the available root for instance documents.

Any pointers to the solution are appreciated !

Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
Received on Monday, 24 March 2003 14:47:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC