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

RE: Question regarding attribute restriction

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Fri, 24 May 2002 08:32:33 -0400
To: <rmccarthy@vasocor.com>, <xmlschema-dev@w3c.org>
Message-ID: <001601c2031f$149e1890$339afea9@WALMSLEYPH>
This is fine, as long as an empty value is valid for the base type.  In
your case, it is.

Priscilla

-----------------------------------------------------
Priscilla Walmsley             priscilla@walmsley.com
Author, Definitive XML Schema     (Prentice Hall PTR)
----------------------------------------------------- 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Robert McCarthy
> Sent: Wednesday, May 22, 2002 9:53 AM
> To: xmlschema-dev@w3c.org
> Subject: Question regarding attribute restriction
> 
> 
> 
> Is the following restriction on unitsOfMeasure1 valid, i.e., 
> can I use the
> tag <xs:enumeration value=""/> in the restriction?  Thanks!
> 
> Robert
> 
> <xs:element name="height">
> 	<xs:attribute name="unitsOfMeasure1" use="required">
> 		<xs:simpleType>
> 			<xs:restriction base="xs:token">
> 				<xs:enumeration value="ft"/>
> 				<xs:enumeration value=""/>
> 			</xs:restriction>
> 		</xs:simpleType>
> 	</xs:attribute>
> 	.....
> </xs:element>
> 
> 
> 
> 
Received on Friday, 24 May 2002 08:34:32 UTC

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