xsl-list
[Top] [All Lists]

Re: [xsl] Removing a single namespace

2011-12-12 04:02:23
On 11 December 2011 23:39, Lynn Murdock <lmurdock(_at_)plos(_dot_)org> 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
http://andrewjwelch.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>