Project 5
Using XPath and XSLT

Due on Friday March 14 before midnight


This project must be done individually. No copying is permitted. The goal of this project is to learn XPath and XSLT to query XML data and display XML data on a web browser.


You will do this project on your own PC/laptop. You may use a text editor to develop your Java programs but it would be easier if you just use Netbeans.

Here are some examples:


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

Project Requirements

  1. Consider the following XML document along with its DTD that describes auctions: (The words for text paragraphs are taken from Shakespeare's plays.) Write a java program that evaluates the following queries using XPath:
    1. Return the initial increases of all open auctions
    2. How many sold items cost more than 40?
    3. How many items are listed in Europe?
    4. Print the keywords in emphasis in annotations of closed auctions.
    5. Print the persons who have a homepage.
    6. Return the IDs of all open auctions whose current increase is at least twice as high as the initial increase (note that these are the increases of the last and first bidders of the same open auction).
  2. Consider the following XML document along with its DTD that describes recipes: Write an XSLT program to display the recipes nicely on a web browser. The XSLT should generate HTML code.

What to Submit

Use the form below to submit your files.

Submit this file:

Last modified: 03/03/08 by Leonidas Fegaras