Exercises: Chapter Eight


Problem Solution
Find and install at least one application which can be used to transform XML documents using XSLT. be sure to run any test suites which come with the application so that you know it installed properly.
Describe three problems which might be encountered when using CSS to format XML documents. How does XSLT address these problems?
What output formats are commonly created by XSLT processors?
Think of two output formats which are not currently supported by XSLT processors. Outline why you think these ought to be added to popular processors.
Write an XSLT stylesheet which converts your name and address document into XHTML. View the resulting document in a Web browser.
List, and briefly describe, three pieces of XSLT processing software.
Why don't all Web browsers support automated transformation of XML to XHTML using XSLT?
Outline why XML to XHTML transformations using XSLT are normally performed on a server rather than at the client.
What is an XSLT template element? Why are XSLT stylesheets formatted as sets of templates?
What other XML technology is used in XSLT to navigate through documents.
If a stylesheet needs to add information into an output document, that information is placed inside an XSLT element. Using a code fragment describe how this is done.
Describe how XSLT variables differ from those in programming languages such as Pascal.
How are parameters passed into XSLT templates?
Why are modes needed in XSLT stylesheets? Give an example of their use.
Create an XSLT stylesheet which creates an XHTML document containing a calendar of the current month. Place the calendar in a table with the names of the days in blue text.
Modify the calendar so that, using selection and iteration, it produces a calendar for the current year. You may ignore the problem of leap years, for this exercise.