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.
- Download Saxon to the folder containing chang.xml and your XQuery file.
- Go to the folder through command line, execute XQuery and save to file chang2.xml:
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.
- Use DOMEcho and chang2.xsd to verify the result as we did in our last assignment.
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
- Please submit here.
- Submit the XQuery file (unity-id.xq)
Last Update: Feb 26, 2008
Chung-Wei Hang (chang@ncsu.edu)