[xslt] xsl:exclude-result-prefixes problem



Hi,

please cc me, i am not on the list.
i have the following problem with libxslt 1.0.17:
xsltproc respects the exclude-result-prefixes="style" for a created 
xsl:element "style", but not for an element "style:properties".

this is the testcase stylesheet test.xslt:

<?xml version="1.0"?>
<xsl:stylesheet
    xsl:exclude-result-prefixes="style"
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:style="http://openoffice.org/2000/style";>

    <xsl:template match="/">
<!-- this one works as expected -->
        <xsl:element name="style">
            <foo1/>
        </xsl:element>

<!-- this includes xmlns:style in the result tree, which it shouldn't-->
        <xsl:element name="style:properties">
            <foo2/>
        </xsl:element>
        <xsl:element name="style:properties">
            <foo3/>
        </xsl:element>

    </xsl:template>
</xsl:stylesheet>


the output for any xml input file:

holger@whserv:~/ootest > xsltproc test.xslt kotest3/maindoc.xml
<?xml version="1.0"?>
<style><foo1/></style><style:properties 
xmlns:style="http://openoffice.org/2000/style";><foo2/></style:properties>
<style:properties 
xmlns:style="http://openoffice.org/2000/style";><foo3/></style:properties>
holger@whserv:~/ootest >

as far as i understand, xsltproc should also leave out the xmlns:... 
stuff for style:properties.
am i wrong or is this a bug?

thanks, Holger



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]