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 order1.xml (xsd) into order2.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 order1.xml and your XQuery file.
  2. Go to the folder through command line, execute XQuery and save to file order2.xml:
  3. java -cp saxon8.jar net.sf.saxon.Query (unity-id).xq > order2.xml
    
    You should specify the input XML file (i.e., order1.xml) in XQuery.
  4. Use DOMEcho and order2.xsd to verify the result as we did in our last assignment.
  5. javac DOMEcho.java
    java DOMEcho -xsdss order2.xsd order2.xml
    
Your XQuery should be able to transform any XML satisfying order1.xsd, to a XML that satisfies order2.xsd.

Deliverables


Xibin Gao (xgao2@ncsu.edu)