我知道如何在所有删除的命名空间,但我需要做的仅仅是删除特定的命名空间前缀,例如改变这个文件(除去xenc前缀):如何删除命名空间前缀离开命名空间值(XSLT)?
<?xml version="1.0" encoding="UTF-8"?>
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
</xenc:EncryptedKey>
<ds:X509Data>
<ds:X509Certificate>AAA=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
成这样:
<?xml version="1.0" encoding="UTF-8"?>
<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
</EncryptedKey>
<ds:X509Data>
<ds:X509Certificate>AAA=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
你能帮我如何可以使用XSLT来完成?