This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]