Skip to main content
2 of 4
added 790 characters in body

There are couple of possibilities: http://stackoverflow.com/questions/4845660/xsl-how-to-split-strings but the most common is:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tridion="http://www.xyz.com/tridion/schemas">


<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>

<!--Identity transform-->
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>