XSLT, Second Edition: Mastering XML Transformations

Review by Bill Coan

965 Pages
by Doug Tidwell
O’Reilly Media, Inc.

You’ve got a friend in the transformation business

Doug Tidwell knows his stuff, loves his stuff, and is eager to share his stuff with you. His stuff is XML in general, but his authoritative and well-written new book, XSLT, Second Edition, focuses on the eXtensible Stylesheet Language for Transformations.

If you’re reading this review, you probably already know that transformations are the means by which XML files can be converted from one format to another and sliced, diced, sorted, ordered, linked, and/or combined with other XML files along the way. Or maybe you don’t already know that but you’ve heard that XSLT is a mysterious force with the power to convert XML data into html or pdf or scalable vector graphic format or other formats. Either way, Tidwell’s book will help you grasp and exploit the power of XML transformations.

Previous exposure to XML concepts will save you time and help you to get the most out of the book, but don’t worry if you’re a newbie, since Tidwell provides a concise description of XML basics near the front of the book. And don’t worry if you lack specialized tools for processing XSLT files: Tidwell thoughtfully provides download links and installation instructions for four popular XSLT processors (Xalan, Saxon, Microsoft XSLT Processor, and the Altova XSLT engine).

Nearly 600 pages of the book are devoted to appendixes filled with reference materials (about which, more later), but don’t be misled by that fact. Tidwell knows that reference materials are useless without orientation and understanding, and the first 300 pages of the book provide exactly that.

Tidwell also knows that your time is valuable, and so he starts you off easy but FAST. In less than 45 pages, he covers the basics and walks you through a “Hello World” example. If you’re new to XML or XSLT, the scales will fall from your eyes as you breeze through these pages.

From there,Tidwell devotes the next 100 pages to the two main activities of transformation: 1) teasing precise bodies of data from source files and 2)generating output in the desired format. By the time you get that far, you realize that you’re in very good hands, indeed. Tidwell builds your comfort level and your confidence as he goes along. He holds back the really gnarly stuff until last: branching and control elements, links and cross-references and, finally, sorting, grouping, and combining data.

It’s a very well organized approach, and the 300+ pages of orientation are exactly what you need in order to benefit from the reference materials in the appendixes. And what about those reference materials? More fantastic stuff: The XSLT reference covers all the references defined in the XSLT specification; the XPath reference covers key aspects of the XPath specification; other appendixes cover XSLT, XPath, and XQuery functions, XML Schemas, regular expressions, XSLT formatting codes, and migration from XSLT 1.0 to 2.0. (But NOTE: Changes brought about by XSLT 2.0 are discussed throughout the book, not limited to a single appendix entry.)

Even if you’re a Jedi Master of XSLT, you’ll be glad to have this book on your shelf for ready reference to the appendixes. If you rate yourself at an intermediate level of mastery, the chapters on advanced XSLT concepts will carry you to the next level. And if you’re just beginning, you’ll recognize Tidwell as a true friend in the transformation business. He will get you going in no time. The book is well organized, well written, and extremely well focused on its stated subject.