user1647068
user1647068

Reputation: 1

Compare Xsl Variable

My Xsl code is like this , I could not enter inside when condition even isFlag is true,

<xsl:variable name="isFlag" select="java:isCustomerUnique($samledata)"/>     </xsl:variable>
         <xsl:choose>
         <xsl:when test="$isFlag = 'true'">
                  <uniqueData><xsl:value-of select="$uniqueData"/></uniqueData>
                  <isUnique><xsl:value-of select="$isUnique"/></isUnique>

I could not check the condition if the condition is

<xsl:when test="$isFlag = 'true'">

It is working fine , if I change like this

<xsl:when test="'true'= 'true'">

Upvotes: 0

Views: 115

Answers (1)

Martin L
Martin L

Reputation: 15

The conclusion is, that the variable $isFlag is not 'true'.

To debug the document processing just add the following line before xsl:choose to get the actual value of $isFlag:

<xsl:message terminate="no">The value of $isFlag is "<xsl:value-of select="$isFlag"/>"</xsl:message>

To stop the document processing you can set the attribute terminate to yes.

Upvotes: 1

Related Questions