XQuery - output series of HTML elements with separator
问题 In XQuery 3.1 I am constructing an HTML table. In one <td> element I'm outputting a series of <a ref=""> . So, currently this simple for : <td> { for $b in collection($globalvar:URIdata)/tei:TEI/tei:text//tei:seg[@type="dep_event" and @corresp = $a/data(@corresp) and @xml:id != $a/data(@xml:id)] order by $b/data(@xml:id) return <a href="{concat($globalvar:URLdoc,$b/ancestor::tei:TEI/tei:text/@xml:id)}">{$b/data(@xml:id)}</a> } </td> Outputs this: <td> <a href="http://localhost:8081/exist/apps