XSLT documents a core technology for processing
XML. Originally created for page layout, XSLT (Extensible
Stylesheet Transformations) is now much more: a
general-purpose translation tool, a system for reorganizing
document content, and a way to generate multiple results--
such as HTML, WAP, and SVG--from the same content.
What sets XSLT apart from other books on this
critical tool is the depth of detail and breadth of
knowledge that Doug Tidwell, a developer with years of XSLT
experience, brings to his concise treatment of the many
talents of XSLT. He covers XSLT and XPath, a critical
companion standard, and addresses topics ranging from basic
transformations to complex sorting and linking. He explores
extension functions on a variety of different XSLT
processors and shows ways to combine multiple documents
using XSLT. Code examples add a real-world dimension to
each technique.
Useful as XSLT is, its peculiar characteristics make it
difficult to get started in, and the ability to use
advanced techniques depends on a clear and exact
understanding of how XSLT templates work and interact. For
instance, the understanding of "variables" in XSLT is
deeply different from the understanding of "variables" in
procedural languages. The author explains XSLT by building
from the basics to its more complex and powerful
possibilities, so that whether you're just starting out in
XSLT or looking for advanced techniques, you'll find the
level of information you need.
Table of Contents
Preface
Chapter 1. Getting Started
The Design of XSLT
XML Basics
Installing Xalan
Summary
Chapter 2. The Obligatory Hello World
Example
Goals of This
Chapter Transforming Hello World
How a Stylesheet Is Processed
Stylesheet Structure
Sample Gallery
Summary
Chapter 3. XPath: A Syntax for Describing
Needles and Haystacks
The XPath Data Model
Location Paths
Attribute Value Templates
XPath Datatypes
The XPath View of an XML Document
Summary
Chapter 4. Branching and Control
Elements
Goals of This Chapter
Branching Elements of XSLT
Invoking Templates by Name
Parameters
Variables
Using Recursion to Do Most Anything
A Stylesheet That Emulates a for Loop
A Stylesheet That Generates a Stylesheet That Emulates a
for Loop
Summary
Chapter 5. Creating Links and
Cross-References
Generating Links with the id() Function
Generating Links with the key() Function
Generating Links in Unstructured Documents
Summary
Chapter 6. Sorting and Grouping
Elements
Sorting Data with <xsl:sort>
Grouping Nodes
Summary
Chapter 7. Combining XML Documents
Overview
The document() Function
Invoking the document() Function
More Sophisticated Techniques
Summary
Chapter 8. Extending XSLT
Extension Elements, Extension Functions, and Fallback
Processing
Extending the Saxon Processor
More Examples
Summary
Chapter 9. Case Study: The
Toot-O-Matic
About the Toot-O-Matic
Design Goals
Tutorial Layout
XML Document Design
XSLT Source Code
Summary
Appendix A. XSLT Reference
Appendix B. XPath Reference
Appendix C. XSLT and XPath Function
Reference
Appendix D. XSLT Guide
Glossary
Index