我有以下XML
<root>
<a>test</a>
<b xmlns="bns">test</b>
<a>test</a>
<b xmlns="bns">test</b>
<a>test</a>
</root>
和这个XSL
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="no"/>
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
如果我使用Java将XSL应用于XML,则删除第二个b-tag的命名空间:
<root>
<a>test</a>
<b xmlns="bns">test</b>
<a>test</a>
<b>test</b>
<a>test</a>
</root>
我注意到这只发生在输出方法html中。谁能告诉我为什么以及我能做些什么呢?