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
Post a Comment