str:tokenize() and consecutive delimiters in the source string

[email protected]
Newsgroups gmane.text.xml.xslt.extensions
Organization Universität Karlsruhe
Message-ID <[email protected]>
Hi list,

what would be the expected return value of str:tokenize('a, b',' ,') ?
Some processors return
  <node>a</node><node>b</node>
while others, for example libxslt, return
  <node>a</node><node></node><node>b</node>
i.e., there is an empty string seen between the comma and the blank. From the 
spec it is not clear to me, whether consecutive delimiters should behave like 
one single delimiter, or not.

An even simpler example would be str:tokenize('a  b',' '), with two blanks 
between a and b. The function name suggests that tokens are returned, so 
personally, I would expect to get two tokens (i.e. whitespace collapsed) and 
not three. But to sue libxslt, the spec should imho be more precise, or there 
should be an example given, similar to one of the two above.

Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.