XSLT Cookbook

XSLT Cookbook

5.0 2
by Sal Mangano, Simon St. Laurent
     
 

View All Available Formats & Editions

Critical for converting XML documents, and extremely versatile, the XSLT language nevertheless has complexities that can be daunting. The XSLT Cookbook is a collection of hundreds of solutions to problems that Extensible Stylesheet Language Transformations (XSLT) developers regularly face. The recipes range from simple string-manipulation and mathematical

Overview

Critical for converting XML documents, and extremely versatile, the XSLT language nevertheless has complexities that can be daunting. The XSLT Cookbook is a collection of hundreds of solutions to problems that Extensible Stylesheet Language Transformations (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 your particular application's needs more precisely.Each recipe walks through a problem and a solution, with explanations of the choices made and techniques used in creating that solution, and many recipes include alternate solutions and explore issues like convenience and performance. Topics covered include:

  • String manipulation
  • Mathematical processing
  • Date and time handling
  • Interactions between calendar systems
  • Selecting content in source documents
  • Efficient tree-manipulation
  • Conversions from XML to plain text
  • Tweaking XML documents with stylesheets
  • Using XSLT to query XML documents
  • Generating HTML with XSLT
  • Creating charts and graphs with SVG and XSLT
  • Generating C and XSLT code using XSLT
  • Processing Visio documents in XSLT
  • Working with XML Topic Maps (XTM)
  • Using XSLT to create SOAP documentation from WSDL
  • Extending XSLT with additional functions
  • Embedding XSLT in other processing
  • Testing and debugging XSLT stylesheets
  • Creating generic XSLT processors which work on many XML vocabularies
The XSLT Cookbook provides 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. XSLT frequently offers a number of ways to perform a transformation, and the best solution may not always be the most straightforward. The recipes in this Cookbook demonstrate and explain XSLT's template-based logic, a frequent stumbling block for developers new to XSLT. Among the variety of XSLT books now available, none has the explicit solution-oriented approach of this Cookbook.

Product Details

ISBN-13:
9780596003722
Publisher:
O'Reilly Media, Incorporated
Publication date:
11/08/2002
Edition description:
Older Edition
Pages:
672
Product dimensions:
7.54(w) x 8.78(h) x 1.19(d)

Meet the Author

Sal Mangano has been developing software for over 12 years and has worked on many mission-critical applications, especially in the area of financial-trading applications. Unlike many XML/XSLT developers, he did not approach the technology from the standpoint of the Internet and Web development but rather from the broader need for a general-purpose, data-transformation framework. This experience has given him a unique perspective that has influenced many of the recipes in his book, the XSLT Cookbook. Sal has a Master's degree in Computer Science from Polytechnic University.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

XSLT Cookbook 4.5 out of 5 based on 0 ratings. 4 reviews.
Anonymous More than 1 year ago
Guest More than 1 year ago
Are you a developer? If you are, then this book is for you. Author Sal Mangano, has done an outstanding job of writing a 2nd edition of a book that offers hundreds of solutions to problems that developers regularly face in both versions 1.0 and 2.0. Mangano, begins by briefly explaining the greater sophistication and complexity of Xpath 2.0. Then, the author shows you that almost anything one wants to do with strings can be done within the confines of XSLT as well as, how the new features of 2.0 make it that much easier. The author then shows you how to push the limits of XSLT¿s mathematical capabilities, even though XSLT was not designed to be the next great Fortran replacement. Next, he describes date and time recipes that augment an area standard that XSLT 1.0 currently lacks. The author continues by exploring the problems XSLT was specifically designed to solve. Then, the author presents an overview of XSLT 2.0. Next, he provides recipes that control how text extracted from XML is rendered for layout on the terminal, on the text editor, or for import to programs that require delimited data, such as comma separated values. The author then covers XML transformations. Then, he presents a treasure trove of recipes that demonstrate XSLT as a query language. The author continues by demonstrating solutions to problems that arise when generating web content, including links, tables, frames, forms, and other client-side transformation issues. Then, he describes the transformation of raw data into bar charts, pie charts, line plots, and other graphical components. Next, the author shows you the advantage gained from representing the data that drives code generation in XML and illustrates how XSLT is ideal for writing code generators for C++, Java, and XSLT itself. He also includes some advance uses of XSLT. The author continues by providing extensive coverage of XSLT extensibility using Java and JavaScript. Then, he demonstrates useful techniques that can help you transform misbehaved XSLT programs into functional ones, even if you don¿t have a nature XSLT debugger handy. Finally, he pushes the XSLT envelope to show how XSLT is far more than just another styling language. This most excellent book has recipes that range from simple string manipulation and mathematical processing to more complex topics such as extending XSLT, testing and debugging XSLT stylesheets, and creating graphics with SVG. More importantly, the recipes in this book will guide you through many different ways of applying XSLT.
Guest More than 1 year ago
Buy it. Read it. Use it. Prosper. If your doing XSLT it is simply that good.
Guest More than 1 year ago
The O¿Reilly Cookbook series is a great place to find answers to really hard problems. I like the series because I can go to the ¿cookbook¿ subject I¿m having trouble with, leaf through a few pages, and see an answer to a problem that is similar to my own. The XSLT Cookbook is very similar in structure to the other ¿cookbooks¿, but with an XSLT flavor. After going through the various recipes in this book, I can honestly say that I am amazed at the kind of things you can do with just XSLT. You can do more than just reformat XML to look nice on an HTML page¿you can even use it to calculate statistical functions! Even if you¿re not planning on calculating a combinatoric, just looking through some of these patterns will make you a better XSLT programmer. One nice thing this book provides beyond the recipes is a discussion on how to extend XSLT via SAXON or Java. There is also discussion on how to use XSLT via Perl or Java. I was very impressed by the amount of time and thought that was put into the creation of many of these recipes¿not only are many of them really, really hard to do, but they¿re also things I¿ve seen a real need for in the real world. XSLT programmers, do yourself a favor and take a look through this book before you hurt your brain with your next assignment.