Create an xslt style sheet to display the contents

Assignment Help Computer Engineering
Reference no: EM131304495

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

 

Reference no: EM131304495

Questions Cloud

What are the practical business implications of such a move : There has been a movement in the last decade encouraging people to "buy American." Discuss the legal and ethical issues related to boycotting goods from other countries. What are the practical business implications of such a move?
What does the author mean by gains may be priced in : If the gains are priced in and you bought stocks on the basis of the information contained in this article, would you be likely to earn above-average returns on your investment?
Explain a budgeting system at any governmental level : Evaluate a budgeting system at any governmental level. Analyze the scope and sequence of budgeting in terms of sources of revenues, purpose of government expenditures, budget cycles, budget preparation, and debt administration.
Determine the enforceability of your hypothetical situation : At issue in the case Labriola v. Pollard Group Inc. from the second e-Activity is consideration for the formation of a contract when an employee, already employed by the employer, executes a non-compete agreement but receives no new benefit and th..
Create an xslt style sheet to display the contents : Create an XSLT style sheet to display the contents in the measurements1.xml file. Name this file measurements1.xslt. The first template should match the root of the document
How purchase of apple press affect companys revenue goals : Do you think the company's revenue goal of $25 million by 2015 is realistic?- Explain how purchase of the apple press might affect the company's revenue goals.
Which is similar to the gentlemans quarterly design : Germs Quarantined" and in the top left corner on the front cover, ran a slightly interlocking "GQ," which is similar to the Gentleman's Quarterly design. Gentleman's Quarterly sues Germs Quarantined, claiming that the latter's use of the interlock..
Analyze scope of budgeting in terms of sources of revenues : Analyze the scope and sequence of budgeting in terms of sources of revenues, purpose of government expenditures, budget cycles, budget preparation, and debt administration.
Discuss about the case study given below : Suppose that Michael tells several of his friends about Lucia instructing the man to take goods without paying for them after the earthquake. If Lucia files a tort action against Michael alleging slander, will her suit be successful? Why or why n..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write application that instantiates five librarybook objects

Write an application that instantiates five LibraryBook objects and prompts the user for values for the data fields. The objects should be stored in either an Array or an ArrayList.

  Write down fucntion defintion for the line class constructor

write down fucntion defintion for the Line class constructor.

  What would be the output from each program

The following two programs differ in that one uses parseFloat and the other does not. What would be the output from each program if the user inputs 4 followed by 2.

  Design and develop a program that creates a complete set

Design and develop a program that creates complete set of multiplication tables where both the multiplicand and the multiplier vary from 1 through 12. The table should display as 144 rows in the list view control.

  Implementations of the adt bag

Compare the array-based and link-based implementations of the ADT bag operation remove(anEntry). Suppose the different locations of anEntry within the array or chain.

  Questionafter front-office network at xyz corp is set up an

questionafter front-office network at xyz corp. is set up an accountant realizes that if loading dock connected to the

  Design an it solution proposal for a company or organization

Describe the practical applications used in organizations brought about by advances in information technology.

  What are some types of surfaces that you would expect to

you will process a variety of porous and nonporous items for latent prints using black fingerprint powder or crushed

  What are some of the disadvantages of cloud computing

What are some of the disadvantages of cloud computing. For your discussion, think of a process at work or in your personal experience that required some type of hardware and/or software needing to be purchased, stored and maintained at the current ..

  Termination and resumption models of continuation

Describe three approaches to exception handling in languages that do not provide direct support for it - Summarize the arguments in favor of the termination and resumption models of continuation.

  What do you think is more important for a good it

1. many people have a hard time taking a systems view when it comes to managing projects. why do you think this is the

  Provider database-ms access-open office database

As you recall, data is a collection of facts (numbers, text, even audio and video files) that is processed into usable information. Much like a spreadsheet, a database is a collection of such facts that you can then slice and dice in various ways ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd