简体   繁体   English

XSLT 2.0 将空格分隔的字符串转换为序列

[英]XSLT 2.0 Convert a space separated string to a sequence

I'm looking for a function or simple method to convert a space-separated string into a sequence of strings.我正在寻找一个 function 或简单的方法来将以空格分隔的字符串转换为字符串序列。 For example the string 'abcd ef ghi' would be converted to a three-string sequence: 'abcd','ef','ghi'.例如,字符串“abcd ef ghi”将被转换为一个三字符串序列:“abcd”、“ef”、“ghi”。 It can be assumed that there is only one space between the sets of characters.可以假定字符集之间只有一个空格。 A string with no spaces would generate a one-string sequence.没有空格的字符串将生成单字符串序列。

I looked around through the usual references, but nothing jumped out at me.我通过通常的参考资料环顾四周,但没有任何东西跳出来。 I'm using XSLT 2.0.我正在使用 XSLT 2.0。 Suggestions?建议?

You are describing the tokenize() function.您正在描述tokenize() function。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM