Programming Assignment #7
Using XQuery

Due on Thursday April 9 before midnight.


This project must be done individually. No copying is permitted. The purpose of this project is to learn XQuery.


You will do this project on your own PC/laptop. You will use Qexo, which is a free implementation of XQuery. You need to download the kawa jar file. You can run XQueries from input using:

java -jar kawa-1.9.1.jar --xquery
but in this project you should write the queries in a file. Note that some functions may be missing from Qexo.


The following provide some tutorials. Use them as a reference only.

Project Requirements

Consider the following XML document along with its DTD that describes auctions: (the zipped XML document)

(The words for text paragraphs are taken from Shakespeare's plays.) There is also a DTD (the link is not broken; use Save As to save it) for the XML file but it is not very useful. Express the following queries using XQuery and run them against the file auction.xml using Qexo:
  1. Print the number of items listed on all continents.
  2. List the names of items registered in Australia along with their descriptions.
  3. List the names of persons and the number of items they bought.
  4. List all persons according to their interest (ie, for each iterest category, display the persons on that category).
  5. Group persons by their categories of interest and output the cardinality of each group.
  6. List the names of persons and the names of the items they bought in Europe.
  7. Give an alphabetically ordered list of all items along with their location.
  8. List the reserve prices of those open auctions where a certain person with id person20 issued a bid before another person with id person51.

What to Submit

Use the form below to submit your XQuery files (or you may zip all XQuery files and submit the zipped file).

Submit this file:

Last modified: 04/02/09 by Leonidas Fegaras