Subject: Re: [xsl] deep copy without attributes From: Andrew Welch <andrew.j.welch@xxxxxxxxx> Date: Tue, 21 May 2013 15:52:11 +0100 |
On 21 May 2013 15:34, David Carlisle <davidc@xxxxxxxxx> wrote: > On 21/05/2013 12:43, Ihe Onwuka wrote: >> >> I think it's cumbersome. > > > Given that it's XML how much less cumbersome can you make a single template > that contains two elements? > > > <xsl:template match="node()"> > <xsl:copy> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> That is a work of art... with the 3.0 alternative being: <xsl:mode on-no-match="shallow-copy"/> <xsl:template match="@*"/> ...which probably means the identity template will go the way of the dodo (eaten to extinction by the Dutch apparently) -- Andrew Welch http://andrewjwelch.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] deep copy without attribu, David Carlisle | Thread | Re: [xsl] deep copy without attribu, John Lumley |
Re: [xsl] deep copy without attribu, David Carlisle | Date | Re: [xsl] deep copy without attribu, John Lumley |
Month |