Skip to Content
XSLT Cookbook, 2nd Edition
book

XSLT Cookbook, 2nd Edition

by Sal Mangano
December 2005
Intermediate to advanced content levelIntermediate to advanced
774 pages
19h 30m
English
O'Reilly Media, Inc.
Content preview from XSLT Cookbook, 2nd Edition

Chapter 16. Generic and Functional Programming

The brilliant moves we occasionally make would not have been possible without the prior dumb ones.

Stanley Goldstein

Introduction

This chapter renders all previous chapters moot. Okay, maybe that is a slight exaggeration. The fact is that the examples in previous chapters solve the particular problems they address. They are also useful for didactic purposes. If an example does not solve a problem you face, it might point the way to a solution. The desired solution could be a small modification of the code or a reapplication of the same techniques.

This chapter sets its goals a little higher. It presents examples that solve a very broad range of problems without requiring customization of the example’s core code. Those of you who are familiar with C++, and specifically the Standard Template Library (STL), already know the power you can obtain by creating generic code (generic algorithms) and reusing them in various contexts. Others who use functional programming languages (e.g., Lisp, ML, or Haskell) also know of the great power obtained through the creation of higher-order functions: general-purpose functions that are specialized by accepting special purpose functions as arguments. This chapter shows that XSLT, although not specifically designed as a generic or functional language, has inherent capabilities to enable similar usage.

Warning

The techniques used in this chapter stretch the abilities of XSLT quite a bit. Not everyone will ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XSLT Cookbook

XSLT Cookbook

Sal Mangano
XSLT, 2nd Edition

XSLT, 2nd Edition

Doug Tidwell
XSLT for Dummies

XSLT for Dummies

Richard Wagner
XSLT

XSLT

Doug Tidwell

Publisher Resources

ISBN: 0596009747Supplemental ContentErrata Page