Re: [xsl] current-group() contains a particular element

Subject: Re: [xsl] current-group() contains a particular element
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Aug 2022 18:00:23 -0000
On Wed, Aug 03, 2022 at 05:54:31PM -0000, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx scripsit:
> Taking the opportunity to ask a dumb question (which seems to define my participation on this list!), what's the difference between these?
> 
>   current-group()/self::my-element

for every member of the deduplicated, document-order sequence returned
by the current-group built-in function, return it if it's accessible
from the context item on the self axis and passes the node test of being
an instance of the element my-element.

>   current-group()[self::my-element]

for every member of the sequence returned by the current-group built-in
function, test if that member of the sequence is acessible from the
context item along the self axis and passes the node test of being an
instance of the element my-element.

No path operator means current-group() doesn't get deduplicated and put in
document order in the second version.  Inside for-each-group, you may
not care about that part.

-- 
Graydon Saunders  | graydonish@xxxxxxxxx
^fs oferiode, pisses swa mfg.
-- Deor  ("That passed, so may this.")

Current Thread