Queries

We recommend you to use Xquery for the queries.

Queries to implement

We expect you to implement the following queries as a minimum. All resulting files should be well-formed XML.
  1. List all jounal names appearing in a XML-bib-file.
  2. List all titles of publications of author named 'X'.
  3. Sort entries according to year.
  4. All co-authors to author 'X', sorted according to lastname followed by first name, and with duplicates removed.
  5. All entries where the same title appears several times (i.e., in different entries).
  6. All authors who also appears as editors somewhere in the bibliography.
  7. Count the number of publications for author 'X' during year 'Y'.
  8. Make a transformation that chooses all entries of type article, conference, and phdthesis and include only the fields author, title, and year.

XQuery documentation

We have not found any good documentation for XQuery, but you can start with the following links, and if you find something good, please let us know.

An XQuery tool

You may use the following XQuery tool to evaluate your XQuery expressions: Directions for usage and how to install it can be found on the above page.

Some examples

Examples of queries from the lecture on XQuery. The queries can be tested together with the xml-document recipes.xml from the XML tutorial by Anders Møller and Michael I. Schwartzbach.

Other things you may need when implementing the above queries

The following things are not illustrated in the example queries, but you may want to use them when you implement your queries: