1.3. What Is XPath?

XSLT is rarely discussed without a reference to XPath.[3] XPath is a separate recommendation from the W3C that uses a simple path language to address parts of an XML document. Although XPath is used by other W3C recommendations, there is hardly a use for XSLT that does not involve XPath. Generally speaking, XSLT provides a series of operations and manipulators, while XPath provides precision of selection and addressing.

[3] Both XSLT and XPath became full recommendations on the same day, November 16, 1999.

1.3.1. The XSLT Stylesheet

This structured hierarchy of elements for the book in Figure 1-1 is a useful way to begin to understand how XSLT stylesheets work. Figure 1-2 represents the same tree structure, only here it reflects some basic components of an XSLT stylesheet.

Figure 1-2. Tree representation of a basic XSLT stylesheet.


The use and explanation of these components will be provided in more detail later in this chapter, but what is important to stress here is that XSLT is XML, and has the same overall structure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset