我有一个源 XML
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<PublishANZINCIDENTESB xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2013-02-25T23:25:35+00:00" transLanguage="EN" baseLanguage="EN" messageID="1361834735434709840" maximoVersion="7 1 20110105-1024 V7118-37" event="1"><ANZINCIDENTESBSet><INCIDENT action="Replace"></INCIDENT></ANZINCIDENTESBSet></PublishANZINCIDENTESB></soapenv:Body></soapenv:Envelope>
我想通过将名称空间和标头添加到标记来更改为目标 XML。输出 XML 是
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s600="http://LIB_ISM_WPS/S600_PublishANZINCIDENT_Service_INT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body>
<s600:PublishANZINCIDENTESBOperation><PublishANZINCIDENTESB xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2013-02-25T23:25:35+00:00" transLanguage="EN" baseLanguage="EN" messageID="1361834735434709840" maximoVersion="7 1 20110105-1024 V7118-37" event="1"><ANZINCIDENTESBSet><INCIDENT action="Replace"></INCIDENT></ANZINCIDENTESBSet></PublishANZINCIDENTESB></s600:PublishANZINCIDENTESBOperation></soapenv:Body></soapenv:Envelope>
我正在使用的 XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:s600="http://LIB_ISM_WPS/S600_PublishANZINCIDENT_Service_INT" >
<s600:PublishANZINCIDENTESBOperation>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</s600:PublishANZINCIDENTESBOperation>
<xsl:template match="*">
<xsl:element name="s600:{name()}" namespace="http://LIB_ISM_WPS/S600_PublishANZINCIDENT_Service_INT">
<xsl:copy-of select="namespace::*"/>
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
任何人都可以尽快帮助我吗?