Hi,
on writing the code you gave me, i get the error below:
"Unexpected character in query string. contains($sText,-->\<--n\n)"
here is my code:
<xsl:template name="paragrapher">
<xsl:param name="sText"/>
<xsl:if test="contains($sText,\n\n)">
<p>
<xsl:value-of
select="substring-before($sText,\n\n)"/>
</p>
</xsl:if>
</xsl:template>
Yes, well, that was pseudo-code - XPath doesn't use \n to denote a LINE FEED
character. And you missed the else clause, too.
<xsl:template name="paragrapher">
<xsl:param name="sText"/>
<xsl:choose>
<xsl:when test="contains($sText, '

')">
<p>
<xsl:value-of select="substring-before($sText, '

')"/>
</p>
<xsl:call-template name="paragrapher">
<xsl:with-param name="sText" select="substring-after($sText,
'

')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<p>
<xsl:value-of select="$sText"/>
</p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Jarno
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list