You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Andreas Hartmann <an...@apache.org> on 2003/09/25 15:29:32 UTC
Problem adding namespaces
Hi Xalan users,
I have a problem adding namespaces to elements with Xalan 2.5.1.
When I use the following stylesheet, text nodes are not
copied to the result tree:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="*">
<xsl:element name="{local-name()}"
namespace="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
If I omit the namespace="http://www.w3.org/1999/xhtml"
attribute, the document is copied correctly.
Am I doing something wrong, or might this be a bug?
Thanks in advance!
Andreas