WebReference.com - Excerpt from Inside XSLT, Chapter 2, Part 1
(1/4) Trees and Nodes When you're working with XSLT, you no
longer think in terms of documents, but rather in terms of
trees. A tree represents the data in a document as a set of
nodes-elements, attributes, comments, and so on are all treated
as nodes-in a hierarchy, and in XSLT, the tree structure follows
the W3C XPath recommendation (www.w3.org/TR/xpath). In this
chapter, I'll go through what's happening conceptually with
trees and nodes, and in Chapters 3 and 4, I'll give a formal
introduction to XPath and how it relates to XSLT. You use XPath
expressions to locate data in XML documents, and those
expressions are written in terms of trees and nodes. In fact,
the XSLT recommendation does not require conforming XSLT
processors to have anything to do with documents; formally, XSLT
transformations accept a source tree as input, and produce a
result tree as output. Most XSLT processors do, however, add
support so that you can work with documents. Fr