W3C home > Mailing lists > Public > public-xslt-40@w3.org > January 2021

Re: Processiing arrays in XSLT 4

From: Martin Honnen <martin.honnen@gmx.de>
Date: Tue, 12 Jan 2021 12:27:39 +0100
To: public-xslt-40@w3.org
Message-ID: <8edd3165-4c0b-b2b3-8fc0-c45433344e0f@gmx.de>

On 12.01.2021 11:25, Michael Kay wrote:
> Mindful of DImitre's exhortation to avoid growing the language any more than is necessary, I propose the following:
>
> * xsl:for-each, xsl:iterate, and xsl:for-each-group acquire an attribute array=expression which can be used instead of select=expression
>
> * specifying array="EXPR" is equivalent to specifying select="array:for-each(EXPR, function($x){map{'value': $x})"/>
>
> The effect is that you iterate over the members of the array, and that you can refer to the current member of the array as .?value. The position of the member within the array is available as position().
>
>

Does that work with for-each-group where inside of the instruction
position() is supposed to give you the position of the current group and
not the position of the item in the grouping population?

Or how does grouping work if the population is a (single?) array created
by array:for-each?
Received on Tuesday, 12 January 2021 11:27:56 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 12 January 2021 11:27:56 UTC