1

I want to tokenize a string into space separated words.

<string>
<upara> This is a small sentence </upara>
</upara>

I have done this using template

<xsl:call-template name="tokenizeString">
<xsl:with-param name="list" select="/string/upara"/>
<xsl:with-param name="delimiter" select="' '"/>
</xsl:call-template>

But i dont want to use template. Is this possible without template ??

<xsl:for-each select=" ????" >

how i want to loop over each word in the string.

Also i tride using

EXSLT str:tokenize 

But i cannot make it work.

Dot_NET Pro
  • 2,095
  • 2
  • 21
  • 38

1 Answers1

0

Even if there was a string tokenization function in XSLT, XSLT 1.0 does not support sequences. Having said that, there is no data structure (except the node sets) you can iterate against. So, you can only imitate a loop with recursive template calls.

shapiy
  • 1,117
  • 12
  • 14