Re: Processiing arrays in XSLT 4

On Sat, 2021-01-09 at 16:38 +0000, Michael Kay wrote:
> It seems a no-brainer to provide an XSLT instruction along the lines
> 
> <xsl:for-each-member select="array">
>   ....
> </xsl:for-each>
> 
> to process the members of a supplied array.
> 
> The question is: within the body of this instruction, how should one
> refer to the current member of the array?

How about,
<xsl:at-each-member at="pos" select="array" as="xs:integer*">
  <!--* now $pos is avaiable as type xs:integer* *-->
and do the same for for-each
?

Liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Received on Saturday, 9 January 2021 21:15:55 UTC