Creating an HTML Table

In the final example in this chapter, you create an HTML table in the output document.

In this example, you look at how information about major news items stored in XML can be transformed using XSLT to produce an HTML page with links to the full news items. The structure of the source XML document is shown in Listing 10.8.

Listing 10.8. XMMLNews.xml: An XML-Based Data Store Containing News Information
 <?xml version='1.0'?> <XMMLNews> <Story> <Headline>Teddy Bear's Picnic a Success</Headline> <Header>2002 Teddy Bear's Picnic a great success.</Header> <MainText>The Drum Castle (http://www.drum-castle.org.uk) Teddy Bear's Picnic for 2002 was a great success. etc</MainText> </Story> <Story> <Headline>Snow Falls in Antarctica</Headline> ...

Get Sams Teach Yourself XML in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.