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.

  1. Consider the data in Problem 1 Data. Formulate the following queries in XPath:
    1. Find the names of all courses taught by "Sunderraman" in "FA2004".
    2. Find the set of all document nodes that correspond to (a) the course names (cname) taught in "FA2004" or (b) instructors who taught "CSc9999".
    3. Find the set of all course numbers (cno) taught by "Zhang" in "SP2003".
  2. 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".
  3. 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>
    
  4. Consider the Mail Order database in XML. Write the following queries in XQuery:
    1. Get the names and street addresses of customers who have placed an order.
    2. Get the names of customers who have ordered part 10506.
    3. Get the names of customers who have placed an order from an employee who lives in Wichita.
    4. Get the names of customers who have placed orders only from employees who live in Wichita.
    5. Get the names of employees who have not taken any order.
  5. Consider the XML data in Data. Write an XMLSchema for this data. Test this schema with the given data as well as Bad Data.
  6. Consider the Bibliography Data. Write an XMLSchema for this data and verify that the data fits your schema.