Developing XSL Style Sheets

The key to understanding XSL style sheets is to see them in action. I could fill a whole book with intricate details about XSL patterns and template constructs, but you really need to see some examples to put the power and flexibility of XSL style sheets in context. I'll return to the familiar address book XML document from earlier chapters to demonstrate how to create a simple XSL style sheet. Listing 11.1 contains the code for the AddressBook.xml document.

Listing 11.1. The Address Book XML Document (AddressBook.xml)
 <?xml version="1.0"?> <?xml-stylesheet href="AddressBook.xsl" type="text/xsl"?> <!DOCTYPE addressbook SYSTEM "AddressBook.dtd" [ <!ENTITY amp "&#38;#38;"> <!ENTITY apos "&#39;"> ]> <addressbook> <!-- ...

Get XML Unleashed 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.