Разбить строку по разделителю средствами XSLT

Шаблон:

<xsl:template name="explodeString">
	
	<xsl:param name="string" />
	<xsl:param name="delimetr" />
	<xsl:param name="gap" />

	<xsl:variable name="substring" select="substring-before(concat($string,$delimetr),$delimetr)" />

	<xsl:if test="string-length($string)">
		<xsl:choose>
			<xsl:when test="contains($string, $delimetr)">

				<span>
					<xsl:value-of select="$substring" />
				</span> 
				
				<xsl:value-of select="$gap" />               

				<xsl:call-template name="explodeString">
					<xsl:with-param name="string" select="substring-after($string, $delimetr)"/>
					<xsl:with-param name="delimetr" select="$delimetr" />
					<xsl:with-param name="gap" select="$gap" />
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<span>
					<xsl:value-of select="$substring" />
				</span>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:if>
</xsl:template>

Вызов:

<xsl:call-template name="explodeString">
	<xsl:with-param name="string" select="." />
	<xsl:with-param name="delimetr"><xsl:text>::</xsl:text></xsl:with-param>
	<xsl:with-param name="gap"><xsl:text> </xsl:text></xsl:with-param>
</xsl:call-template>