This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Removing namespaces from source document (long)
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 9 Apr 2002 10:46:44 +0100
- Subject: Re: [xsl] Removing namespaces from source document (long)
- Organization: Jeni Tennison Consulting Ltd
- References: <006301c1dfa8$e751c4c0$6501a8c0@pcukmka>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Mike said:
> The basic answer is that <xsl:copy> and <xsl:copy-of> will always
> copy the namespace nodes from the source element to the result
> element. If you don't want them copied, you have to use
>
> <xsl:element name="name()">
Or:
<xsl:element name="{name()}" namespace-uri="{namespace-uri()}">
...
</xsl:element>
if you want to maintain the namespace of the element... and also to
get it to work (you need {}s so that name() is evaluated rather than
the processor trying to use it as the name of the element and
barfing).
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list