W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2007

Re: Global attribute vs. simpleType

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Mon, 21 May 2007 18:22:26 +0100
Message-ID: <001201c79bcc$a17a29c0$3b00a8c0@Codalogic>
To: "Rich Adili" <Rich.Adili@xata.com>, <xmlschema-dev@w3.org>

Hi Rich,

The global attribute will need to be qualified by the schema namespace in an 
XML instance document, whereas typically attributes belong to no namespace 
at all and hence are defined locally and unqualified.

The global attribute can also be matched as part of an <xs:anyAttribute 
process="strict"/> style wildcard construct.

And a final note, although the schema you've defined is correct, you could 
have defined the global attribute as:

<xs:attribute name="fibber" type="xs:string"/>


Pete Cordell
Tech-Know-Ware Ltd
for XML Schema to C++ data binding visit

----- Original Message ----- 
From: "Rich Adili" <Rich.Adili@xata.com>
To: <xmlschema-dev@w3.org>
Sent: Monday, May 21, 2007 5:31 PM
Subject: Global attribute vs. simpleType


Is there a practical difference between a reference to a global
attribute and the use of a simpleType? Only thing I can see is that the
ref forces the name of the attribute.

<xs:element name="myroot">
<xs:attribute name="fooble" type="foober"/>
<xs:attribute ref="fibber"/>
<xs:attribute name="fibber">
<xs:restriction base="xs:string"/>
<xs:simpleType name="foober">
<xs:restriction base="xs:string"/>
Rich Adili
Received on Monday, 21 May 2007 17:22:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:12 UTC