xsl array concatenation error
815390Aug 10 2011 — edited Aug 10 2011I'm basically new in xsl and have some problem in array concatenation of fields. Would you know the cause of below error when compiling my xsl code. It has a shorterror description only as below:
ERROR: XalanTransformer::compile() Exception. The expression is empty.
Remaining tokens are: ()
My input are status, number, and action. Code have conditions of concatenating the number separated by comma if it finds out that it is ERROR status
Appreciate your help guys
Code:
<!-- template to concatenate Error fields -->
<xsl:template name="WhiteErr">
<xsl:param name="varErrMsn"/>
<xsl:param name="result"/>
<xsl:variable name="rtemp" select="concat($result,$varErrMsn,',')"/>
<xsl:call-template name="WhiteErr">
<xsl:with-param name="varErrMsn" select="$varErrMsn"/>
<xsl:with-param name="result" select="$rtemp"/>
</xsl:call-template>
</xsl:template>
<!-- call template to concatenate -->
<xsl:if test="($tmpStatus='ERROR' and ($tmpAction='add' or $tmpAction='mod')) or ($tmpStatus='ERROR' and ($tmpAction=
'add' or $tmpAction='mod') and string-length($tmpNew)>0)">
<xsl:call-template name="WhiteErr">
<xsl:with-param name="counter" select="1"/>
<xsl:with-param name="varErrMsn" select="$tmpNew"/>
<xsl:with-param name="result" select=""/>
</xsl:call-template>
</xsl:if>