Hi
I noticed that the namespace attribute of
xsl:element gets ignored as long as there
isn't at least one additional
namespace-declaration and a
xsl:namespace-alias in use.
The following code doesn't produce the
desired result:
{xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"}
{xsl:template match="/"}
{xsl:element name="xsl:stylesheet"
namespace="http://www.w3.org/1999/XSL/Transform"}
{xsl:attribute name="version"}1.0{/xsl:attribute}
{/xsl:element}
{/xsl:template}
{/xsl:stylesheet}
Only adding an additional namespace-declaration
AND the use of xsl:namespace-alias outputs
the correct result:
{xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:gen="http://www.ipt.ch/xslt/generator"}
{xsl:namespace-alias stylesheet-prefix="gen" result-prefix="xsl"/}
{xsl:template match="/"}
{xsl:element name="xsl:stylesheet"
namespace="http://www.w3.org/1999/XSL/Transform"}
{xsl:attribute name="version"}1.0{/xsl:attribute}
{/xsl:element}
{/xsl:template}
{/xsl:stylesheet}
I know, that I could use {gen:stylesheet...
and let xsl:namespace-alias do the rest for me.
Nevertheless {xsl:element name="xsl:stylesheet" namespace="...
should do it also.
Respectfully,
Rudolf