Re: MS-FO-LC1-033: Allow concat strings to be sequences

Michael Rys wrote:
> 7.4.1 fn:concat: Why has $op to be xs:string? And not xs:string*.
> Allow xs:string* and concatenate them as well (see 7.4.2 remark that
> only holds if fn:concat(("a", "b")) would be a valid expression).
>
> Examples: fn:concat(("a","b")) should be "ab".
> fn:concat(("a","b"),"c") should be "abc".

The string-join() function provides the facility for concatenating
strings in a sequence, and is a lot more powerful than concat() for
doing so.

If this change were made, the backwards compatibility conversion rules
would also have to change. In XPath 1.0, given:

  concat('foo: ', foo)

you would get 'foo: ' concatenated with the string value of the
*first* of the <foo> elements, rather than the string values of the
<foo> elements all concatenated together. I think that changing the
backwards compatibility conversion rules to handle the case where the
type of the argument is xs:string* would cause problems elsewhere --
for example it would prevent string-join() from working properly in
backwards compatibility mode.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Tuesday, 1 July 2003 05:15:01 UTC