Hi I have xslt structure shown below
<xsl:template name="ConvertCriticalFlags">
<xsl:param name="src1"/>
<xsl:param name="src2"/>
<xsl:param name="src3"/>
<xsl:param name="src4"/>
<xsl:param name="src5"/>
<xsl:variable name="rslt" select="''"/>
<xsl:choose>
<xsl:when test="$src1 = 'YES'" >
<xsl:copy-of select="concat($rslt,',', '2TO4UNITS')"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="''"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$src2 = 'YES'">
<xsl:copy-of select="concat($rslt,',', 'COMMERCIAL')"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="''"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$src3 = 'YES'">
<xsl:copy-of select="concat($rslt,',', 'ACREAGE')"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="''"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$src4 = 'YES'">
<xsl:copy-of select="concat($rslt,',', 'MOBILEHOME')"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="''"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="$src5 = 'YES'">
<xsl:copy-of select="concat($rslt,',', 'VACANTLAND')"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="''"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="starts-with($rslt,',') = true">
<xsl:copy-of select="substring($rslt,2)"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$rslt"/>
</xsl:otherwise>
</xsl:choose>
I would like to concatenate all the data into one variable $rslt but i am unable to do so
Can any one suggest how to concatenate.
1 Answer