<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:template name="m">
<xsl:analyze-string select="'This is a long line that I want to
split at a space. '"
regex=".{{0,30}}( )">
<xsl:matching-substring>
<x><xsl:value-of select="replace(.,' $','')"/></x>
</xsl:matching-substring>
<xsl:non-matching-substring>
<y><xsl:value-of select="."/></y>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:template>
</xsl:stylesheet>
produces
<x>This is a long line that I</x>
<x>want to split at a space.</x>
David
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--