Xml 使用名称空间转换xsl

Xml 使用名称空间转换xsl,xml,xslt,wso2,transformation,Xml,Xslt,Wso2,Transformation,我在尝试转换此XML时遇到一些问题: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <p:GetAgendamento xmlns:p="http://ws.wso2.org/dataservice"> <xs:Servico xmlns:xs="http://ws.wso2.org/dataservi

我在尝试转换此XML时遇到一些问题:

 <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
  <soapenv:Body>
   <p:GetAgendamento xmlns:p="http://ws.wso2.org/dataservice">
    <xs:Servico xmlns:xs="http://ws.wso2.org/dataservice">1</xs:Servico>
    <xs:Oportunidade xmlns:xs="http://ws.wso2.org/dataservice">2</xs:Oportunidade>
    <xs:Caso xmlns:xs="http://ws.wso2.org/dataservice">3</xs:Caso>
   </p:GetAgendamento>
  </soapenv:Body>
</soapenv:Envelope>
为此:

<GetAppointment>
  <ServiceOrderID>1</ServiceID>
  <OpportunityID>2</OpportunityID>
  <CaseID>3</CaseID>
</GetAppointment>
但是,使用生成此xsl的工具:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:p="http://ws.wso2.org/dataservice" version="2.0" xpath-default-namespace="http://www.algartelecom.com.br/SOA/Service/GetAppointmentSchedulePortalReqCS">
  <xsl:output method="xml" indent="yes" />
  <xsl:template match="p:GetAgendamento">
    <GetAppointment>
      <xsl:call-template name="_template_0" />
    </GetAppointment>
  </xsl:template>
  <xsl:template name="_template_0">
    <xsl:for-each select="xs:Servico">
      <ServiceOrderID>
        <xsl:apply-templates select="." />
      </ServiceOrderID>
    </xsl:for-each>
    <xsl:for-each select="xs:Oportunidade">
      <OportunityID>
        <xsl:apply-templates select="." />
      </OportunityID>
    </xsl:for-each>
    <xsl:for-each select="xs:Caso">
      <CaseID>
        <xsl:apply-templates select="." />
      </CaseID>
    </xsl:for-each>
  </xsl:template>
</xsl:transform>
其结果是:

<?xml version="1.0" encoding="UTF-8"?>
<GetAppointment xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  xmlns:p="http://ws.wso2.org/dataservice"/>
我想这是名称空间引起的问题。请在xsl:xmlns:xs中提供帮助。

=http://www.w3.org/2001/XMLSchema

在源xml:xmlns:xs中=http://ws.wso2.org/dataservice

修正这个差异,它应该会工作得更好