USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Book Review: XSLT / Doug Tidwell

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Reviews and Interviews
View previous topic :: View next topic  
Author Message
crouse
Site Admin


Joined: 17 Apr 2024
Posts: 11833
Location: Iowa

PostPosted: Tue Nov 16, 2024 5:27 am    Post subject: Book Review: XSLT / Doug Tidwell Reply with quote



Reviewer: Stuka
The book: XSLT
Author: Doug Tidwell
Publisher: O'Reilly
ISBN: 0-596-00053-7
Price: $39.95

Book link: http://www.oreilly.com/catalog/xslt/
Sample chapter: http://www.oreilly.com/catalog/xslt/chapter/ch05.html

XSLT:
Being a big fan of only doing work once, the premise of XSLT, the Extensible Stylesheet Language for Transformations, is an irresistible draw – create your data once, in a well-defined XML format, then use XSLT to transform the data into various formats, including HTML, PDF, or any arbitrary (possibly proprietary) protocol.

Doug Tidwell's XSLT: Mastering XML Transformations is an excellent way to quickly dive into XSLT. Tidwell starts off with some basics – what XSLT is, why it's useful, what tools can be used with it, and how to get a basic XSLT processing system up and running. Chapter 2, appropriately titled “The Obligatory Hello World Example”, contains what its name indicates, along with a thorough walk-through of how the stylesheet and XML document are processed by the XSLT tools. Tidwell then provides several more XSLT variations on the Hello, World theme, converting the same XML file into HTML (the original example), PDF, VRML, SVG, and even a Java Hello World program.

Next up is a study of XPath, the language used to choose specific elements within an XML document. Chapter 3 tells you how to pick out elements, attributes, or whatever other bits of info you need to properly transform your XML into the desired target format.

Chapter 4 is probably the most interesting, as it covers all the branching, conditional logic, and other control-flow statements and techniques of XSLT transformations. This section is particularly critical for programmers steeped in procedural languages, as XSLT owes much of its nature to the functional programming paradigm. Tidwell makes thorough use of examples to show you how to do all the things you might need, from simple if/then branches, to recursive emulations of the popular for loop we've all written a million times. Explicitly calling templates, and passing parameters to them, is also covered, adding new forms of flexibility to the stylesheets you can create.

Chapters 5 through 7 go deeper into the advanced functionality of XSLT, covering the automatic creation of links and cross-references, sorting and grouping data, and combining multiple input documents into a single output document respectively. As with previous chapters, Tidwell gives thorough examples, and walks through them carefully, so that you can really see how to make these features work to your advantage.

Extending the XSLT engines, and utilizing extensions other developers have added, and what to do if the extension you want is unavailable, consume chapter 9. Tidwell shows how to use various extensions to connect to a database, edit JPEG graphics files, and create SVG pie charts on the fly using extensions already created for the Xalan and Saxon XSLT processors.

The final 'real' chapter of this in-depth examination of XSLT is a case study of the Toot-O-Matic, which Tidwell developed for IBM's developerWorks site. This tool takes a tutorial, created in a standard XML format, and creates 4 different versions of it for various audiences – an online HTML version, 2 PDF versions (letter and A4 sized), and a .zip version for offline perusal. The HTML version also has common navigation elements, and other niceties you'd expect from a website with ibm.com in the URL, so studying the Toot-O-Matic is an excellent way to see a lot of really fancy techniques in action.

The final third or so of the book contains reference material for XSLT, XPath, and the functions available for them – invaluable material for use in an ongoing fashion.

All in all, Doug Tidwell's XSLT is an excellent book for someone with a decent programming background, a base knowledge of XML, and a desire to learn XSLT. It's very fast-paced, and very hands-on, with lots and lots of XSLT code to read and learn from. With this book, and a set of XSLT tools (many of which are readily pointed out by the author), you'll be up and running in the XSLT world in no time flat.



_________________
Veronica - Arch Linux 64-bit -- Kernel 2.6.33.4-1
Archie/Jughead - Arch Linux 32-bit -- Kernel 2.6.33.4-1
Betty/Reggie - Arch Linux (VBox) 32-bit -- Kernel 2.6.33.4-1
BumbleBee - OpenSolaris-SunOS 5.11
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Reviews and Interviews All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse