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

  Virtual circuit is newly set up in an atm network

ATM networks use a token bucket scheme to regulate traffic (traffic shaping). A new token is put into the bucket every 1 usec so ATM cells can be sent during this time. The data payload of ATM cells is 48 bytes.

  Advantages of using hypervisor in enterprise

Examine the technical advantages and disadvantages of using a hypervisor in an enterprise. Compare and contrast the hypervisors from Microsoft (Hyper-V), VMware (ESXi), and Hitachi's (Virtage). Evaluate the effect of hypervisors on the TCO (Total ..

  Explain the purpose of each of these approaches

explain the purpose of each of these approaches.

  Explain the software packages in detail

explain the software packages in detail. analysis of the advantages and disadvantages of each of the software packages used.

  Different visual basic command

Write down the visual basic command in order to Load a LVM file ( file name: Data.lvm), Delete the first 22 row , Insert a new column from 0 to last row of file with increment of 0.1 ( For example, if there are 25 rows in Data.lvm; then 25-22=3, it w..

  What you have learned about cloud-based office productivity

Based on what you have learned about using cloud-based office productivity software, create a 5-slide presentation to the department head or CEO to convince him or her that using a cloud-based office productivity suite would benefit the company.

  Write down or copy or paste the complete problem narrative

Write down or copy/paste the complete problem narrative, including tables. Show your Lindo model. Show your Lindo output. Answer all questions pertaining to the problem.

  If you approach this as a fictitious organization choose a

write 5 paragraphs that respond to the following questions with your thoughts ideas and comments.nbsp use examples to

  Calculate and display their individual pay increases

They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases.

  Define why it is suggested that for security reasons

Since many commercial APs have the SSID broadcast option enabled by default, so clients may easily detect the presence of an AP. APs are also configured as DHCPs and Firewalls.

  Design a logical and physical topographical layout

Design a logical and physical topographical layout of the current and planned network through the use of graphical tools in Microsoft Word or Visio, or an open source alternative such as Dia.

  Identify the three basic kinds of e-commerce

Identify the three basic sorts of e-Commerce. How do their strategic roles differ? What are the benefits and disadvantages to organizations, sellers, and consumers.

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