Read the complete assignment before you start.

Motivation

In this assignment you will have an opportunity to build XSL rules to transform an XML to a differently formatted XML.

Learning Outcomes

Completing this assignment, will allow you to

Format

Must be completed individually without the assistance of a third party or AI.

Prerequisistes

Prior to working on this assignment, review these lessons and refer to them during the assignment:

Materials & Tools Needed

Tasks

Question 1 (5 min / 5 pts)

Create an R Project and download the starter file for applying the XSL transform into the project folder. Add the XML document into that folder as well. Rename the starter file to LastNameF.A80.403-Transform.R where LastNameF is your last name and first initial.

Question 2 (45 min / 70 pts)

Write an XSLT specification that transforms this XML document into an XML document that follows the format below – name the XSL file LastNameF.A80.403-1.xsl where LastNameF is your last name and first initial.

The resulting XML does not need to include a DTD but it must, obviously, be well-formed.

<?xml version="1.0" encoding="UTF-8"?>

<listings>
  <stock ticker="ZCXM">
    <company>zacx corp</company>
  </stock>
  <stock ticker="ZFFX">
    <company>zaffymat inc</company>
  </stock>
  <stock ticker="ZPPX">
    <company>zappyx</company>
  </stock>
  <stock ticker="ZULX">
    <company>zurlix</company>
  </stock>
  <stock ticker="ZYSZ">
    <company>zysmergy inc</company>
  </stock>
</listings>

Question 3 (15 min / 10 pts)

Modify your XSL so only companies that are not on the Swiss Stock Exchange (SSE) are included.

Question 4 (15 min / 10 pts)

Add the companies to the XML sorted by company name.

Question 5 (5 min / 5 pts)

Add code to the starter file that reads the XML into R to ensure that the XML is well-formed. As there is no DTD, no validation should occur.

Hints

Submission

Submit the XSL file only.


Useful Resources

None yet.


References

None.