- From: Mukul Gandhi <gandhi.mukul@gmail.com>
- Date: Mon, 11 Jan 2021 12:29:39 +0530
- To: Michael Kay <mike@saxonica.com>
- Cc: public-xslt-40@w3.org
Received on Monday, 11 January 2021 07:00:08 UTC
On Sat, Jan 9, 2021 at 10:08 PM Michael Kay <mike@saxonica.com> 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? > > Recall that a member of an array can be any sequence, not just a single > item. > I think that, we could even utilize following XSLT idiom for this, <xsl:for-each select="array"> <xsl:choose> <xsl:when test="count(.) gt 1"> <!-- multi item array member. do something --> </xsl:when> <xsl:otherwise> <!-- do something --> </xsl:otherwise> </xsl:choose> </xsl:for-each> -- Regards, Mukul Gandhi
Received on Monday, 11 January 2021 07:00:08 UTC