BizTalk XSLT +如果不相等则不起作用 [英] BizTalk XSLT + If not equal is not working
本文介绍了BizTalk XSLT +如果不相等则不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我有两个soruce架构和一个目标我想比较Source 1和Source 2并将不匹配的数据从Source 2映射到目的地。
I have two soruce schema and one destination I would like to compare Source 1 against Source 2 and map unmatching data from Source 2 to destination.
下面是我的内联XSLT,但我没有得到预期的输出。看起来它是从源2映射所有日期
Below is my inline XSLT but I am not getting the expected output. Looks like it is mapping all the date from Source 2
请您阅读代码建议吗?这是"不平等"的正确方式吗?在xslt
Would you please read the code an advise? Is this the proper way doing "not equal" in xslt
地图也包含在最底部
问候,
Ramsey
<!--working with effective data condition-->
<xsl:template name="ValidateTransactionData">
<!-- Loop MessagePart_0 -->
<xsl:for-each select="InputMessagePart_0/s1:INT_XROOT/INT_XDATA">
<!-- Create "Matching_DATA" record in the output message for each matching transaction-->
<xsl:variable name="s1_PolicyNumber" select="PolicyNumber"/>
<xsl:variable name="s1_EffectiveDate" select="EffectiveDate"/>
<xsl:variable name="s1_CommPercent" select="CommPercent"/>
<xsl:variable name="s1_CommAmount" select="CommAmount"/>
<xsl:variable name="s1_PremiumAmount" select="PremiumAmount"/>
<!-- Loop InputMessagePart_1 and validate matching long policy number -->
<xsl:for-each select="../../../InputMessagePart_1/s0:TAM_XROOT/TAM_XDATA">
<xsl:variable name="s0_PolicyNumber" select="PolicyNumber"/>
<xsl:variable name="s0_EffectiveDate" select="EffectiveDate"/>
<xsl:variable name="s0_CommPercent" select="CommPercent"/>
<xsl:variable name="s0_CommAmount" select="CommAmount"/>
<xsl:variable name="s0_PremiumAmount" select="PremiumAmount"/>
<xsl:if test="($s0_PolicyNumber != $s1_PolicyNumber) or (s0_EffectiveDate != $s1_EffectiveDate) or (s0_CommPercent != $s1_CommPercent) or (s0_CommAmount != $s1_CommAmount) or (s0_PremiumAmount != $s1_PremiumAmount)">
<INT_UDATA>
<Source>
<xsl:value-of select="Source" />
</Source>
<MonthStatement>
<xsl:value-of select="MonthStatement" />
</MonthStatement>
<BranchIdentifier>
<xsl:value-of select="BranchIdentifier" />
</BranchIdentifier>
<Region>
<xsl:value-of select="Region" />
</Region>
<BillType>
<xsl:value-of select="BillType" />
</BillType>
<Insured>
<xsl:value-of select="Insured" />
</Insured>
<PolicyNumber>
<xsl:value-of select="PolicyNumber" />
</PolicyNumber >
<EffectiveDate>
<xsl:value-of select="EffectiveDate" />
</EffectiveDate >
<CommPercent>
<xsl:value-of select="CommPercent" />
</CommPercent>
<CommAmount>
<xsl:value-of select="CommAmount" />
</CommAmount>
<PremiumAmount>
<xsl:value-of select="PremiumAmount" />
</PremiumAmount>
<CompanyCode>
<xsl:value-of select="CompanyCode" />
</CompanyCode>
<Status>
<xsl:value-of select="Status" />
</Status>
<Notes>
<xsl:value-of select="Notes" />
</Notes>
<MonthProduction>
<xsl:value-of select="MonthProduction" />
</MonthProduction>
<CustomerRec>
<xsl:value-of select="CustomerRec" />
</CustomerRec>
<Item>
<xsl:value-of select="Item" />
</Item>
<Desc>
<xsl:value-of select="Desc" />
</Desc>
</INT_UDATA >
<xsl:value-of select="./text()" />
</xsl:if>
</xsl:for-each >
<xsl:value-of select="./text()" />
</xsl:for-each>
<xsl:value-of select="./text()" />
</xsl:template >
推荐答案
请你检查一下你的状况?
Can you, please, check your condition?
(
s0_PolicyNumber!=
s0_PolicyNumber !=
s1_PolicyNumber)或( s0_EffectiveDate !=
s1_PolicyNumber) or (s0_EffectiveDate !=
这篇关于BizTalk XSLT +如果不相等则不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文