Multiple FLWOR Queries

<bib>
 {
   for $b in doc("bib.xml")//book[author]
   return
    <book>
     { $b/title }
     { $b/author }
    </book>,
   for $b in doc("bib.xml")//book[editor]
   return
    <reference>
     { $b/title }
     <org> { $b/editor/affiliation/text() } </org>
    </reference>
 }
</bib>

Adapted from XML Query Use Cases


Previous | Next | Top | Cafe con Leche | Cafe au Lait

Copyright 2002-2008 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 13, 2001