| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Basic help on copying elements using XSL|
In my XSL, I'm trying to copy a complex element, **then** apply a template to it. Currently the templates are only being applied to the children of the copied element.
Thanks for your help... I appreciate this is basic stuff.
This is what I'm trying, which is clearly wrong.
Welcome to WebmasterWorld!
<xsl:copy> is a "shallow" copy, and (according to the manual) only copies the current node. <xsl:copy-of> is a "deep" copy, which does a recursive copy of all the node's children.
Have you tried matching the parent of "activity" instead?
I can use <xsl:copy-of select="activity" /> in the matched parent, and this copies the nodes from the XML. How do I then apply the <xsl:template match="activity"> to this copied output?
I seem to be able to use <xsl:apply-templates /> only when using <xsl:copy>, not copy-of.
I'm so confused!
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved