Sometimes XSLT ;xsl:if; and ;xsl:when; evaluate expression for "string=string" incorrectly.

Sometimes XSLT ;xsl:if; and ;xsl:when; evaluate expression for "string=string" incorrectly.

book

Article ID: KB0088095

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Abstract: Sometimes XSLT <xsl:if> and <xsl:when> evaluate expression for "string=string" incorrectly.


Description:
==========
When XSLT <xsl:if> and <xsl:when> are used in Mapper activity or other activities that are mapping data, the evaluate expression for "string=string" does not return the correct data. It seems the "string=string" will always return true, but sometimes returns false.


Environment:
==========
TIBCO BusinessWorks ALL


Symptoms:
==========
Sometimes "string=string" returns true, sometimes it returns false.


Cause:
==========
There is an invisible carriage return character appended or prepended to "string". E.g. "string ". You can not see it in the Designer input/output tab. You can see it when the input/output data are written to log.


Resolution:
==========
Let input/output data written to log by adding te following parameters to properties.cfg or theĀ  deployed application.tra file:

bw.engine.showInput=true
bw.engine.showOutput=true

Use tib:trim(string)="string" to do the evaluation.

Issue/Introduction

Sometimes XSLT ;xsl:if; and ;xsl:when; evaluate expression for "string=string" incorrectly.