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

Re: [xsl] Things that make you go Hmmmm!


Subject: Re: [xsl] Things that make you go Hmmmm!
From: Michael Sokolov <msokolov@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Mar 2014 10:29:18 -0400

On 3/29/2014 10:05 AM, Abel Braaksma (Exselt) wrote:
xsl:copy-of allows deep-copying of a selected node (I would agree with
Liam here, if this was named xsl:deep-copy, it would have been easier to
memorize, but this name is here since XSLT 1.0, so there is little we
can do about that now). A deep-copy means an immediate copy of the
I take this - that this is all old and decided and not going to change now - as your most significant point (but thanks for the full explanation!)

However, in hindsight, I suppose one might argue that an empty <xsl:copy> ought to function identically to <xsl:copy-of> (perform a deep copy). Then you could do (almost) everything they both do now with a single instruction. That would simplify things neatly. It would make it harder to create an empty node with the same name as the current node - but there are other ways to do that, and it's not a common need I think.

-Mike


Current Thread
Keywords