W3C home > Mailing lists > Public > www-rdf-interest@w3.org > December 2001

Re: Cutting the Patrician datatype knot

From: Thomas B. Passin <tpassin@home.com>
Date: Tue, 4 Dec 2001 01:38:32 -0500
Message-ID: <003f01c17c8e$4b3b43e0$7cac1218@cj64132b>
To: <www-rdf-interest@w3.org>
[Pat Hayes]

>
> Yes, Ive come to see that. I simply did not conceive that anything
> could be this badly defined. This aspect of XML datatypes really is a
> crock. It *defines* the domain and range of the datatyping functions
> so that they cannot possibly be the real domains and ranges. What a
> bloody silly thing to do, I'm amazed that Thompson put his name on it.
>

Strangely enough, someone I work with has come up with a perceived need for
exactly this kind of datatype, for use with XML Schema.  The work involves
translating another format into XML, and the datavalues are integers but
they also have mnemonic values.  It is desired to use the mnemonic
(readable) values for XML, but someone wants to be able to use the original
code values if someone wants to do that.  These values come from someone
else's data dictionary and probably can't be changed

Ideally one would like to enforce pairing of the code value and the
mnemonic, so that if you have both they agree (e.g., 1=='west'), but you
can't enforce that with XML Schema.  The fallback position is to allow
either a numeric code value, a string mnemonic, or both, but without
enforcing their correlation (I suggested Schematron but that hasn't been
accepted so far).  The most convenient way seemed to be a union type.  The
correlation is documented an an xsd:annotation element.

I don't know if this approach will survive, but for the time being, there is
this union datatype...

Cheers,

Tom P
Received on Tuesday, 4 December 2001 01:38:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:52 GMT