[xquery-talk] Subqueries in XQuery?

Wei, Alice Ju-Hsuan ajwei at indiana.edu
Wed Dec 26 20:00:42 PST 2007


  I am a newbie to XQuery, and I am trying to figure out how to put subqueries into my output.
  This is my XQuery:
declare boundary-space preserve;


for $file in doc("resume_2.xml"),
     $author in distinct-values($file//author[./@type='Faculty' or ./@type='co-author'])
              order by $author ascending
     return  <li>{data($author)}</li>

  Currently, there are five items that were extracted from the document, and they are in order, but I also want the specific content inside each {data($author)} to be in alphabetical order.



   Desired Output:

    <li>M, O,P</li>

Is this possible?

Thanks to those who can help.

Alice Wei
MIS 2008
School of Library and Information Science
Indiana University Bloomington
ajwei at indiana.edu

More information about the talk mailing list