私は次のXMLを持っています
<response>
<Contacts>
<Contact>
<Name>John Doe</Name>
<Age>48</Age>
<DOB>
<Day>12</Day>
<Month>6</Month>
<Year>1964</Year>
</DOB>
<Contacts>
<Contact>
<Name>Jane Walsh</Name>
<Age>30</Age>
<DOB>
<Day>24</Day>
<Month>3</Month>
<Year>1983</Year>
</DOB>
</Contact>
<Contact>
<Name>Rob Marsh</Name>
<Age>55</Age>
<DOB>
<Day>1</Day>
<Month>Feb</Month>
<Year>1958</Year>
</DOB>
</Contact>
</Contacts>
</Contact>
</Contacts>
</response>
ID変換を使用して、構造をターゲットにコピーしています。
<xsl:template name = "testTemplate" match="/*[local-name()='response']/*">
<xsl:apply-templates mode="copy-no-ns" select="response"/>
</xsl:template>
<!-- Selectively mass copy some of the nodes without namespaces -->
<xsl:template mode="copy-no-ns" match="*">
<xsl:element name="{name(.)}" namespace="{namespace-uri(.)}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="copy-no-ns" select="node()"/>
</xsl:element>
</xsl:template>
XSLはAltovaXMLSpyで動作し、Visual Studio 2010でテストすると、目的の出力が生成されます。ただし、BizTalkマップは次のように空のノードを生成します(正しくコピーされた他のコンテンツを削除しました)。
<Contacts>
<Contact>
<Contacts>
<Contact />
<Contact />
</Contacts>
<Contact>
</Contacts>
何が起こっているのか、これを修正する方法がわかりません。助言がありますか?トンありがとう