W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2002

Public comment on XML Schemas

From: Patrick McCartney <pat.mccartney@ektron.com>
Date: Tue, 30 Jul 2002 17:16:59 -0600
Message-Id: <>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>

If would be helpful to allow for an attribute type in the same way that an 
element type is supported.

Currently, if an attribute is defined, as if it were a type, then the 
actual attribute element cannot use within the type attribute the defined 
attribute type.

As an example, suppose I have a type of attribute that supports a certain 
set of values that extend the Boolean type to include any humanly accepted 

             <xs:attribute name="yesnoType" default="true">


                                     <xs:restriction base="xs:NMTOKEN">

                                                 <xs:enumeration value="true"/>


                                                 <xs:enumeration value="yes"/>

                                                 <xs:enumeration value="no"/>

                                                 <xs:enumeration value="ok"/>


                                                 <xs:enumeration value="1"/>

                                                 <xs:enumeration value="0"/>




This type of attribute may be used for any number of attributes within the 
set of defined elements.  An example, that is not supported, is this:

             <xs:complexType name="statusType">

                         <xs:attribute name="id" type="xs:IDREF" 

                         <xs:attribute name="popup" type="xs:IDREF"/>

                         <xs:attribute name= visible type="b:yesnoType"/>

                         <xs:attribute name= enabled type="b:yesnoType"/>


This would greatly reduce the size of a schema that uses these attributes.
Received on Wednesday, 31 July 2002 11:27:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:00 UTC