Re: [xsl] proposed on-no-match="shallow-copy-all"

Subject: Re: [xsl] proposed on-no-match="shallow-copy-all"
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Aug 2022 20:47:40 -0000
On 04.08.2022 22:38, Michael Kay mike@xxxxxxxxxxxx wrote:
Yes, need you to flesh out

on-no-match="shallow-copy-all"

of

https://balisage.net/Proceedings/vol27/html/Kay01/BalisageVol27-Kay01.html#d1
0153e637
instead, the paper says

For arrays, it does

<xsl:apply-templates select="array:parcels(.)" mode="#current"/>

that is, it wraps each of the array members into a parcel and processes
each one separately.

For maps, it does:

<xsl:apply-templates select="map:entries()" mode="#current"/>


It actually does something akin to

<xsl:array>
   <xsl:apply-templates select="array:parcels(.)" mode="#current"/>
</xsl:array>

That one I can I understand and use with what is in Saxon 11 EE, I think, if

B <xsl:array composite="yes">

is used.

or

<xsl:map>
   <xsl:apply-templates select="map:entries()" mode="#current"/>
</xsl:map>


For that I wonder how it avoid infinite recursion turning any map into
xsl:map processing the map contents as map entries turning them into
xsl:map processing the map contents as map entries turning them into
xsl:map...

Are there additional templates breaking the recursion?


These constructs take the solutions to my XML Prague 2016 use cases from
100-200 lines of XSLT 3.0 code down to 10-20 lines.

Yes, that seems amazing. Is that paper also implemented in e.g. a Saxon
12 branch?

Current Thread