Due on Friday March 14 before midnight
Using XPath and XSLT
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.
- 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:
- Return the initial increases of all open auctions
- How many sold items cost more than 40?
- How many items are listed in Europe?
- Print the keywords in emphasis in annotations of closed auctions.
- Print the persons who have a homepage.
- 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).
- 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.
Last modified: 03/03/08 by Leonidas Fegaras