html - Xslt size of token array (tokenize, number of tokens) -


is there way getting size of token array after having run tokenize($text, '\s+')? without running loop.

i miss java in these cases can run list.size().

cheers

answer

<xsl:variable name="tokens" select="tokenize($text, '\s+')"></xsl:variable> <xsl:value-of select="count($tokens)"></xsl:value-of> 

you should put count() around tokenize. in case count(tokenize($text, '\s+'))


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -