[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Some random noise on rational type systems for XML


noise and rational
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@r...
isn't a man.    --Jewish saying                 http://www.reutershealth.com

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.