XML Schema Datatype Questions
Daniel Potter
dpotter at mitre.org
Thu Dec 30 16:10:54 GMT 1999
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.
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list