[xsl] Removing namespace attributes

Subject: [xsl] Removing namespace attributes
From: "Hank Ratzesberger" <hankr@xxxxxxxxxxxxxxxx>
Date: Wed, 21 Sep 2005 17:31:12 -0700
I want to strip all namespaces and one attribute (declared in the namespace).

In my stylesheet, I declare the namespaces
and then list them in the exclude-result-prefixes.
But it doesn't work.  The namespaces remain.

Thank you for your ideas,
Hank

Hank Ratzesberger
NEES Programmer
Institute for Crustal Studies
University of California, Santa Barbara


<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:flextps="http://flextps.org/schema/"; xmlns:xlink="http://www.w3.org/1999/xlink"; exclude-result-prefixes="flextps"> <xsl:template match="@* | node()"> <xsl:if test="name()!='xlink:href'"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:if> </xsl:template> </xsl:stylesheet>

Current Thread