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

RE: casting sequences

Subject: RE: casting sequences
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 15 Jan 2009 15:54:22 -0000
RE:  casting sequences
>   Yes, for that kind of expressions, I always miss the 
> ability to use the step operator on atomic values:
> 
>     tokenize(...)/xs:dayTimeDuration(.)
> 
>   Were there any clear reason the attempt floundered?
> 

Not a clear reason, no: rather, in classic committee style, a sequence of
decisions.

Early on, various proposals were made using a new operator. Suggestions
included "\", "->", "!". Some people didn't like the choice of operator,
some people didn't see the need for the facility, and between them they
defeated the proposals.

"/" was also proposed, but (a) it was hard to reconcile the semantics with
the existing "/" (as regards duplicate elimination and document order), and
(b) people didn't like the fact that you would be able to write "40/5" and
the result would be 5. Also (c), at that stage in the game there were still
people arguing against the document-order semantics of "/", and those of us
who wanted a simple mapping operator didn't want to lose the fragile
consensus over the behaviour of "/"...

At a much later stage, when XQuery vendors were starting to get feedback
from real users, and when the meaning of "/" applied to nodes was no longer
up for debate, IBM proposed allowing "/" as a simple mapping operator
provided (1) that the lhs was a sequence of nodes, and (2) that the rhs was
homogenous - either all nodes, or all atomic values. Despite being less
orthogonal than an operator that allowed any sequence on either side, this
won support because it dealt with most of the previous objections, because
the timing was right, and because Don Chamberlin has the rare skill of
presenting controversial proposals in such a way that the decision seems
inevitable.

That's the way committees work...

Michael Kay
http://www.saxonica.com/

Current Thread

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
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.