XML - Managing Data Exchange/XSLT and Style Sheets/Exercises

Stylesheet Chapter => XSL and Style Sheets

Stylesheet Answers => Answers


 * 1) For Chapter 2's exercises, we created an XML document, schema, and stylesheet to define a museum entity.  Change that stylesheet to transform  that XML document into another XML document, instead of into HTML.
 * 2) In Chapter 4 we created an XML document, schema, and stylesheet to list restaurants, including the most popular, in a city.
 * 3) * a. Create a new stylesheet that uses a named template to output the name of the city. Then use two templates with different modes to print out the restaurants, using a larger font for the most popular restaurant.
 * 4) * b. Now create a stylesheet that will sort the restaurant names alphabetically, and number them using the number function and a single level of numbering.
 * 5) * c. Finally, we will use the call-template and with-param elements to create a stylesheet that will count the restaurants in a city, and add the prices up, and output it to a text file. This stylesheet will first call a template named &quot;count-restaurants&quot; and will use with-param to pass a parameter to count the restaurants.  Then it will call a template named &quot;sum-prices&quot; that will use with-param to pass the parameter &quot;num&quot; to sum the upper price for the restaurant.

Stylesheet Chapter => XSL and Style Sheets

Stylesheet Answers => Answers