Sebastopol, CA--Choosing a recipe from an unfamiliar cookbook is something of a die toss--you can't always be sure what the end result will be. Few chefs are willing to trust their success to aleatory probability (which can only work in your favor so often) and depend, rather, on one or two trustworthy books from the collection on their shelves, especially when trying new techniques. Likewise, when success is favored over surprise, programmers also turn to their tried and true resources. Users of Extensible Stylesheet Language Transformations, or XSLT, who would like to employ ready-made solutions to the challenges they face, and master the technology along the way, will find that the XSLT Cookbook by Sal Mangano (O'Reilly, US $39.95) soon earns that "trusted" position on their shelves.
Mangano's enthusiasm for discovering just what XSLT can do led him to create this collection of practical recipes. Mangano explains: "XSLT is gaining quite a bit of momentum and there is already a proposed version 2.0. However, I've found that a large number of developers who could benefit from XSLT have yet to embrace it. Rather they use Java, Perl, or Python with SAX or DOM extensions. Although this is a reasonable strategy, there are many tasks that can be done quicker and better with XSLT. I hope that this book will decrease the XSLT learning curve by providing a set of ready-to-use recipes that can be customized for particular needs.
"One of my goals in writing this book was to show how XSLT is relevant to a wide variety of problems," Mangano adds. "I also want to provide both novice and intermediate users of XSLT a one-stop shopping place for some of the most commonly requested XSLT techniques. Finally, I want to push the envelope of what one can do with XSLT so current users can go even further and the unconvinced can join the fold of highly productive XML transformers."
The "XSLT Cookbook" contains hundreds of solutions to problems that XSLT developers regularly face. The recipes range from simple string-manipulation and mathematical processing to more complex topics like extending XSLT, testing and debugging XSLT stylesheets, and graphics creation with SVG. Recipes can be run directly or tweaked to fit a particular application's needs more precisely. Each recipe walks through the problem and solution, with explanations of the choices made and techniques used in creating that solution. Some of the topics covered are:
- String manipulation, mathematical processing, and date-and-time handling
- Interactions between calendar systems
- Selecting content in source documents and converting from XML to plain text
- Efficient tree manipulation and XML document tweaking
- Using XSLT to query XML documents
- Generating HTML, C, and XSLT code using XSLT
- Creating charts and graphs with SVG and XSLT
- Processing Visio documents in XSLT
- Working with XML Topic Maps (XTM)
- Using XSLT to create SOAP documentation from WSDL
- Extending and embedding XSLT with additional functions
- Testing and debugging XSLT stylesheets
- Creating generic XSLT processors that work on many XML vocabularies
The "XSLT Cookbook" is an ideal companion both for developers still figuring out XSLT's template-based approach who want to learn by example, and for developers who know XSLT and want a collection of quickly reusable recipes. Among the variety of XSLT books now available, none has the explicit solution-oriented approach of this Cookbook.
Additional Resources:
Chapter 7, Querying XML, is available free online
More information about the book, including Table of Contents, index, author bio, and samples
XSLT Cookbook
Sal Mangano
ISBN 1-596-00372-2, 654 pages, $39.95 (US), $61.95 (CAN), 28.50 (UK)
order@oreilly.com
1-800-998-9938; 1-707-827-7000
About O’Reilly
O’Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O’Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurring their adoption by amplifying “faint signals” from the alpha geeks who are creating the future. An active participant in the technology community, the company has a long history of advocacy, meme-making, and evangelism.