xsl-list
[Top] [All Lists]

RE: [xsl] insert to copied node

2009-03-19 19:14:50
I think you're in overdrive. Pause to think before your next question.

xsl:copy-of can only be used when you want to make an exact copy. To make a
modified copy, the usual coding pattern is to do a recursive descent of the
tree, using the identity template as the default template, supplemented with
extra template rules for elements (your <test> element) that you want to
modify.

That's such a common coding pattern that most processors should handle it
efficiently.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Michalmas [mailto:michalmas(_at_)gmail(_dot_)com] 
Sent: 19 March 2009 23:07
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] insert to copied node

Hi guys,

I have some XML node, that i want to copy:
<xsl:copy-of select="." />

Insert that element there is <test> node. Besides the copy, i 
want to insert extra node to <test> node.

How can i do it efficiently (not by copying every node separately)?

Thanks!

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



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

<Prev in Thread] Current Thread [Next in Thread>