Re: Processiing arrays in XSLT 4

On Tue, Jan 12, 2021 at 2:26 AM Michael Kay <mike@saxonica.com> 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().
>
>
> Michael Kay
>
>
+1, Dr. Kay!

As for the "exhortation" above, thanks, I learned a new word. Hope it was
used meaning "encouragement" and not "sermon" :)

Thanks,
Dimitre

Received on Tuesday, 12 January 2021 15:19:48 UTC