OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



> -----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