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 Mark H <ma...@markhorgan.com> on 2003/01/30 00:34:47 UTC
Does namespace-alias work in Xalan?
Hi there,
I can't seem to get the <xsl:namespace-alias> tag to work with Xalan-J
(2.4.1), it seems to work in Microsoft's XML parser. Is this a known
limitation or am I doing something wrong.
Thx in advance,
Mark
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xslout="x">
<xsl:namespace-alias stylesheet-prefix="xslout" result-prefix="xsl"/>
<xsl:template match="document">
<xslout:element>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xslout:element>
</xsl:template>
<xsl:template match="*">
<xslout:element>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xslout:element>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
Re: Does namespace-alias work in Xalan?
Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.
Hi Mark,
It should work. Can you provide a small input document with expected
output and the output you get? Since you're not generating a stylesheet
element, the resulting stylesheet won't be legal. Also, any xsl:element
instruction would be missing its name attribute, so that's going to be a
problem as well.
By the way, relative namespace URIs, like "x" are deprecated and should not
be used.
Dave
"Mark H"
<mailinglists@mark To: <xa...@xml.apache.org>
horgan.com> cc: (bcc: David N Bertoni/Cambridge/IBM)
Subject: Does namespace-alias work in Xalan?
01/29/2003 03:34
PM
Hi there,
I can't seem to get the <xsl:namespace-alias> tag to work with Xalan-J
(2.4.1), it seems to work in Microsoft's XML parser. Is this a known
limitation or am I doing something wrong.
Thx in advance,
Mark
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xslout="x">
<xsl:namespace-alias stylesheet-prefix="xslout"
result-prefix="xsl"/>
<xsl:template match="document">
<xslout:element>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xslout:element>
</xsl:template>
<xsl:template match="*">
<xslout:element>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xslout:element>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>