This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

exclude-result-prefixes


Hi,

what's wrong here (tested with XT, MSXML3, Saxon)? Why isn't the namespace
decl for "xsi" stripped from the result document?


(a.xml)

<?xml-stylesheet type="text/xsl" href="foo.xsl"?>
<foo xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="foo.xsd">
<bars>
<!--... content omitted for clarity-->
</bars>


(foo.xsl)

<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        exclude-result-prefixes="xsi" >

<xsl:output omit-xml-declaration="yes" />

<xsl:template mode="verbatim" match="@xsi:*" />

<xsl:template match="/">
<xsl:call-template name="identity"/>
<!--...the rest omitted for clarity-->
</xsl:template>

<xsl:template match="* | @* | text()" name="identity" mode="verbatim">
<xsl:copy>
<xsl:apply-templates mode="verbatim" select="* | @* | text()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>


(XSLT processing)

<foo xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
<bars>

</bars>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]