The purpose of this project is to learn XQuery.
This project must be done individually. No copying is permitted. Note: We will use a system for detecting software plagiarism, called Moss, which is an automatic system for determining the similarity of programs. That is, your program will be compared with the programs of the other students in class as well as with the programs submitted in previous years. This program will find similarities even if you rename variables, move code, change code structure, etc.
Note that, if you use a Search Engine to find similar programs on the web, we will find these programs too. So don't do it because you will get caught and you will get an F in the course (this is cheating). Don't look for code to use for your project on the web or from other students (current or past). Don't try to hire a freelancer to do the coding for you. Just do your project alone using the help given in this project description and from your instructor and GTA only.
You will do this project on your own PC/laptop. You will use Zorba, which is a free implementation of XQuery.
Note 16/11/2014: If you are using Ubuntu 14.04, you first need to download one of libicu48*.deb from https://launchpad.net/ubuntu/trusty/+package/libicu48 and do sudo dpkg -i libicu48*.deb.
The following provide some tutorials. Use them as a reference only.
Write a sample XML file, travel.xml, for flight reservations that satisfies the following DTD:
<!ELEMENT travel (airport | flight | passenger | reservation)*> <!ELEMENT airport (name)> <!ATTLIST airport code ID #REQUIRED> <!ELEMENT flight (date,departureTime,arrivalTime)> <!ATTLIST flight id ID #REQUIRED from IDRef #REQUIRED <!-- the code of the departure airport --> to IDRef #REQUIRED> <!-- the code of the destination airport --> <!ELEMENT passenger (name,address)> <!ATTLIST passenger ssn ID #REQUIRED> <!ELEMENT reservation (creditcard)> <!ATTLIST reservation passenger IDRef #REQUIRED <!-- the passenger ssn --> flight IDRef #REQUIRED> <!-- the flight id -->where all other elements are PCDATA. Express the following queries using XQuery and run them against your file travel.xml using Zorba:
Use the form below to submit your XML and XQuery files (or you may zip all files and submit the zipped file).
Last modified: 11/11/14 by Leonidas Fegaras