copy-namespaces = "no"が、XSLTの出力ドキュメントで参照されていない名前空間宣言を削除しないのはなぜですか?MarkLogic5XSLTプロセッサを使用しています。
サンプル入力
<root xmlns:temp="http://temp" xmlns:keep="http://keep">
<wrapper><temp:x>A</temp:x>BC<temp:x>D</temp:x></wrapper>
<keep:me>XYZ</keep:me>
</root>
サンプルXSL
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:temp="http://temp"
xmlns:keep="http://keep"
exclude-result-prefixes="#all">
<xsl:template match="node()|@*" priority="-1" mode="#all">
<xsl:copy copy-namespaces="no">
<xsl:apply-templates select="@*|node()" mode="#current"/>
</xsl:copy>
</xsl:template>
<xsl:template match="temp:x">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>
期待される出力
<root xmlns:keep="http://keep">
<wrapper>ABCD</wrapper>
<keep:me>XYZ</keep:me>
</root>
実際の出力
<root xmlns:temp="http://temp" xmlns:keep="http://keep">
<wrapper>ABCD</wrapper>
<keep:me>XYZ</keep:me>
</root>