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

Re: Removing a single namespace

Subject: Re: Removing a single namespace
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Mon, 12 Dec 2011 10:02:10 +0000
Re:  Removing a single namespace
On 11 December 2011 23:39, Lynn Murdock <lmurdock@xxxxxxxx> wrote:
> Hi-
> I have an XML-to-XML transform (not the same that I recently asked about) in
which I am essentially copying everything except for a few elements that need
to be modified. However, in copying, somehow an xsi: namespace is being added
to the output, which I would like to suppress, as I don't use it.

> <xsl:template match="@*|node()">
>    <xsl:copy>
>      <xsl:apply-templates select="@*|node()"/>
>    </xsl:copy>
>  </xsl:template>

xsl:copy and xsl:copy-of both have the attribute copy-namespaces,
which you need to set to 'no', eg

<xsl:copy copy-namespaces="no"/>

Andrew Welch

Current Thread


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.
First Name
Last Name
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.