RE: [xsl] possible to use copy-of without namespace

Subject: RE: [xsl] possible to use copy-of without namespace
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 8 Jan 2003 11:13:18 -0000
> i try to get a 1:1 copy of a tree (using xsl:copy-of) without 
> having the 
> xmlns attribute set in the root node of the result tree.
> 

xsl:copy-of can only be used if you want an exact copy.

If you want to make any changes at all, use a recursive descent using
xsl:apply-templates, defining an identity template rule using xsl:copy,
plus specific template rules to define the changes you want to make.

To remove namespace nodes from an element, use

<xsl:element name="local-name()">

in place of <xsl:copy>

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread