[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: deep copy without attributes

Subject: Re: deep copy without attributes
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 20 May 2013 15:22:35 +0100
Re:  deep copy without attributes
> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.