2016-09-26 15 views
0

linkから、入力XMLと出力XMLの両方が以下のようになるXSLTを作成する必要があります。以下の入力XML用にXSLTを作成して出力と同じにする方法をお勧めします。希望する入出力XSLTが同じ場合

<abc:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/"> 
    <abc:Body> 
     <def:CheckOutput xmlns:def="http://www.test.com/service"> 
     <def:Error> 
      <def:Code>0</def:Code> 
     </def:Error> 
     </def:CheckOutput> 
    </abc:Body> 
</abc:Envelope> 
+0

(https://en.wikipedia.org/wiki/Identity_transform)を変換するXSLTのアイデンティティにまで読んだことがあります。 –

+0

何も変換されていない場合、変換の目的は何ですか? –

答えて

0

あなたのXMLは、abcが定義されていない名前空間接頭辞を引き起こし、無効です。名前空間 - 接頭辞NS1が定義されていますが、使用されていません。 input-xmlが混在している可能性があります。有効な入力で

、あなたのXSLTは次のようになります:

<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:abc="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:def="http://www.test.com/service"> 

    <xsl:template match="@* | node()"> 
     <xsl:copy> 
      <xsl:apply-templates select="@* | node()" /> 
     </xsl:copy> 
    </xsl:template> 
</xsl:stylesheet> 
関連する問題