Lab 8 (XSLT)

Due Monday, May 2nd

Task 1, 10 points

Given the CD catalog XML file cdcatalog.xml, write an XSLT transform that will display the CD collection as two separate groups, CDs produced in USA and those produced in UK. Each group must be sorted by year in descending order (i.e. later years first) and then alphabetically by title within each year. xsl:sort is covered here: http://www.w3schools.com/xsl/el_sort.asp.

Task 2, 5 points

Display all CDs that are neither rare nor recent (see the type attribute). Display the title, the artist, the year, and the price. If the price is lower than 9.0, add light green background on the price only. Hint: if you are using "not", keep inmind that it is a function, i.e. parentheses are required. There is a way to do it without "not"; use any method.

Task 3, 8 points

Display the CDs in order from more favorite to less favorite. The "favorite" attribute in integer between -2 and 2 (inclusive). Within each group sort CDs alphabetically by artist.

Task 4, 6 points

Display all CDs except those that are by Bob Dylan or have negative favorite value and cost 8.0 or more.

Task 5, 4 points

Select all CDs that have the word "the" in the title (hint: use contains function, see the list of XPath functions).

Please send me your code, CC your partner.


CSci 4657 course.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.