Xml authoring assignment 5 | Computer Science homework help

Teacher is very picky, document must have all of these things


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 create 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. 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. Create a root template and, within that template, enter the following HTML code:



     <title>Portfolio Stocks</title>

<link href=”https://www.homeworkmarket.com/content/portfolio.css” rel=”stylesheet” type=”text/css” />






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



      Last Updated: date at time


<h1>Chesterton Financial</h1>

<h2>Portfolio Stocks</h2>


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 </header>  tag, insert the following HTML code three times, one for each of three categories of stock (Industrials, Utilities, and Transportation):



       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. Create a template for the today element, and then, within the template, enter the following HTML code: 


















 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. Create a template for the summary element, and then, within the template, enter the following HTML code: 



      <th>Web Address</th>

      <td><a href=”https://www.homeworkmarket.com/content/link”>link</a></td>




    <th>52wk. Range</th>

    <td>low – high</td>














   <th>Div. and Yield</th>

   <td>dividend (yield)</td>



 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 Create a template for the stock element and, within the template, enter the following HTML code:




   <h1>stock name (symbol)</h1>


 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 </h1> and closing </article> tags in the stock template, use a choose structure to insert the following h2 heading and paragraph: 

<h2 class=”change”>

    <img src=”https://www.homeworkmarket.com/content/change.png” alt=”change” />




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. 




   New Perspectives on XML, 3rd Edition

   Tutorial 5

   Review Assignment


   Chesterton Financial Style Sheet



   Filename:         portfolio.css

   Supporting Files: none




/* Default styles */


* {

   margin: 0px;

   list-style: none;



header, section, article {

   display: block;





/* Body styles */

body {

   background-color: white;

   font-family: Verdana, Geneva, sans-serif;

   margin: 10px auto;

   width: 75%;

   max-width: 800px;



/* Header styles */

header section {

   border: 1px dotted rgb(51, 51, 51);

   -moz-border-radius: 10px;

   -webkit-border-radius: 10px;

   border-radius: 10px;


   font-size: 0.7em;

   color: rgb(191, 91, 91);

   float: right;

   padding: 4px;

   margin-top: 5px;

   text-align: right;



header {

   font-family: “Times New Roman”, serif;

   margin-bottom: 20px;



header h1 {

   font-size: 2.8em;

   font-weight: normal;

   text-shadow: rgb(111, 111, 111) 5px 5px 8px;



header h2 {

   font-size: 2.3em;

   font-weight: normal;

   color: rgb(211, 211, 211);

   text-shadow: rgb(0, 0, 0) 1px 1px 0px;



body > section {

   border: 3px solid rgb(51, 51, 51);

   -moz-border-radius: 40px;

   -webkit-border-radius: 40px;

   border-radius: 40px;


   clear: right;

   margin: 10px 0px;



body > section > h1 {

   background-color: transparent;

   border-bottom: 3px solid rgb(51, 51, 51);

   color: rgb(101, 101, 101);

   font-weight: normal;

   font-size: 1.6em;

   padding: 5px 0px;

   text-indent: 40px;



body > section > article {

   clear: left;

   margin: 25px 25px 50px 25px;



article > h1 {

   font-weight: normal;

   font-size: 1.3em;

   margin: 0px 0px 0px 42%;



article > h2 {

   margin-left: 42%;



article > h2.up {

   color: green;



article > h2.down {

   color: red;



article > h2.same {

   color: orange;




article > p {

   font-size: 0.85em;

   margin: 0px 0px 0px 42%;

   max-width: 50%;




table {

   border-collapse: collapse;

   clear: left;

   float: left;

   margin: 10px 10px 0px 0px;

   width: 40%;



article table:last-of-type th {

   text-align: left;

   width: 35%;



td, th {

   border: 1px solid rgb(191, 191, 191);

   font-weight: normal;

   font-size: 0.7em;

   padding: 3px;



td {

   text-align: right;



th {

   background-color: rgb(101, 101, 101);

   color: white;






<?xml version=”1.0″ encoding=”UTF-8″ ?>


   New Perspectives on XML, 3rd Edition

   Tutorial 5

   Review Assignment


   Chesterton Financial XSL Style Sheet




   Filename:         portfolio.xsl

   Supporting Files: down.png, same.png, portfolio.css, up.png




<?xml version=”1.0″ encoding=”UTF-8″ ?>


   New Perspectives on XML 3rd Edition

   Tutorial 5

   Review Assignment


   Chesterton Financial Stock Information




   Filename:         portfolio.xml

   Supporting Files: down.png, same.png, portfolio.css, portfolio.xsl, up.png








   <author>Rafael Garcia</author>





      <sName symbol=”BA”>Boeing Company</sName>

      <description>The Boeing Company engages in the design, development, manufacture, sale, and support 

                   of commercial jetliners, military aircraft, satellites, missile defense, 

                   human space flight, and launch systems and services worldwide. It also offers aviation 

                   services support, aircraft modifications, spares, training, maintenance documents, 

                   and technical advice to commercial and government customers. Its financing portfolio 

                   consists of equipment under operating leases, finance leases, notes and other 

                   receivables, assets held for sale or re-lease, and investments. The Boeing Company 

                   was founded in 1916 and is based in Chicago, Illinois.












      <today open=”125.68″ high=”125.72″ low=”124.81″ current=”125.68″ vol=”6274500″ />




      <sName symbol=”HPQ”>Hewlett-Packard Company</sName>

      <description>Hewlett-Packard Company provides products, technologies, software, solutions, and 

                   services to individual consumers, small-and medium-sized businesses, and large 

                   enterprises, including customers in the government, health, and education sectors 

                   worldwide. Its Software segment offers enterprise information management solutions 

                   for structured and unstructured data, IT management software, and appliance 

                   deployment models. The company was founded in 1939 and is headquartered in 

                   Palo Alto, California.












      <today open=”23.78″ high=”25.15″ low=”23.78″ current=”23.78″ vol=”15922600″ />




      <sName symbol=”LUV”>Southwest Airlines Corporation</sName>

      <description>Southwest Airlines Co. operates passenger airlines that provide scheduled air 

                   transportation services in the United States. It serves 97 destinations in 41 states, 

                   the District of Columbia, and the Commonwealth of Puerto Rico, as well as 6 

                   near-international countries. The company was founded in 1967 and is headquartered 

                   in Dallas, Texas.












      <today open=”17.21″ high=”17.94″ low=”16.77″ current=”17.73″ vol=”6554700″ />




      <sName symbol=”ED”>Consolidated Edison Company of New York, Inc.</sName>

      <description>Consolidated Edison, Inc. engages in regulated electric, gas, and steam delivery 

                   businesses. The company provides electric services to approximately 3.3 million 

                   customers in New York City and Westchester County; gas to approximately 1.1 million 

                   customers in Manhattan, the Bronx and parts of Queens, and Westchester County; and 

                   steam to approximately 1,717 customers in parts of Manhattan. In addition, the company 

                   engages in the sale and related hedging of electricity to wholesale and retail customers.

                   Consolidated Edison, Inc. was founded in 1884 and is based in New York, New York.












      <today open=”59.15″ high=”59.89″ low=”59.03″ current=”59.89″ vol=”1298000″ />




      <sName symbol=”AA”>Aluminum Company of America</sName>

      <description>Alcoa Inc. engages in the production and management of primary aluminum, 

                   fabricated aluminum, and alumina. Its products are used in aircraft, automobiles, 

                   commercial transportation, packaging, building and construction, oil and gas, 

                   defense, consumer electronics, and industrial applications. Alcoa Inc. was founded 

                   in 1888 and is based in New York, New York.












      <today open=”9.39″ high=”9.56″ low=”9.32″ current=”9.48″ vol=”16815260″ />




      <sName symbol=”AEP”>American Electric Power Company, Incorporated</sName>

      <description>American Electric Power Company, Inc., a public utility holding company, engages 

                   in the generation, transmission, and distribution of electric power to retail 

                   customers. The company generates electricity using coal and lignite, natural gas, 

                   nuclear energy, and hydroelectric energy. It operates primarily in the states of 

                   Arkansas, Indiana, Kentucky, Louisiana, Michigan, Ohio, Oklahoma, Tennessee, 

                   Texas, Virginia, and West Virginia. American Electric Power Company, Inc. was founded 

                   in 1906 and is headquartered in Columbus, Ohio.












      <today open=”46.92″ high=”47.15″ low=”46.25″ current=”46.25″ vol=”20315100″ />




      <sName symbol=”CNI”>Canadian National Railway Company</sName>

      <description>Canadian National Railway Company engages in rail and related transportation business 

                   in North America. It transports various goods, including petroleum and chemicals, 

                   grain and fertilizers, coal, metals and minerals, forest products, intermodal, and 

                   automotive products. The company operates a network of approximately 20,100 route miles 

                   of track that spans Canada and mid-America. The company was founded in 1922 and is 

                   headquartered in Montreal, Canada.












      <today open=”110.02″ high=”111.15″ low=”109.59″ current=”110.21″ vol=”573400″ />




      <sName symbol=”CVX”>Chevron Corporation </sName>

      <description>Chevron Corporation engages in petroleum, chemicals, mining, power generation, and 

                   energy operations worldwide. The Upstream segment is involved in the exploration, 

                   development, and production of crude oil and natural gas. The Downstream segment engages 

                   in refining crude oil into petroleum products; marketing crude oil and refined products. 

                   The company is also involved in coal and molybdenum mining operations. The company was 

                   founded in 1879 and is headquartered in San Ramon, California.












      <today open=”120.81″ high=”121.57″ low=”120.68″ current=”121.21″ vol=”8235300″ />




      <sName symbol=”DAL”>Delta Air Lines Inc.</sName>

      <description>Delta Air Lines, Inc. provides scheduled air transportation for passengers and cargo in 

                   the United States and internationally. The company sells its tickets through various 

                   distribution channels, including telephone reservations, and online travel agencies. 

                   Its also provides aircraft maintenance, repair, and overhaul services for other aviation 

                   and airline customers. The company was founded in 1924 and is headquartered in 

                   Atlanta, Georgia.












      <today open=”26.07″ high=”26.35″ low=”25.89″ current=”25.89″ vol=”10321500″ />




      <sName symbol=”MPC”>Marathon Petroleum Corporation</sName>

      <description>Marathon Petroleum Corporation engages in refining, transporting, and marketing petroleum 

                   products primarily in the United States. The company owns and operates seven 

                   refineries in the Gulf Coast and Midwest regions of the United States. The company 

                   also transports crude oil and other feedstocks to its refineries and other locations.

                   The company is headquartered in Findlay, Ohio.












      <today open=”71.28″ high=”71.28″ low=”70.17″ current=”70.91″ vol=”2550200″ />




      <sName symbol=”PPL”>PPL Resources Incorporated</sName>

      <description>PPL Corporation, an energy and utility holding company, engages in the generation, 

                   transmission, distribution, and sale of electricity to wholesale and retail customers 

                   in the United States and the United Kingdom. The company develops renewable energy 

                   projects; and provides energy-related products and services to commercial and 

                   industrial customers. PPL Corporation was founded in 1920 and is headquartered in 

                   Allentown, Pennsylvania.












      <today open=”31.28″ high=”31.28″ low=”30.17″ current=”30.91″ vol=”4655200″ />




      <sName symbol=”R”>Ryder System, Incorporated</sName>

      <description>Ryder System, Inc. provides transportation and supply chain management solutions. 

                   It also offers fleet support services, such as fuel, insurance, safety, administration, 

                   environmental management, and information technology services. Ryder System, Inc. serves 

                   customers operating in various industries, such as automotive, food service, electronics, 

                   transportation, consumer packaged goods, grocery, lumber and wood products, and home 

                   furnishings. The company was founded in 1933 and is based in Miami, Florida.












      <today open=”66.73″ high=”66.81″ low=”65.44″ current=”65.89″ vol=”763900″ />




      <sName symbol=”T”>ATT Corporation</sName>

      <description>ATT Inc. provides telecommunications services to consumers, businesses, and other

                  providers in the United States and internationally. The company operates in three 

                  segments: Wireless, Wireline, and Other. The Wireless segment offers various wireless 

                  voice and data communication services. The Wireline segment provides data services

                  and network integration. The Other segment provides application management, security 

                  services, and satellite video services. The company was founded in 1983 and is based 

                  in Dallas, Texas.












      <today open=”36.18″ high=”36.24″ low=”35.14″ current=”35.78″ vol=”19065800″ />




      <sName symbol=”UNP”>Union Pacific Corporation</sName>

      <description>Union Pacific Corporation provides rail transportation services in North America. 

                   The company offers freight transportation services for agricultural products, 

                   food, and beverage products; and automotive products. It also provides transportation 

                   services for petrochemicals. In addition, the company offers freight transportation 

                   services for industrial products and construction products. Union Pacific Corporation 

                   was founded in 1862 and is headquartered in Omaha, Nebraska.












      <today open=”151.58″ high=”151.89″ low=”149.78″ current=”150.23″ vol=”1714000″ />




      <sName symbol=”WEC”>Wisconsin Energy Corporation</sName>

      <description>Wisconsin Energy Corporation generates and distributes electric energy, as well as 

                  distributes natural gas. The company provides electric utility services to customers 

                  in the mining, paper, foundry, food products, and machinery production industries.

                  It also generates, distributes, and sells steam. The company was founded in 1981 and 

                  is headquartered in Milwaukee, Wisconsin.












      <today open=”42.81″ high=”43.14″ low=”42.81″ current=”42.93″ vol=”1252000″ />





Calculate your paper price
Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.

Professional Academic Writers

Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.

Affordable Prices

Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.

On-Time delivery

We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.

100% Originality

At Essay USA, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.

Customer Support 24/7

Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: support@acmehomework.com.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Essay USA has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.


Essay Writing Services

At Essay USA, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.


Admission and Business Papers

Be assured that you’ll definitely get accepted to the Master’s level program at any university once you enter all the details in the order form. We won’t leave you here; we will also help you secure a good position in your aspired workplace by creating an outstanding resume or portfolio once you place an order.


Editing and Proofreading

Our skilled editing and writing team will help you restructure you paper, paraphrase, correct grammar and replace plagiarized sections on your paper just on time. The service is geared toward eliminating any mistakes and rather enhancing better quality.


Technical papers

We have writers in almost all fields including the most technical fields. You don’t have to worry about the complexity of your paper. Simply enter as much details as possible in the place order section.