Chapter 16
Extending XSLT
In This Chapter
Discovering what extensions are
Using extension elements
Using extension functions
Making sure your stylesheets are portable
Y ou know how it is. You get a shiny, new digital gizmo that does 1,001 things for you, but not two weeks go by before you discover the 1,002nd task you really need this gizmo to do, really want it to do, but lo and behold, it cannot do this task. This same Murphy’s Law of Gizmos applies to XSLT: The language does 1,001 kinds of transformations, but sooner or later, you encounter a need that XSLT doesn’t provide a solution for as part of its basic language. Perhaps you need to use a while loop inside your template rule. Or maybe you need to compare nodes from two different node sets and are throwing up your arms trying to do it with XSLT alone. Before you X out XSLT, read on.
As with any new technology, there are gaps in what comes “in the box” with XSLT. Fortunately, you don’t have to wait on future versions of the language to solve the problem. Instead, XSLT supports extensions that allow you to expand the scope ...
Get XSLT for Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.