W3C home > Mailing lists > Public > www-forms@w3.org > October 2007

Re: Testing for listItem

From: Frederik Elwert <felwert@uni-bremen.de>
Date: Thu, 18 Oct 2007 18:28:28 +0200
To: www-forms@w3.org
Message-Id: <1192724908.6254.38.camel@FredDesk>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:10 GMT