title: returning multi-element HTML as an xquery result
body: <p>I have a problem with returning multi-element HTML result (I dont know the name for this). To make it clearer, please see the code below.</p>
  
  <pre><code>&lt;body&gt;
    &lt;h1&gt;Nobel prize winners&lt;/h1&gt;{
    for $subject in distinct-values(doc("nobel.xml")//subject)
      let $sn := $subject`
      return &lt;div&gt;&lt;h2&gt;{$sn}&lt;/h2&gt;&lt;ul&gt;
         {for $row in doc("nobel.xml")/nobel/row
            let $name := $row/winner/text()
            let $year := $row/yr/text()
            where $row/subject/text()=$subject
            order by $year
            return &lt;li&gt; ({$year} {$name} &lt;/li&gt;
          }&lt;/ul&gt;&lt;/div&gt;
    }
  &lt;/body&gt;
  </code></pre>
  
  <p>That code will work, but you can notice that I have to put that <code>&lt;div&gt;</code> and <code>&lt;/div&gt;</code> in the beginning and the end of the <code>return</code> part, which I actually don't want. My question is, is there any way to remove it? I have tried with <code>{ }</code> and <code>( )</code> and both don't work.</p>