Mastering XML Transformations
XSLT (Extensible Stylesheet Transofrmations) allows you to convert documents from XML to HTML. The XLST book demonstrates how to use XSLT and provides many different cases and techniques which you can follow and try out on your own projects.
XLST was originally created for page layout, but is now a core technology and is extremely useful. XSLT uses an XML-based template syntax combined with a terse vocabulary called XPath which identifies how the template applies to the original document.
The XSLT book begins with a basic of overview of what XSLT is and how it differs from CSS and how XML differs from HTML. The second chapter introduces you slowly to XSLT coding by getting you to display the classic ‘Hello World’ message using XSLT.
The book then introduces XPath and how to use branching and control elements, such as if then else statements, looping and global variables. The book also includes a chapter on how to sort and branch elements and how to combine XML documents using XLST. This is a really useful topic if you want to access look up tables for data, and the example used in the book is creating a purchase order from different XML documents.
Chapter 8 shows ways to extend the basics of XSLT by providing examples of creating pie charts and graphics using XML and XSLT. Chapter 9 is the last main chapter of the book and it follows a case study which gets you to create a web page of links, a menu, a PDF and a zip file of the whole tutorial which can all be created by using XSLT.
The second half of ‘XSLT’ contains a great reference section, the first appendice covers all the elements defined in the XSLT specification. This is a great section as it offer more than just a definition of the elements, but it also contains some lengthy code examples so you can really understand the functionality of each element. The rest of the appendices covers the XPath reference, XSLT and Xpath function reference, and there is also an XLST guide which has a questions and answers section, at the end of the book there is also an XSLT glossary.
The ‘XSLT’ book is a great introduction to XSLT and it should teach you everything you need to know about the basics of XSLT, the second half of the book is also a great reference and one which you will pick up and use again and again.