[
Lists Home |
Date Index |
Thread Index
]
Amelia A. Lewis scripsit:
> I think one of the worst problems with W3C XML Schema's types is that
> they do not represent a system.
Agreed. Let's see if we can construct something better, especially
since there is an open DSDL slot for such a thing.
> First principle: the XML ur-type is "string". Everything in XML can be
> represented as a string (MUST be representable as a string). It can
> therefore be manipulated as a string--truncated, concatenated,
> case-transformed, etc.
No, I have to disagree here. Every datatype instance can be *represented*
by a string, right enough. That does not mean the instance of that type
*is* a string. I can be represented by a string too: "John Cowan".
That doesn't make me a string.
After all, every date and duration can be represented as a number.
For that matter, every string can be represented as a number by some
trick such as making each character a digit in base 2^20+2^16 notation.
That doesn't make you say that dates are numbers or that strings are
numbers. Nor are strings or numbers octet-sequences, either, although
of course they have several well-known representations as such.
Representation is a red herring.
> boolean
> binary [octet-stream]
> number
> date
> duration
If you add string to this list as an equal, I think it's pretty winning.
> Hmm. We're missing one. Ah, that's it: QName. Question: does XML need
> a pointer type? Which would, of course, be represented as a string. If
> so, it might include, for instance, QName, XPath expressions, and URIs.
> Let's say that there's an abstract pointer, maybe.
The difficulty is that QNames are really different from URIs, because
their interpretation is extremely context-sensitive, and you can't tell
just by looking at the representation of one whether it actually refers
to anything or not.
QName is an irritating datatype, but if we have to have it, it needs
to be a seventh equal partner. IRIs, OTOH, really are a subtype of
strings: their definition is purely syntactic.
--
A rabbi whose congregation doesn't want John Cowan
to drive him out of town isn't a rabbi, http://www.ccil.org/~cowan
and a rabbi who lets them do it jcowan@reutershealth.com
isn't a man. --Jewish saying http://www.reutershealth.com
|