Chapter 3
Transforming with Style (Stylesheets, That Is)
In This Chapter
Introducing stylesheets
Constructing a stylesheet
Assigning namespaces
Looking at XML documents as trees
X SLT plays in a sandbox called a stylesheet, and you stay within that sandbox for the rest of this book. You could skip across this sandbox with childlike fervor, but that would be messy and get sand everywhere. I suggest taking off your shoes and taking one step (or building one part of your castle) at a time. This way, you can divide and conquer the three major areas of XSLT: stylesheets, template rules, and XPath patterns. And that step-by-step approach is exactly the goal of the next three chapters.
In this chapter, you start off by finding out about stylesheets and focusing on the major issues related to stylesheets as a whole.
Structure of a Stylesheet
An XSLT stylesheet has a well-defined structure. Perhaps the easiest way to make sense of this structure is to compare it to something you are familiar with already, such as an ordinary document.
A document is made up of one or more paragraphs. A ...
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.