Hi! I am having difficulties running this meta-stylesheet:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias";
 xmlns:exsl="http://exslt.org/common";
 extension-element-prefixes="exsl">
    <xsl:output method="xml" omit-xml-declaration="yes" />
    <xsl:strip-space elements="*"/>
    <xsl:namespace-alias stylesheet-prefix="axsl" result-prefix="xsl"/>

    <xsl:template match="/">
        <xsl:call-template name="disappearance-act" />
    </xsl:template>

    <xsl:template name="disappearance-act">
        <axsl:stylesheet
        xmlns:exsl="http://exslt.org/common";
           extension-element-prefixes="exsl" >
            <xsl:attribute name="version">1.0</xsl:attribute>
        </axsl:stylesheet>
    </xsl:template>
</xsl:stylesheet>

It outputs this:

<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform";
version="1.0" extension-element-prefixes="exsl"/>

As you can see the exsl namespace in the generated stylesheet is simply
gobbled up. The problem is easily solved by removing that namespace from
the root stylesheet (or to put it in another way, move all EXSLT stuff to
an external stylesheet and then include it). But I would like to know what
causes the namespace to disappear. Afterall one should be able to use EXSLT
in both the meta-stylesheet and in the generated stylesheet without having
to use two separate stylesheets, right?

Using xalan-j_2_7_1 (xalan.jar) with java 1.6. Saxon 6.5.5 also suffers
from this problem so it might be a XSLT 1.0 limitation I'm not aware of.
Searching this mailing list did not help me find an answer. Also this is my
first time using _any_ mailing list, so please be gentle if I'm doing it
wrong.

Thanks, Jernej

Reply via email to