This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
exclude-result-prefixes
- To: <XSL-List at mulberrytech dot com>
- Subject: exclude-result-prefixes
- From: "Julian Reschke" <julian dot reschke at gmx dot de>
- Date: Thu, 3 Aug 2000 22:48:59 +0200
- Reply-To: xsl-list at mulberrytech dot com
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