You will be creating the xml xsd and the xslt files using


Final Project Part 1 -

Use this Assignment resource to submit Part 1 of your Final Project.

This Final Project will be an ongoing project throughout this course. Its goal is to tie together different aspects of how XML and all of its constituent parts can be tied together. During this project, files for XSD, XSLT, CSS, and XHTML will be used to transform the data in XML into formats that allow for the parsing of this data as well as visualization and styling of the data.

The example that will be used here will be the translating of measurements, both distance and weight, from one measurement standard to another. The distance measurements will translate from Imperial mile to Metric Kilometer. The weight measurements will translate from Troy Ounce to Metric Gram.

For this first part of the project, you will turn in 4 files:

  • measurements1.html
  • measurements1.xml
  • measurements1.xsd
  • measurements1.xslt

You will be creating the xml, xsd, and the xslt files using any text editor you want. The html file will be created for you using the saxon tool.

1. Use the measurements1.xsd file from the previous assignment.

2. Build an XML document based on the schema in measurements1.xsd. Name this document measurements1.xml.

a. This XML document should have a root of measurements.

b. This XML document should have at least 3 child elements to measurements.

3. Create an XSLT style sheet to display the contents in the measurements1.xml file. Name this file measurements1.xslt.

a. The first template should match the root of the document.

i. Inside the template, create an html document that outputs the total number of items in the measurements1.xml file and how many of each type are in the file.

ii. There should also be an apply-templates call that matches the measurement element.

b. The second template should match measurement.

i. In this template, choose between weight and distance based on the attribute typeOfMeasurement

ii. For distanceType, you should output the distance/@measureDistance attribute, as well as the distance element.

iii. For weightType, you should output the weight@measureWeight attribute, as well as the weight element.

4. Run these through the sax processor with the command

Transform.exe -sa -s:measurements1.xml -xsl:measurements1.xslt -xsd:measurements1.xsd -o:measurements1.html

This should result in an html file that outputs something similar to:

The 3 measurements that I want transformed.

There are 2 distance measurements

There is 1 weight measurement.

A distance measurement using the imperial scale is:

The length of the distance is 1.45

A weight measurement using the troy scale is:

The amount of the weight is .6

A distance measurement using the metric scale is:

The length of distance is 25

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: You will be creating the xml xsd and the xslt files using
Reference No:- TGS02168328

Expected delivery within 24 Hours