As the error states, in XSLT 1.0, you can't use the union operator to join operands that aren't already nodes.
If you're using an XSLT processor that supports the node-set()
function, you can do this:
<xsl:for-each select="exsl:node-set($a0) | exsl:node-set($a1) | exsl:node-set($a2)">
<xsl:value-of select="."/>
<xsl:if test="position()!=last()">,</xsl:if>
</xsl:for-each>
But if you're going to do that, you might as well do this:
<xsl:value-of select="concat($a0, ',', $a1, ',', $a2)" />
Judging from a recent question you made, perhaps you have tons of variables, in which case perhaps your design needs some rethinking. If you could provide some specifics instead of generic placeholders, perhaps someone could advise you on a different approach.