xsl-list
[Top] [All Lists]

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

2014-03-29 09:29:32
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

--~------------------------------------------------------------------
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>
--~--