This might help:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="concat" match="/data">
<xsl:for-each select="AddtlStsRsnInf">
<xsl:value-of select="." /><xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Given:
<?xml version="1.0"?>
<data>
<AddtlStsRsnInf>/00000002/Level 2 Reject</AddtlStsRsnInf>
<AddtlStsRsnInf>The Transaction Reference Number is</AddtlStsRsnInf>
<AddtlStsRsnInf>not unique.</AddtlStsRsnInf>
</data>
You can wrap it in a variable (v
) using:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="concat" match="/data">
<xsl:variable name="v">
<xsl:for-each select="AddtlStsRsnInf">
<xsl:value-of select="." /><xsl:text> </xsl:text>
</xsl:for-each>
</xsl:variable>
<xsl:value-of select="$v" />
</xsl:template>
</xsl:stylesheet>