tags:

views:

40

answers:

1

Hi All,

I need to join multiple element values into a new string separated with whitespace, what is the best way to do this? I am using xslt 2.0.

Thanks in advance.

+3  A: 

Look at the string-join function.

<xsl:value-of select="string-join(/path/to[1]/nodes/text(), ' ')" />
Tomalak
@tomalak: Now it's my turn to say that there's nothing I can add to this answer :). I already added my +1 earlier today.
Dimitre Novatchev
Thank you. Very much appreciated. :-)
Tomalak