xsl-list
[Top] [All Lists]

[xsl] Using Tokenize with Lookbehind Regexp

2008-10-08 07:17:27
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

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>