Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Functions operating on strings (11/15) >

Joining strings with concat()

The function concat()Concatenates two and more arguments (which are cast to string before concatenation).

XSLT

      <xsl:stylesheet
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="2.0">
            <xsl:output  method="xml"
                        indent="yes"
                        omit-xml-declaration="yes"/>

            <xsl:template  match="/aaa">
                  <xxx>
                        <xsl:value-of  select="concat(ddd,eee)"/>
                  </xxx>
                  <yyy>
                        <xsl:value-of  select="concat(ccc,' ',ddd,' ',eee)"/>
                  </yyy>
                  <zzz>
                        <xsl:value-of  select="concat(name(*[3]),':',*[3])"/>
                  </zzz>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa>
            <bbb>How</bbb>
            <ccc>do</ccc>
            <ddd>you</ddd>
            <eee>do</eee>
      </aaa>
Output

      <xxx>youdo</xxx>
      <yyy>do you do</yyy>
      <zzz>ddd:you</zzz>


Previous chapter: Arithmetics
Next chapter: Transforming strings with regular expressions
Previous page: Normalization of whitespace characters in a string with normalize-space function
Next page: Joining strings with string-join

Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
city of stanton
internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks