[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] deep copy without attributes

Subject: Re: [xsl] deep copy without attributes
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 20 May 2013 15:22:35 +0100

> idea being to deep copy leaving the attribute nodes behind although
> that syntax will not do that.

You can't both deep-copy and modify the thing that you are copying.
Instead you have to shallow copy a node at a time, and not copy the
attribute nodes, eg use an identity template with a no-op for

<xsl:template match="@*"/>

In XSLT 3.0, there's no longer the need for the identity template,
instead you can set that behaviour using xsl:mode.

Andrew Welch

Current Thread