question re: eval of sequences of strings
Added by Anonymous over 19 years ago
Legacy ID: #3117702 Legacy Poster: jonwilliford (jonwilliford)
It looks like saxion's default behavior when evaluating a sequence of strings is to add a space delimiter between the strings. Is there a nice way to concat these together without a delimiter? I don't believe fn:concat can be used since it can't accept a sequence of strings. A recursive solution would be pretty easy to do, although I didn't know if there was a better or built in way to handle these cases. Also, do you know where in the specs does it talk about this behavior? I thought it would be the xpath 2.0 spec, but didn't find it there. Thanks!
Replies (2)
question re: eval of sequences of strings - Added by Anonymous over 19 years ago
Legacy ID: #3117741 Legacy Poster: Michael Kay (mhkay)
It depends what is doing the "evaluating". If you are using xsl:value-of or xsl:attribute, you can set separator="" to have a "null separator" between items instead of a space. In other contexts, you can use string-join($s, "") to concatenate all the strings in a sequence with no separator. Where to look in the spec for this behaviour depends on precisely which XSLT instructions or XPath expressions you are using. For example, see http://www.w3.org/TR/xslt20/#constructing-simple-content Michael Kay
question re: eval of sequences of strings - Added by Anonymous over 19 years ago
Legacy ID: #3120303 Legacy Poster: jonwilliford (jonwilliford)
Thanks a lot!
Please register to reply