Problem:
Use the data in the XML documents provided to perform the tasks below:
Part A: XML to HTML Transformation
Your first task is to create a website that displays statistics on sports and countries. The website consists of three HTML pages, each generated by a different XSLT script. You must write the XSLT files to generate the correct HTML output.
Transform 2: The aim of this task is to extract a table containing Australia's population data from an XML document called "Population.xml". The output HTML should contain a table shown on page 2. Save your script as "transform2.xsl".
a. Note that the increase in the population is given by the difference between the current population and the previous year's value. The percentage growth is simply the increase divided by the previous value (and multiplied by 100 to convert it to a percentage).
b. HINT: You may want to save the results of some XPath expressions as XSLT variables to allow you to reuse them.
- Optional Additional Task: Create a new transformation called "transform2optional.xsl" that ranks countries for the year 2010 by: (i) their population sizes from largest to smallest and (ii) their % growth rates, in two separate tables.
- Transform 3: Write a script "transform3.xsl" that extracts a list of the top 10 countries with the highest per capita GDP values for 2010 from the file "perCapitaGDP.xml" and presents them as shown on page 3.
a. Note that for each of the countries on the list, you will need to get the population data from the file "Population.xml".
- Optional Additional Task: Write a second script "transform3optional.xls" that outputs tables for years: {2010, 2000, 1990,...,1960}. Create a template that you call by name and pass a parameter (year) to it in order to do this.
Additional Information:
This problem is from HTML as well as it is about creating website using HTML which displays statistical data pertaining to countries. The population growth rate of Australia has to be displayed in tables in one of website's pages.