【发布时间】:2012-03-26 07:47:31
【问题描述】:
我想知道如果找到节点中的值,是否可以使用 XLST 选择值。我对 XSLT 没有任何经验,但我需要在 Microsoft BizTalk 中使用它。
这是我想做的一个例子:
<STF_11_OfficeHomeAddress>
<AD_0_StreetAddress>Street 1</AD_0_StreetAddress>
<AD_1_OtherDesignation>AD_1_OtherDesignation_0</AD_1_OtherDesignation>
<AD_2_City>City 1</AD_2_City>
<AD_3_StateOrProvince>Provence 1</AD_3_StateOrProvince>
<AD_4_ZipOrPostalCode>ZIP 1</AD_4_ZipOrPostalCode>
<AD_5_Country>Country 1</AD_5_Country>
<AD_6_AddressType>TYPE 1</AD_6_AddressType>
<AD_7_OtherGeographicDesignation>OtherGeographicDesignation 1</AD_7_OtherGeographicDesignation>
</STF_11_OfficeHomeAddress>
<STF_11_OfficeHomeAddress>
<AD_0_StreetAddress>Street 2</AD_0_StreetAddress>
<AD_1_OtherDesignation>OtherDesignation 2</AD_1_OtherDesignation>
<AD_2_City>City 2</AD_2_City>
<AD_3_StateOrProvince>Province 2</AD_3_StateOrProvince>
<AD_4_ZipOrPostalCode>Zip 2</AD_4_ZipOrPostalCode>
<AD_5_Country>Country 2</AD_5_Country>
<AD_6_AddressType>AddressType 2</AD_6_AddressType>
<AD_7_OtherGeographicDesignation>OtherGeographicDesignation 2</AD_7_OtherGeographicDesignation>
</STF_11_OfficeHomeAddress>
如果值<AD_7_OtherGeographicDesignation>OtherGeographicDesignation 2</AD_7_OtherGeographicDesignation> 存在,请选择<AD_0_StreetAddress>Street 2</AD_0_StreetAddress>。唯一的问题是,顺序并不总是相同,节点<STF_11_OfficeHomeAddress> 可以在同一个文件中出现 11 次。
有人可以帮帮我吗?
【问题讨论】:
标签: xml xslt biztalk biztalk-2010