Creating XPath Location Paths

You’re already familiar with the XPath way of thinking of documents; for example, it’s XPath that defines the seven types of document nodes:

  • The root node. The very start of the document. This node represents the entire document in XPath.

  • Element nodes. Represents an element in XPath trees, as bounded by a start and matching end tag, or a single empty element tag.

  • Attribute nodes. The value of an attribute after entity references have been expanded and surrounding whitespace has been trimmed.

  • Comment nodes. The text of a comment, not including <!-- and -->.

  • Namespace nodes. A namespace declaration. In XPath, a namespace node is added to each element for each active namespace, including default ones.

  • Processing ...

Get Inside XSLT 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.