[xquery-talk] Add value to result before a for loop
Michael Kay
mike at saxonica.com
Wed Jul 18 06:30:10 PDT 2012
An argument to concat() can't be a sequence: you need string-join().
Michael Kay
Saxonica
On 18/07/2012 13:55, Martin Honnen wrote:
> Gary Larsen wrote:
>
>> let$doc :=
>> <doc>
>> <item><id>1</id><name>item 1</name></item>
>> <item><id>2</id><name>item 2</name></item>
>> </doc>
>>
>> let$hdr :=concat('Id', codepoints-to-string(9), 'Name',
>> codepoints-to-string(10))
>
> return concat($hdr,
>
>> for$i in$doc/item return
>> concat($i/id, codepoints-to-string(9), $i/name,
>> codepoints-to-string(10))
>
> )
>
>
More information about the talk
mailing list