CSC 513 Programming Assignment 3: Transform XML


Announcement

Description

In this assignment, you will be transforming from one XML format to another via XQuery. Write an XQuery to transform chang.xml (xsd) into chang2.xml (xsd).

Test your XQuery

Before submitting your file, you should test your transformation using Saxon and DOMEcho.
  1. Download Saxon to the folder containing chang.xml and your XQuery file.
  2. Go to the folder through command line, execute XQuery and save to file chang2.xml:
  3. java -cp saxon8.jar net.sf.saxon.Query (unity-id).xq > chang2.xml
    
    You should specify the input XML file (i.e., chang.xml) in XQuery.
  4. Use DOMEcho and chang2.xsd to verify the result as we did in our last assignment.
  5. javac DOMEcho.java
    java DOMEcho -xsdss chang2.xsd chang2.xml
    
Your XQuery should be able to transform any XML satisfying chang.xsd, to a XML that satisfies chang2.xsd.

Deliverables


Last Update: Feb 26, 2008
Chung-Wei Hang (chang@ncsu.edu)