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

Subject: Re: [xsl] current-group() contains a particular element
From: "C. M. Sperberg-McQueen cmsmcq@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Aug 2022 00:05:08 -0000
Thanks to Mike Kay for showing me that my answer was wrong.

"C. M. Sperberg-McQueen cmsmcq@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes:

> "Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> writes:
>
>> 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
>
> Denotes the set of elements in the current group named 'my-element'.

Er, I mean: denotes the set of elements in the current group named
'my-element', in document order. If there are none, then the empty
sequence.

>>   current-group()[self::my-element]
>
> Denotes the current group, if any members of the current group are
> elements named 'my-element', and otherwise the empty sequence.

Er, I should have said: denotes the subsequence of the current group
consisting of elements named 'my-element'.  Not guaranteed
duplicate-free, not guaranteed in document order.

> If you don't see how they mean those things, the more careful and
> detailed answer from Graydon Saunders should help.

Well, at least there is one sentence in my earlier answer I think I
don't need to retract.  

-- 
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
http://blackmesatech.com

Current Thread