================================ XSLT Transformations over Movies ================================ 1. Return an element "movie_titles" that contains a list of alphabetically sorted titles of all movies in the document Write two stylesheets, one where iteration is expressed by template calls and another one where iteration is expressed by elements. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 2. Return an element “movies” with a list of “movie” containing in turn attributes title and year, ordered by year in descending order. Use static element and attribute constructors. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 3. Rewrite the preceding stylesheet so that you use copying wherever possible and use dynamic element and attribute constructors instead of the static constructors. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 4. Restructure the document so that - movies appear according to their year, with the most recent years first, and, within the same year, according to their title - countries appear in alphabetical order - for each director, the first name is given before the last name - actors of a movie appear according to their last name and, for actors with the same last name, according to their first name Everything else should remain as before. Hint: To sort according to two keys, say, first according to key1, and in case of equal key1-values according to key2, write two -elements: ------------------------------------------------------------------------- ------------------------------------------------------------------------- 5. Return an element “countries” containing an alphabetically sorted list of “country” elements, where each country from the document occurs exactly once. Use the two approaches shown in the lecture. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 6. Output movies (title and year) and within each movie those actors whose role occurs in the summary of the movie. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 7. Return an element “actors” with a list of “actor” elements, alphabetically sorted by last name and first name, where each actor from the movies document occurs exactly once. Each actor element should contain last name, first name, and year of birth of the actor. Hint: You may need an element to remember the last name when you sort according to first name. ------------------------------------------------------------------------- ------------------------------------------------------------------------- 8. Extend the stylesheet for the preceding task so that an actor also contains an element “movies” with the movies starring the actor (title and year are all the info needed for a movie). ------------------------------------------------------------------------- ------------------------------------------------------------------------- 9. Create a stylesheet that produces an HTML layout of the movies document. Follow the example of the recipes layout from the lecture. ------------------------------------------------------------------------- -------------------------------------------------------------------------