1.6. Climbing 'Round the Family Tree: Addressing in XSLT

Navigation in XSLT and XPath involves addressing the various nodes with respect to their relationship with one another. If you put “tree” and “relationships” together, a logical inference is to use a tree analogy to model how members of a family are related. So, with XPath, the terminology for how one node is positioned in an XML document instance with respect to another is done in terms of family terminology, or a family tree.

A family tree traces one's parents, grandparents, and other ancestors. XML uses the same familial terminology to describe the relationships between the nodes of a document.

Up to this point, we have used tree representations to show the structure of elements in an ...

Get XSLT and XPATH: A Guide to XML Transformations 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.