Search for question
Question

Using XQuery Description 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 MossLinks to an external site., 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 use ChatGPT or any other Al program to generate code. Just do your project alone using the help given in this project description and from your instructor and GTA only. Platform You will do this project on your own PC/laptop. You will use Saxon, which is a free implementation of XQuery in Java. Download the project8 zip file project8.zip Download project8.zipand unzip it. It contains the saxon.jar file with the Saxon implementation of XQuery in Java. To run the XQuery file q1.xq and store the output in the file o1.xml, use: java -cp saxon.jar net.sf.saxon.Query -q:q1.xq -o:"01.xml" (if you omit -o: "o1.xm1", it will print the results to the output). To run XQuery on the command line, use for example:/nProject Requirements First, download project8.zip Download project8.zipwhich contains the Saxon implementation of XQuery and synthetic data (automatically generated) for auctions (auction.xml). The words for text paragraphs are taken from Shakespeare's plays. There is also a DTD 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 Saxon: 1. Print the number of items listed on all continents. 2. List the names of items registered in Europe 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 interest category, display the persons on that category). 5. Group persons by their categories of interest and output the size 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 person3 issued a bid before another person with id person6. (Here before means "listed before in the XML document", that is, before in document order.) Write each XQuery into a separate file, such as q1.xq for the first query, and then use: java -cp saxon.jar net.sf.saxon.Query -q:q1.xq -o:"01.xml" to write the results of the first query in the file o1.xml.

Fig: 1

Fig: 2