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.
- Download Saxon to the folder containing order1.xml and your XQuery file.
- Go to the folder through command line, execute XQuery and save to file order2.xml:
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.
- Use DOMEcho and order2.xsd to verify the result as we did in our last assignment.
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
- Please submit here.
- Submit the XQuery file (unity-id.xq)
Xibin Gao (xgao2@ncsu.edu)