soap的XSLT转换

soap的XSLT转换,xslt,soap,transformation,Xslt,Soap,Transformation,我有这个xml文件 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="http://testwork/"> <soapenv:Header/> <soapenv:Body> <tes:sayHelloWorldFrom> <!--Optional:-->

我有这个xml文件

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tes="http://testwork/">
   <soapenv:Header/>
   <soapenv:Body>
      <tes:sayHelloWorldFrom>
         <!--Optional:-->
         <arg0>?</arg0>
      </tes:sayHelloWorldFrom>
   </soapenv:Body>
</soapenv:Envelope>

我的xsl有什么问题?

您的xsl缺少XML中的名称空间。如果没有它,XSL将无法在XML中找到元素,因为它将在错误的名称空间中查找它

所以加上

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:tes="http://testwork/"

您的XSL缺少XML中的名称空间。如果没有它,XSL将无法在XML中找到元素,因为它将在错误的名称空间中查找它

所以加上

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:tes="http://testwork/"
到您的XSL,它应该可以毫无问题地转换

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:tes="http://testwork/"