CSc 8711, Spring 2005
Take Home Final Exam
Due: 6th May, 2005 (Friday) - Midnight Electronic Submission -
Submit under assignment 6.
THIS IS AN INDIVIDUAL EXAM - NO COLLABORATION!
Solve the following problems. For each, test your code on the system and submit a screen
capture. The screen capture should consist of the sufficient information to convince me that
the code did execute and that it did produce the results.
- Consider the data in Problem 1 Data.
Formulate the following queries in XPath:
- Find the names of all courses taught by "Sunderraman" in "FA2004".
- Find the set of all document nodes that correspond to (a) the course names (cname)
taught in "FA2004" or (b) instructors who taught "CSc9999".
- Find the set of all course numbers (cno) taught by "Zhang" in "SP2003".
- Consider the data in Problem 2 Data.
Write an XSLT program to transform the data into a well-formed XML document that
contains the list of "student" elements such that each student in the list took
a course in "SP2003".
- Write an XSL Transform program that traverses a document tree and, ignoring attributes,
copies the elements and doubles the text nodes. For instance,
<foo a="1">the<moo/>moocow</foo>
would be transformed into
<foo>thethe<moo/>moocowmoocow</foo>
- Consider the Mail Order database in XML.
Write the following queries in XQuery:
- Get the names and street addresses of customers who have placed an
order.
- Get the names of customers who have ordered part 10506.
- Get the names of customers who have placed an order from an employee who lives in Wichita.
- Get the names of customers who have placed orders only from employees who live in Wichita.
- Get the names of employees who have not taken any order.
- Consider the XML data in Data.
Write an XMLSchema for this data. Test this schema with the given data as well as
Bad Data.
- Consider the Bibliography Data.
Write an XMLSchema for this data and verify that the data fits your schema.