Re: Processiing arrays in XSLT 4

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