[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Making all attributes empty and retaining the attributes names
Subject: Re: [xsl] Making all attributes empty and retaining the attributes names
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 30 May 2008 15:02:41 +0200
|
Pankaj Chaturvedi wrote:
I've also tried it prior. But doesn't seems to be working.
<xsl:template match="@*">
<xsl:attribute name="{name()}"/>
</xsl:template>
I think that template is fine for doing what you want (copying
attributes with their names but with empty values), now you also need to
make sure you process attribute nodes e.g.
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
--
Martin Honnen
http://JavaScript.FAQTs.com/
|