Using xquery 1.0, I want to take a sequence like this;
<foo xml:id="x20"/>
<foo xml:id="x47"/>
<foo xml:id="x3"/>
And collate the ids into a string to put in an attribute of a new element like this;
<bar ids="x20 x47 x3"/>
Is there a way to do it without manually iterating over the input sequence using a FLWOR?
1 Answer