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

Re: Processiing arrays in XSLT 4

From: Liam R. E. Quin <liam@fromoldbooks.org>
Date: Sat, 09 Jan 2021 16:15:19 -0500
Message-ID: <3279d975a3ea4fac57f4eefbd0833251c37da592.camel@fromoldbooks.org>
To: Michael Kay <mike@saxonica.com>, public-xslt-40@w3.org
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

This archive was generated by hypermail 2.4.0 : Saturday, 9 January 2021 21:15:55 UTC