

More thoughts on XML Schema Datatypes (lexical representation)

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Fri, 25 Jun 1999 10:37:06 -0600
Message-ID: <61DAD58E8F4ED211AC8400A0C9B468731AADD8@THOR>
It seems like trying to determine the nature of the lexical element from the
datatype (or its base datatype) is troublesome.  Wouldn't it be better to
have the lexical element contain child element of specific types.   (I know
that the presence of regex is debatable, it's inclusion here is not an
opinion on that debate)

Say something like

<datatype name="postalcode" basetype="string">
		<regex>some regular expression</regex>

<datatype name="F6.2" basetype="real">
	<!--  lexical rep allows any string that passes one of the inclosed
lexical tests  -->
		<!--    to match this lexical form then it must pass all
tests -->
			<numeric digitGroupSymbol="," digitGroupEvery="0"

<datatype name="mydate" basetype="date">
		<!-- this would allow the 12/25/1999 format described in the
			(though wouldn't fail on a 15th month or a 35th day)
		<!--  I made this an attribute so that the DTD could
validate it as an enumeration  -->
		<dateLexical Form="YY-MM-DD" Separators=" /-" />
Received on Friday, 25 June 1999 12:39:01 GMT
