O’Reilly Media releases ‘XSLT, Second Edition’
Posted by Dave Merten
Jul 17, 2008 at 10:22am
XML went from a strange new idea to entrenched buzzword in record time. Its flexibility as a language for presenting structured data made it the lingua franca for sending data across the web.
Early adopters used a number of programming interfaces, such as the Document Object Model (DOM) and the Simple API for XML (SAX) to parse and process it, but as XML became mainstream, it was clear that the average web user couldn’t be expected to hack Java, VB, Perl, or Python code simply to make sense of XML documents. “What was needed was a flexible, powerful, yet relatively simple language capable of processing XML,” says Doug Tidwell, author of XSLT, Second Edition. “What the world needed was XSLT.”
And so, XSLT was born from the need to separate content from presentation on the web. It is a powerful language for transforming XML documents into something else. “That something else can be an HTML document, another XML document, a Portable Document Format (PDF) file, a Scalable Vector Graphics (SVG) file, a Virtual Reality Modeling Language (VRML) file, Java code, a flat text file, a JPEG file, or most anything you want,” explains Tidwell. “You write an XSLT stylesheet to define the rules for transforming an XML document, and the XSLT processor does the work.”
In January, 2007, after much anticipation and delay, the W3C finally released the XSLT 2.0 standard. The new, second edition of this classic book offers practical examples that demonstrate how you can apply XSLT stylesheets to XML data using either the new specification, or the older XSLT 1.0 standard.
XSLT provides a thorough understanding of XSLT and XPath and their relationship to other web standards, along with recommendations for a honed toolkit in an open platform-neutral, standards-based environment. The book:
• Covers the XSLT basics, including simple stylesheets and methods for setting up transformation engines
• Walks readers through the many parts of XSLT, particularly XSLT’s template-based approach to transformations
• Applies both XSLT 1.0 and 2.0 solutions to the same problems, helping readers to decide which version of XSLT is more appropriate for their projects
• Includes profuse examples that complement both the tutorial and the reference material
Tidwell says that the best review he received for the first edition of his book began, “I will never read this book.” This was actually a positive review, as the reviewer went on to explain: “When I have a problem, I grab this book off the shelf, go to the index, and within five minutes, I’ve found the answer to my problem. Then I toss it back on the shelf.”
And according to Tidwell, that’s exactly the type of book he’s tried to write. “There are hundreds of stylesheets in the book, including examples for every XSLT element, function, and operator defined by XSLT and XPath,” he says. “The first chapters of the book are prose that explain how stylesheets work and what you need to learn to be productive with XSLT. Once you’re comfortable with that material, you can use the rest of the book as a dictionary-style reference.”
MacOSG members get a 35% discount off all O’reilly Media books. To get your discount code, just go here. Also, listen to the MacOSG Podcast, and if your member name is drawn, you can receive this book free! (see official rules) If you’re not a member yet, you can join here.
Article Information
Comment on this Article Print this Article Email this Article Digg This
Contributor
Dave Merten
Dave was one of the founding guides at ‘The Mining Company,’ now known as About.com, in February 1998. Dave was their ‘Focus on Mac Support’ guide. In 2004 he started ‘G5 Owners Support Group,’ and in 2005, renamed it ‘Mac Owners Support Group.’ In 2006, he started the ‘MacOSG Support Corner’ column here at Macsimum News.
View Dave Merten's Articles





