[Home] [By Thread] [By Date] [Recent Entries]
On 2/5/07, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
I think Andrew means: <xsl:template match="/manifest">
<Metadata>
<xsl:copy-of select="namespace::*"/>
</Metadata>
</xsl:template>But namespace:: axis is deprecated in XSLT 2.0 (though, Saxon supports it) If you are using XSLT 2.0, the following is perhaps a portable way: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" /> <xsl:template match="manifest">
<xsl:variable name="x" select="." />
<Metadata>
<!-- create namespace declarations -->
<xsl:for-each select="in-scope-prefixes($x)">
<xsl:namespace name="{.}"><xsl:value-of
select="namespace-uri-for-prefix(., $x)" /></xsl:namespace>
</xsl:for-each><!-- do rest of things --> </Metadata> </xsl:template> </xsl:stylesheet> -- Regards, Mukul Gandhi
|

Cart



