Re: Testing for listItem

Am Donnerstag, den 18.10.2007, 16:54 +0200 schrieb Frederik Elwert:
> EXSLT has a quite useful extension in this regard: str:tokenize() (and
> str:split(), but that one's less supported). So using EXSLT, something
> like this should work, too:
> 
>         str:tokenize(flavors)/token = 'a'

Stupid me. It should of course be
        str:tokenize(flavors) = 'a'
since str:tokenize returns a nodeset.

I guess this is short and simple enough to make another function like
list-contains() unnecessary. This depends on EXSLT, but I find it much
more elegant than dealing with contains().

Of course your solution is much more portable and probably should be
preferred "in the wild".

Cheers,
Frederik

Received on Thursday, 18 October 2007 16:28:54 UTC