0

我想使用 XSLT 为我的 xml 删除特定的命名空间。

例如

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root xmlns="http://test.com" xmlns:ns2="http://test2.com">
  <ns2:element1>hello</ns2:element1>
  <ns2:element2>hello</ns2:element2>
</root>

如何提出 XSLT 来删除http://test.com命名空间?

谢谢

4

1 回答 1

0

尝试类似的东西

<xsl:template match="ns2:*">
    <xsl:element name="local-name()">
        <xsl:copy-of select="*">
    </xsl:element>
</xsl:template>
于 2013-06-30T09:27:13.457 回答