XSLT mit XML-Quelle, für die der Standardnamespace auf xmlns festgelegt ist

Ich habe ein XML-Dokument mit einem im Stammverzeichnis angegebenen Standardnamespace. Etwas wie das:

<MyRoot xmlns="http://www.mysite.com">
   <MyChild1>
       <MyData>1234</MyData> 
   </MyChild1> 
</MyRoot>

Das XSLT zum Parsen des XML funktioniert aufgrund des Standard-Namespaces nicht wie erwartet, d. H., Wenn ich den Namespace entferne, funktioniert alles wie erwartet.

Hier ist mein XSLT:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xsl:template match="/" >
  <soap:Envelope xsl:version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
     <NewRoot xmlns="http://wherever.com">
       <NewChild>
         <ChildID>ABCD</ChildID>
         <ChildData>
            <xsl:value-of select="/MyRoot/MyChild1/MyData"/>
         </ChildData>
       </NewChild>
     </NewRoot>
   </soap:Body>
  </soap:Envelope>
 </xsl:template>
</xsl:stylesheet>

Was muss mit XSLT-Dokumenten getan werden, damit die Übersetzung ordnungsgemäß funktioniert? Was ist im XSLT-Dokument genau zu tun?

Antworten auf die Frage(3)

Ihre Antwort auf die Frage