[xsl] Using Tokenize with Lookbehind Regexp

Subject: [xsl] Using Tokenize with Lookbehind Regexp
From: Guenstig und Gut <guenstig-und-gut@xxxxxx>
Date: Wed, 08 Oct 2008 13:16:44 +0200
Hi,

I'm using Saxon 9.0.0.6 and want to use the XPath tokenize function as follows:

<xsl:value-of select="tokenize( . , '\s(?&lt;=(.){70,}?)' )"/>
or
<xsl:value-of select="tokenize( . , '\s(?<=(.){70,}?)' )"/>
or
<xsl:value-of select="tokenize( . , '(\s(?<=(.){70,}?))' )"/>

This throws following error:

Position: 815:0
Description: Error at character 3 in regular expression "\s(?<=(.){70,}?)": expected ())
URL: http://www.w3.org/TR/2005/WD-xpath-functions-20050211/#ERRFORX0002


I didn't get an error if I use
<xsl:value-of select="tokenize( . , '[\s(?&lt;=(.){70,}?)]' )"/>
But i'll get another result

Can somebody tell me how to use lookbehinds (and lookahaed)?

I want to separate the string at each white-space if the string before is longer than 70 signs

Best regards
Walter

Current Thread