Xslt: dynamicznie twórz przestrzeń nazw

Poniżej znajdują się węzły w danych XML

<WebServiceUrl>"http://webser.part.site"</WebServiceUrl>
<UserName>nida</UserName>
<Passsword>123</Password>

Przekazałem tę wartość węzła do usługi Xslt teraz mam tę wartość url NODE w parametrze e-g

    <xsl:param name="UserName"/>
    <xsl:param name="Password"/>
    <xsl:param name="WebServiceUrl"/>

Teraz chcę utworzyć tag soapenv: Envelope i użyć w nim tej wartości

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="$WebServiceUrl">

Tak więc ostateczny outPut, którego chcę od kodu XSLT, wygląda następująco:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"     xmlns:web="http://webservice2.partner.insite">
<soapenv:Header/>
<soapenv:Body>
<web:upload>
<web:username>nida</web:username>
<web:password>123</web:password>
</web:upload></soapenv:Body></soapenv:Envelope>

Bardzo dziękuję za Twoją pomoc .

To jest twój kod:

 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes"/>
 <xsl:param name="UserName"/>
 <xsl:param name="Password"/>
  <xsl:param name="WebServiceUrl" select="'some: namespace'"/>
<xsl:template match="/">    
SOAPAction: "urn:upload"
Content-Type: text/xml;charset=UTF-8
 <xsl:text>
 </xsl:text>
  <xsl:element name="{name()}"
      namespace="http://schemas.xmlsoap.org/soap/envelope/">
  <xsl:sequence select="namespace::*[not(name()='web')]"/>
  <xsl:namespace name="web" select="$WebServiceUrl"/>
 </xsl:element>
 <xsl:text>
   </xsl:text>
<soapenv:Header/>
   <xsl:text>
   </xsl:text>
<soapenv:Body>
   <xsl:text>
   </xsl:text>
    <web:upload>
   <xsl:text>
   </xsl:text>      
        <web:username><xsl:value-of select="$UserName"/>                </web:username>
    <xsl:text>
   </xsl:text>
                <web:password><xsl:value-of select="$Password"/>           </web:password>
    <xsl:text>
   </xsl:text>
  </soapenv:Envelope>
</xsl:template>
    </xsl:stylesheet>

Gdy próbuję zapisać ten kod, to jest błąd, ponieważ brakuje znacznika początkowego tego węzła

</soapenv:Envelope>

Proszę wprowadzić zmiany w tym, co robię źle w tym.

questionAnswers(1)

yourAnswerToTheQuestion