Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Global attribute vs. simpleType

From: "Pete Cordell" <petexmldev@--------------.--->
To: "Rich Adili" <Rich.Adili@----.--->, <xmlschema-dev@--.--->
Date: 5/21/2007 7:22:00 PM
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"/>

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML Schema to C++ data binding visit
 http://www.tech-know-ware.com/lmx/
 http://www.codalogic.com/lmx/
=============================================

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


Hi,

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:complexType>
<xs:attribute name="fooble" type="foober"/>
<xs:attribute ref="fibber"/>
</xs:complexType>
</xs:element>
<xs:attribute name="fibber">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:simpleType name="foober">
<xs:restriction base="xs:string"/>
</xs:simpleType>
Rich Adili



From Rich.Adili@x... Tue May 22 01:41:39 2007
Received: from maggie.w3.org ([193.51.208.68])
	b


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent