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

Re: Grouping in the FAQ (was Re: Conflicting Node Values)

Subject: Re: Grouping in the FAQ (was Re: Conflicting Node Values)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 26 May 2000 12:24:08 +0100 (BST)
Re: Grouping in the FAQ (was Re: Conflicting Node Values)
I wrote

> Don't you want
> 
> count(.|key('tid',.)[1])=1
> 
> which is equivalent to the generate-id tests.

Of course, it's only equivalent in the case that you know that the
key returns something, otherwise if the key returns the empty set then
the above will always be true as .|key('tid',.)[1] will be .

In general the test 

"is the current node the first node in the node set x"

is either

"generate-id(.) = generate-id($x[1])"  (the [1] is optional here)

or

"count(.|$x[1])=count($x[1])"

or

"$x and count(.|$x[1])= 1"

David


 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.