Re: [xsl] for vs. for-each

Subject: Re: [xsl] for vs. for-each
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 14 Mar 2021 20:08:24 -0000
Hi,

Another way to gloss this is that while "$values[.]" doesn't have the
intended effect,

<xsl:for-each select="1 to count($values)">
    <xsl:variable name="p" select="."/>
    <xsl:sequence select="$values[$p]"/>
</xsl:for-each>

Oughta work just fine.

I make this error all the time.

Cheers, Wendell

On Sun, Mar 14, 2021 at 3:03 PM Michael MC<ller-Hillebrand mmh@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>
> > I hope this helps.
>
> All of your comments, dear colleagues, helped me remember things and
> hopefully sharpen my mind.
>
> Thanks,
>
> - Michael
>
> PS: Interestingly, the first time I am happily using fold-left() I
> stumbled across something quite basic.
>
> PPS: Good luck to the discussions about "accessing items in a sequence by
> position"!
>
>
>

--
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

Current Thread