【发布时间】:2016-10-20 12:09:24
【问题描述】:
我继承了一个 BizTalk 应用程序,该应用程序从 Dynamics CRM 更改事件中获取输入并在地图中使用内联 XSLT。
我正在使用 VS 2013 并使用测试地图(在 Visual Studio 中右键单击地图)。
我有这个输入:
<ns0:DynamicsChangeMessage xmlns:ns0="http://XXXXXX">
<ns0:entity>entity_0</ns0:entity>
<ns0:operation>operation_0</ns0:operation>
<ns0:userId>userId_0</ns0:userId>
<ns0:Changes>
<ns0:Change>
<ns0:Key>gcs_universalcredit</ns0:Key>
<ns0:Value>true</ns0:Value>
</ns0:Change>
</ns0:Changes>
我已将此添加到现有的 XSLT:
<xsl:choose>
<xsl:when test="gcs_universalcredit = 'true'">
<UniversalCredit>Yes</UniversalCredit>
</xsl:when>
<xsl:otherwise>
<UniversalCredit>No</UniversalCredit>
</xsl:otherwise>
</xsl:choose>
我得到这个输出:
<ns3:Person mlns:ns3="http://XXXXXX/Schemas/Canonical/Person/1.0"
xmlns:ns1="http://XXXXXX/Schemas/Canonical/Person/1.0"
xmlns:ns4="http://XXXXXX/Schemas/Canonical/Address/1.0"
xmlns:ns2="http://XXXXXX/Schemas/Canonical/PersonRecord/1.0"
xmlns:ns0="http://XXXXXX/Schemas/Canonical/ProcessHeader/1.0">
<ProcessHeader>
<Source>DynamicsOnline</Source>
<ProcessName>ChangeProcessing</ProcessName>
<ProcessType>Update</ProcessType>
<ResubmissionCount>0</ResubmissionCount>
<TrackingId>3920dcdc-99e5-44c7-bd7a-d0039e60f235</TrackingId>
</ProcessHeader>
<PersonType>
<ADUserId>NotApplicable</ADUserId>
<TypeOfPerson>Tenant</TypeOfPerson>
</PersonType>
<PersonRecord>
<UniversalCredit>No</UniversalCredit>
</PersonRecord>
我浏览了网络并尝试了各种表达方式
<xsl:when test="gcs_universalcredit = 'true'">
但我总是得到
<UniversalCredit>No</UniversalCredit>
永远不会。
我做错了什么?
【问题讨论】: