Subject: Re: Patterns and scoped variables (or rather lack thereof)
From: "Abel Braaksma (Exselt)" <abel@xxxxxxxxxx>
Date: Thu, 20 Feb 2014 07:22:24 +0100
|
Hi John,
No, you're not being dumb ;). I tried to write this up during the Prague
XML conference, apparently I wasn't focused enough. The second one
should have been count(tokenize($t[1], '\s+')), if mimicked to the
original question's match pattern.
Thanks for pointing it out.
Cheers,
Abel
On 16-2-2014 20:22, John Lumley wrote:
> I hope I'm not being dumb, but since tokenize() expects xs:string? as the main argument, this predicate should either return false() or trigger an error, since if count($t) eq 2, then the second point should complain...
>
> John
>
>> On 16 Feb 2014, at 18:01, abel@xxxxxxxxxx wrote:
>>
>> <xsl:template match="text()[
>> let $t := tokenize(., ':')
>> return
>> count($t) eq 2 and
>> count(tokenize($t, '\s+')) lt 4">
|