str:tokenize()
"Casadome, Francisco" <[email protected]>
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <CF9ECD50D7CFD5118366009027E5A23C039FA42E@MADRID-MAIL01> |
Hi EXSLT, This is my first post on this list. I really like the idea of EXSLT and would like to contribute to the str:tokenize() function. I'm currently working on a tokenizer and one thing I miss on the function posted on the web is that you are forced to work with single characters. I think it would be more useful to let the caller specify strings instead of characters. This way you could split the string into tokens by ". " but not ".", like in the following example: String: "Edit the config.sys file. In the line number [...]" Expected result: <Token>Edit</Token> <Token>the</Token> <Token>config.sys</Token> <Token>file</Token> <Token>In</Token> <Token>the</Token> <Token>line</Token> <Token>numer</Token> However, with the current implementation this is not possible. The function definition would be something like this: node-set str:tokenize(string, string?, string?, string?, ...) Is this "unlimited" arguments number possible at all in XSLT ? I hope this helps to improve a little bit an already great idea. Regards, Francisco J. Casadomé Rodríguez Linguistic Engineer - Linguistic Engineering Group Bowne Global Solutions http://www.bowneglobal.com