based on: http://stackoverflow.com/questions/4845660/xsl-how-to-split-strings <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tridion="http://www.xyz.com/tridion/schemas"> <xsl:output method="xml" encoding="utf-8" indent="no"/> <xsl:template match="tridion:Office/tridion:Telephone/text()" name="split"> <xsl:param name="pText" select="."/> <xsl:if test="string-length($pText)"> <xsl:if test="not($pText=.)"> <br /> </xsl:if> <xsl:value-of select="substring-before(concat($pText,','),',')"/> <xsl:call-template name="split"> <xsl:with-param name="pText" select="substring-after($pText, ',')"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="office" > <h5 id="{@id}"> <a href="#" property="v:name"> <xsl:value-of select="name/text()"/> </a> </h5> <div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Organization"> <div> <p> <div class="addressDetails"> <xsl:if test="telephone/text()"> <div class="moreDetails"> <p> <span> <xsl:value-of select="utils:Text('Telephone')"/> </span> </p> <p> <span class="normalfont" property="v:tel"> <xsl:value-of select="telephone/text()"/> </span> </p> <div class="clearfix"> <xsl:comment></xsl:comment> </div> </div> </xsl:if> </div> </p> </div> </div> </xsl:template> </xsl:stylesheet>