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

Extending enumerated simple content of complex types

From: Hugh Wallis <hugh_wallis@hyperion.com>
Date: Tue, 25 Mar 2003 12:33:48 -0500
Message-ID: <000b01c2f2f4$b1b2c3e0$78941bac@hyperion.com>
To: <xmlschema-dev@w3.org>

As a corollary to my earlier question on successive restriction of simple
content in complex types:

In my xbrli namespace I have the following type:

 <complexType name="stringItemType">
  <simpleContent>
   <extension base="string">
    <attribute name="nonNumericContext" type="IDREF" use="required"/>
    <anyAttribute namespace="##other" processContents="lax"/>
   </extension>
  </simpleContent>
 </complexType>

I now define a new type in my dt namespace as follows:

 <complexType name="accountTypeItemType">
  <simpleContent>
   <restriction base="xbrli:stringItemType">
    <enumeration value="account"/>
    <enumeration value="bank"/>
    <enumeration value="employee"/>
    <enumeration value="customer"/>
   </restriction>
  </simpleContent>
 </complexType>


Suppose I now want to define another type in another namespace that has as
simpleContent the enumerations from dt:accountTypeItemType and, in addition:

    <enumeration value="job"/>
    <enumeration value="vendor"/>
    <enumeration value="fixed-asset"/>

What is the best way to do this? I would like the resulting type to derive
from xbrli:stringItemType but I want to have a modular system that doesn't
require me to re-enumerate the list from accountTypeItemType in my new type.
Is this even possible in XML Schema?

Thanks

Hugh



************************************************************************

If you received this e-mail in error please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited.

Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion.

For more information about Hyperion, please visit our Web site at www.hyperion.com
Received on Tuesday, 25 March 2003 12:33:57 GMT

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