Skip to content

Instantly share code, notes, and snippets.

@jlogsdon
Created August 10, 2009 15:40
Show Gist options
  • Save jlogsdon/165250 to your computer and use it in GitHub Desktop.
Save jlogsdon/165250 to your computer and use it in GitHub Desktop.
<xsl:template name="break">
<xsl:param name="text" select="."/>
<xsl:choose>
<xsl:when test="contains($text, '&#xA;')">
<xsl:value-of select="substring-before($text, '&#xA;')"/>
<br/>
<xsl:call-template name="break">
<xsl:with-param name="text" select="substring-after($text,'&#xA;')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:call-template name="break">
<xsl:with-param name="text" select="lyrics"/>
</xsl:call-template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment