Cafe Townsend, a fictional restaurant, currently posts a list of daily specials on their website. They use an HTML table with a series of table rows to display the information. The left column of each row displays the name of the item and the items description. The right column of each row displays the items price. All of the information on the page is hand-coded (i.e., it is not coming from a dynamic data source), and the text is formatted with an external style sheet.
The owners of Cafe Townsend have decided to "go dynamic," and use data from an XML file to display their daily specials. Using XML allows for a separation between the content of the page (the menu specials) and the presentation (the layout, text styling, and so forth). An employee who doesnt know anything about HTML or web page maintenance can easily update the information by editing the XML file, while the page displaying the menu information remains stylistically untouched.
In this tutorial youll convert the existing specials page (an HTML page) to an XSLT page so that you can display XML data on the page. Youll also apply styles to the XML data so that the appearance of the data is in keeping with the rest of the page.
If youre comfortable working with XML, XSLT, and client-side transformations, you can skip to Convert an HTML page to an XSLT page. If you are new to any of these concepts, read the next sections.