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

Re: Processiing arrays in XSLT 4

From: Reece Dunn <msclrhd@googlemail.com>
Date: Tue, 12 Jan 2021 18:15:18 +0000
Message-ID: <CAGdtn25skson8=nTpCWuQ+HCc6wSgK2A6fcJj=OmDAiv9yJPUQ@mail.gmail.com>
To: "Liam R. E. Quin" <liam@fromoldbooks.org>
Cc: Michael Kay <mike@saxonica.com>, Martin Honnen <martin.honnen@gmx.de>, public-xslt-40@w3.org
On Tue, 12 Jan 2021 at 17:47, Liam R. E. Quin <liam@fromoldbooks.org> wrote:

> On Tue, 2021-01-12 at 13:03 +0000, Michael Kay wrote:
> >
> > I think we can also allow <xsl:for-each map="$map">
>
> I wonder if this could be taken into XPath so that a modified
>   for $e in $map
> could also work over map keys and array members?
>
> E.g. for $e in map $e
> (that looks like it'll cause ambiguities but $e can't start wit a { so
> maybe it's OK)
>

There is an issue for this in https://github.com/qt4cg/qtspecs/issues/31
about extending the new `for member ...` syntax to maps:

    for member $entry in $map
    return element { $entry?key } { $entry?value }


Kind regards,
Reece


> 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 Tuesday, 12 January 2021 18:15:42 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 12 January 2021 18:15:42 UTC