>> English << | Français | Deutsch | Magyar | 中文 | Polski ZVON > Tutorials > XSLT Tutorial
>> Page 48 << | Prev | Next | Contents | Element Index

The concat function returns the concatenation of its arguments.

XSLT stylesheet 1

XML Source
<source>

<text>Start</text>
<text>Body</text>
<text>Finish</text>

</source>

Output
<P>Start - Body - Finish</P>

HTML view

Start - Body - Finish

XSLT stylesheet
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:variable name="T" select="concat(//text[1],' - ',//text[2],' - ',//text[3])"/>
<xsl:template match="/">
     <P>
          <xsl:value-of select="$T"/>
     </P>
</xsl:template>


</xsl:stylesheet>