Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask E-Commerce Expert

XML Authoring Assignment

Rafael Garcia has worked with the stock report you generated and has made a few modifications to the source document. Rafael has added a few more elements providing information on each stock's high and low value over the previous year, the stock's P/E ratio, earnings per share (EPS), dividend, and yield. He's also included the URL to the company's website.

Rafael wants to try a new design, in which these new stock values appear in a table alongside a description of the stock. He also wants to show the current stock value and whether it's rising, falling, or remaining level, which is to be prominently displayed below the company name. Figure 5-38 shows a preview of the revised content and layout of the report.

Rafael has already created the CSS style sheet for this web page, but he needs you to develop the XSLT style sheet, which will generate the HTML code used in the report.

Because creating a style sheet can be complicated, it is strongly recommended that you save your changes and generate the result document as you complete each step below to check on your progress and detect any problems early. Complete the following:

1. Using your text editor, open the portfoliotxt.xml and portfoliotxt.xsl files from the xml05 > review folder. Enter your name and the date in the comment section of each file, and save them as portfolio.xml and portfolio.xsl, respectively.

2. Go to the portfolio.xml file in your text editor. Take some time to review the content of the file and its structure. Add a processing instruction after the comment section that attaches the portfolio.xsl style sheet to this XML document. Close the file, saving your changes.

3. Go to the portfolio.xsl file in your text editor. Below the comment section, set up this document as an XSLT style sheet by adding a stylesheet root element and declaring the XSLT namespace using the namespace prefix xsl.

4. Add an output element to indicate to the XSLT processor that the transformed file should be in HTML5 format.

5. Develop a root template and, within that template, enter the following HTML code:



Portfolio Stocks




6. Directly after the opening tag in the root template, insert the following code:



Last Updated: date at time

Chesterton Financial


Portfolio Stocks


where date and time are the values of the date and time elements from the source document using the XSLT value-of elements.

7. Directly below the closing tag, insert the following HTML code three times, one for each of three categories of stock (Industrials, Utilities, and Transportation):


Category


stock template

where Category is either Industrials, Utilities, or Transportation, and stock template applies the template for elements from the portfolio/stock location path for stocks of the specified category. Sort the applied templates in alphabetical order by stock name.

8. Develop a template for the today element, and then, within the template, enter the following HTML code:
















CurrentOpenHighLowVolume
currentopenhighlowvolume

where current, open, high, low, and volume are the values of the current, open, high, low, and vol attributes using the XSLT value-of element.

9. Develop a template for the summary element, and then, within the template, enter the following HTML code:

















Web Addresslink
52wk. Rangelow - high
P/Epe_ratio
EPSeps
Div. and Yielddividend (yield)

where link, low, high, pe_ratio, eps, dividend, and yield are the values of the corresponding elements from the source document using the XSLT value-of element.

10. Develop a template for the stock element and, within the template, enter the following HTML code:


today
summary

stock name (symbol)


where today and summary apply the today and summary templates, stock name is the name of the stock, and symbol is the value of the symbol attribute using the XSLT value-of element.

11. Directly between the closing and closing tags in the stock template, use a choose structure to insert the following h2 heading and paragraph:


change
current


description

where change has the value "up", "down", or "same" depending on whether the value of the current attribute is less than, greater than, or equal to the open attribute; current is the value of the current attribute; and description is the value of the description element. Note that the current and open attributes must be referenced from within the today element. Be sure to replace the HTML code with the proper value of expressions.

12. Save your changes to the portfolio.xsl file.

13. Generate your result document using either an XML editor or your web browser. Verify that the layout matches what is shown in Figure 5-38 and that each link in the summary table jumps the user to the corresponding stock's website.

E-Commerce, Computer Science

  • Category:- E-Commerce
  • Reference No.:- M92373220
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in E-Commerce

Assignment requirementsyour web site proposal and

Assignment Requirements Your web site proposal and presentation (Assignment 1) was accepted, subject to any feedback you may have received. You company has been asked to develop website you suggested and build the featur ...

Research and discuss html 5what are its main featureswhat

Research and discuss HTML 5. What are its main features? What resources are available to support it? Put it in your own words please.

Overviewassignment 2 asked you to build the front end of

Overview Assignment 2 asked you to build the front end of the assignment, now the client wants you to build the full eCommerce website to the point that orders can be made and stored in a spreadsheet. Requirements 1. Web ...

Create testcase for given project first use piki design to

Create testcase for given project, first use piki design to do test case Want to do it like testcase one file and you can also get right information from saeed testcases Want to piki design all of it and informat like te ...

Secure electronic commerce assignment -part a -based on

Secure Electronic Commerce Assignment - Part A - Based on your practices in labs, develop an online e-commerce (shopping) system using html, javascript and php. You can assume any products for sales. Please create a fold ...

Assignment - creating dynamic websites and web-based

Assignment - CREATING DYNAMIC WEBSITES AND WEB-BASED APPLICATIONS - AN OVERVIEW This assignment is an overview of the concepts, technologies and design techniques required to build dynamic websites and web-based applicat ...

Html - css assignments assignment 1 - internet programming

HTML - CSS Assignments Assignment 1 - Internet Programming   My grandfather, like many men who lived in rural America, owned a large machine shed where he stored tools, farm equipment, vehicles, lumber, and wonderful gad ...

Mobile web application development assignment - android

Mobile Web Application Development Assignment - Android Apps Development Purpose of the assessment - Students are required to design and develop four different Apps. Apply Java programming concepts, models/architectures ...

Purpose of the assessment with ulo mapping students are

Purpose of the assessment (with ULO Mapping) Students are required to design and develop four different Apps. Students will be able to: b. Apply Java programming concepts, models/architectures and patterns to Android app ...

Mobile applications assignment - an ios recipe application

Mobile Applications Assignment - An iOS Recipe Application - Introduction - In this assignment, you will create a simple Recipe application for iOS using Xcode (Swift). This application allows users to view food recipes. ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As