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

Global attribute vs. simpleType

From: Rich Adili <Rich.Adili@xata.com>
Date: Mon, 21 May 2007 11:31:18 -0500
Message-ID: <A0340B4A1C76734798D48BF3F09C62061F9606@EXCHVS01.xata.com>
To: <xmlschema-dev@w3.org>
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
Received on Monday, 21 May 2007 16:31:31 GMT

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