Or more simply
<xsl:template match="key:div">
<xsl:for-each select="tokenize(., '\n')[matches(., '\w')]">
<para>
<xsl:value-of select="."/>
</para>
</xsl:for-each>
</xsl:template>
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Bruce D'Arcus [mailto:bdarcus(_at_)myrealbox(_dot_)com]
Sent: 11 December 2004 16:13
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] cdata, grouping and upconversion
The below works.
<xsl:template match="key:div">
<xsl:for-each select="tokenize(., '\n')">
<xsl:choose>
<xsl:when test="matches(., '\w')">
<para>
<xsl:value-of select="."/>
</para>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:for-each>
</xsl:template>
Bruce
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--