Literal text is allowed outside the XQuery expressions, just like literal tags:
<bib> <h1>Bibliography</h1> { for $b in doc("bib.xml")/bib/book return $b/title } </bib>