xsl-list
[Top] [All Lists]

Re: [xsl] deep copy without attributes

2013-05-20 09:22:41
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
attribute:

<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
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--