W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2001

RE: XML Schema min/max/Inclusice/Exclusive facet question

From: Biron,Paul V <Paul.V.Biron@KP.ORG>
Date: Tue, 10 Apr 2001 14:23:35 -0700
Message-Id: <376E771642C1D2118DC300805FEAAF43014BACEA@pars-exch-1.ca.kp.org>
To: "'Kohsuke KAWAGUCHI'" <kohsuke.kawaguchi@eng.sun.com>, KAZUMI Saito <ksaito@jp.fujitsu.com>
Cc: xml-dev@lists.xml.org, xmlschema-dev@w3.org
> -----Original Message-----
> From:	Kohsuke KAWAGUCHI [SMTP:kohsuke.kawaguchi@eng.sun.com]
> Sent:	Tuesday, April 10, 2001 11:18 AM
> To:	KAZUMI Saito
> Cc:	xml-dev@lists.xml.org; xmlschema-dev@w3.org
> Subject:	Re: XML Schema min/max/Inclusice/Exclusive facet question
> 
> > 1. When the {primitive type definition} is float or double built-in
> type,
> >    can I specify NaN, INF or -INF as value of
> min/max/Inclusice/Exclusive facet?
> >    Is this constrainted in the specification ?
> 
> As far as I know, yes, you can. Simply because NaN and INF and such things
> are lawful member of value space. There is no reason to prohibit them, and
> in
> fact there is no explicit statement that prohibits the use of them.
> 
Yes it is legal.  As for how the "special values" figure into the order
relation on float and double, the spec says [1]:

	Positive zero is greater than negative zero. Not-a-number
	equals itself and is greater than all float values including
	positive infinity.

Naturally, negative infinity is less than all other values, even tho that is
not explicitly stated.

> > 2. About "Constraint on Schemas: maxInclusive and maxExclusive", is it
> error that
> >    deriving by adding the maxInclusive facet, when the maxExclusive is
> among the
> >    members of {facets} of {base type definition} ?
> 
> See section 4.3.7 "CoS: maxInclusive valid restriction". It is an error
> only
> if the specified value is greater than or equal to the value of
> maxExclusive.
> 
We have clarified "Cos: maxInclusive and maxExclusive" to note that the
constraint only applies within a single derivation step.  That is, the
following is illegal:

	<simpleType name='myType1'>
		<restriction base='integer'>
			<maxExclusive value='11'/>
			<maxInclusive value='10'/>
		</restriction>
	</simpleType>

while the follow is perfectly legal:

	<simpleType name='myType2'>
		<restriction>
			<simpleType>
				<restriction base='integer'>
					<maxExclusive value='11'/>
				</restriction>
			</simpleType>
			<maxInclusive value='10'/>
		</restriction>
	</simpleType>

> > 3. The minExclusive facet "Constraint on Schemas: minExclusive valid
> restriction"
> >    says "minExclusive is among the members of {facets} of {base type
> definition}
> >    and {value} is greater than the {value} of the parent minExclusive"
> is error.
> >    "greater than" is correct?
> 
> I guess it's typo. It would be better to post this to
> www-xml-schema-comments@w3.org to let WG know this typo.
> 
Yes, that was a typo in the PR draft and has been corrected.  The first
clause of that CoS should read:

	1. minExclusive is among the members of {facets} of
	    {base type definition} and {value} is less than the {value}
	    of the parent minExclusive 

pvb
Received on Tuesday, 10 April 2001 17:59:56 GMT

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