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

combining pattern values?

From: <chuck.han@autodesk.com>
Date: Fri, 15 Sep 2000 06:00:04 -0700
Message-ID: <258E47267E4BD3118DCA00805FA72E0804613FEC@hqmsgsrf03.autodesk.com>
To: www-xml-schema-comments@w3.org
Hi,

Is there some way to combine pattern values when defining a new simpleType?  For example, suppose I have a simpleType called IntegerString:

	<simpleType name="IntegerString" base="xsd:string">
		<pattern value="\d+">
	</simpleType>

and a simpleType called UnitsString that can be expressed either as:

	<simpleType name="UnitsString" base="xsd:string">
		<enumeration value="cm"/>
		<enumeration value="in"/>
	</simpleType>

or:

	<simpleType name="UnitsString" base="xsd:string">
		<patter value="cm|in"/>
	</simpleType>

Is there a way to create a simpleType based on these two simpeTypes that would allow the value, say "23cm".  Clearly it would be simple enough to create a simpleType on its own to support such an expression, but there are cases that the combination of simpleTypes would be desirable.

thanks in advance, Chuck

Chuck Han, Data Architect
Autodesk, Inc.
+1.415.507.8742
Received on Friday, 15 September 2000 09:00:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC