W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 1999

XML Schema Datatype Questions

From: Daniel Potter <dpotter@mitre.org>
Date: Thu, 30 Dec 1999 11:12:39 -0500
Message-ID: <386B8477.B04521D9@mitre.org>
To: xml-dev@ic.ac.uk, www-xml-schema-comments@w3c.org
I am currently developing a type checker designed to validate data in an
instance document corresponding to an XML schema.  I have a few
questions about the datatype spec I am hoping someone can answer.

First question, what is Not A Number in respect to the float/double
datatypes?  Or, rather, what is it in relationship to a min/max range? 
If I specify that mininclusive=0 and maxinclusive=INF, then is NAN in
that range?  What about mininclusive=-3 and maxexclusive=4?  Or does NAN
need to be specified in the enumeration?  (On that note, can the
enumeration facet be used to allow values outside the range specified by
min/max to be included?  Or do enumeration values need to fall within
the range?  There is no constraint saying that enumeration and min/max
values cannot be set together, which leads me to believe that they are
combined to describe legal values.)

In other words, if I specify a range of values, does NAN ever fall in
that range?  Or does it need to be specified as a legal value through
the enumeration facet?

Also relating to float, are the characters case sensitive?  Can I use
"inf" as a value or does it need to be "INF"?  Is "6.22e22" legal?  Or
does it need to be "6.22E22"?

One last question:  For the binary datatype, what is the default
encoding?  According to the encoding facet, it must be either hex or
base64, but what happens if the user doesn't specify?  If I specify that
an element is of type binary, but leave out the encoding facet, what
encoding is then used?  As far as I can tell, there is no default value
for encoding.  I would assume hex is default because it is listed first,
but it would be nice to know for certain which encoding is truely
intended as default.

Thanks for any help.
Received on Thursday, 30 December 1999 11:10:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:45 UTC