#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    6
    Rep Power
    0

    Xsl array concatenation


    Hi,

    I'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. not really sure where the error is

    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, this is done for each of elements -->

    <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>
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    6
    Rep Power
    0
    oops I booted it up already - just have to include single quotes in the call section as below
    <xsl:with-param name="result" select="''"/>

    though getting another error below, will have to debug this how to make the final result a variable for use in the outside loop

    Error:
    The variable 'result' is not defined.Source tree node:

IMN logo majestic logo threadwatch logo seochat tools logo