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

RE: Re: Re: order of UNIONs

Subject: RE: Re: Re: order of UNIONs
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 15 Nov 2001 15:38:44 -0000
RE:  Re: Re: order of UNIONs
>
> From what I can see in the XQuery/XPath WDs, it doesn't look as though
> there will be a concept of 'sets' in XPath 2.0. My guess is that a
> location path will return a sequence in document order.

That's correct. There won't be any sets; there will just be some functions
and operators that treat sequences as if they were sets. This is on the
principle that the set of "sequences of distinct nodes in document order"
has a one-to-one correspondence with the set of "sets of nodes", therefore
the concept of a node-set can be modelled as a sequence of distinct nodes in
document order. You potentially lose some type-checking and polymorphism (as
Dimitre pointed out), but it's actually a useful simplification to have only
one kind of collection.

> I haven't noticed anything where, when manipulating node sequences in
> the same way as you currently construct node sets, things work
> differently from the way they would if you were actually working with
> node sets.

Correct. This should be 100% compatible. I'll talk to you off-the-record
some time about the debates that produced that outcome...
>
> As written, xf:identity-distinct() converts a node sequence containing
> duplicates to one that doesn't, but to get something that works in the
> same way as a node set, you'd have to union the sequence with itself
> (as above) or use xf:sort() (though I don't think that should be a
> function in any case).
>
> The other relevant function is xf:unordered(), which acts as a 'hint'
> to the processor that the sequence can be treated as unordered. I
> don't really understand when you'd use that, though, I must admit.

You can expect changes in these functions in the next working draft. (The
published data model itself is now very stable, with the possible exception
of modelling and naming of complex types.)

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.