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

Re: Re: Re: Re: Re: order of UNIONs

Subject: Re: Re: Re: Re: Re: order of UNIONs
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 16 Nov 2001 13:17:33 +0000
xpath reorder nodes
Hi David,

>>  <xsl:variable name="nodeSet"
>>                 select="$nodeSequence | $nodeSequence" />
>
> It's not just union ( | ) that has different semantics for lists.

As far as I can see in the public F&O WD, the only change to the
semantics of 'union' for XPath 2.0 is that it returns a node sequence
in document order rather than a node set with no order. I don't think
that its the 'ordering' of sequences that are the potential/perceived
problem, but rather the duplication of nodes within the sequence. So
in practical terms I don't think that the use of union in XPath 1.0
and XPath 2.0 is all that different, is it? The only slight
peculiarity is that you could easily get a union that contained fewer
nodes than either of the two sequences you were unioning.

> what would you guess
> select="count(*/..)"
> should be, given any semantics that you want to guess for sequences and
> for / (and for count() )
>
> In XPath 1.0, 'cause sets are sets, you get the answer 1.

I think that you're implying that somewhere along the design path,
someone might have suggested that the semantics of / should be such
that */.. returned a node sequence containing N of the current node,
where N is the number of element children of the current node.

But my guess is that any location path that's valid in XPath 1.0 will
always return a node sequence that doesn't contain duplicates, in
document order (and this guess was confirmed by Mike yesterday). Thus
*/.. will return a node sequence containing a single node, so you get
the answer 1, as you did in XPath 1.0.

I feel like I'm missing something.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.