|
Subject: Re: [xsl] how to remove namespace declarations From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Tue, 28 Aug 2007 14:29:05 +0200 |
i have to remove namespace declarations in certain elements. i.e. i have this one:
<Facts xmlns:html="http://www.w3.org/HTML/1998/html4" xmlns:xlink="http://www.w3.org/1999/xlink">
<lotOfElements/>
</Facts>
and i want to get this one:
<Facts> <lotOfElements/> </Facts>
i can't manage to get there. even when i try to remove all attributesfrom the element
<xsl:template match="Facts"> <xsl:copy> <xsl:apply-templates select="*"/> </xsl:copy> </xsl:template>
does not remove these unnecessary namespaces.
Or, if you are using XSLT 2.0, I think you can do e.g.
<xsl:template match="Facts">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>Martin Honnen http://JavaScript.FAQTs.com/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] how to remove namespace decla, Frank Marent | Thread | Re: [xsl] how to remove namespace d, Florent Georges |
| Re: [xsl] Apply Templates, when to , Florent Georges | Date | Re: [xsl] Apply Templates, when to , David Carlisle |
| Month |