在XSLT中,您可以使用此转换:
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/2005/Atom"
>
<xsl:output method="xml" indent="yes" encoding="utf-8" />
<xsl:template match="node() | @*">
<xsl:if test="
namespace-uri() = ''
or
namespace-uri() = 'http://www.w3.org/2005/Atom'
">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:if>
</xsl:template>
<xsl:template match="text()|comment()">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
这将逐字复制所有节点(如果是)
-
在默认(空)命名空间中
-
在Atom命名空间中
-
文本节点或注释
也许你可以用那个。