XPath Expression

Contact Us or call 1-877-932-8228
XPath Expression

XPath Expression

XPath expressions are statements used by an XSLT processor to produce a result in the form of one of the following:

  • node-set (set of one or more elements, attributes, or text nodes)
  • Boolean (true/false)
  • number
  • string

The table below explains some common terms used in XPath.

XPath Terminology
Term Definition
Context Node

The starting point for the expression. In XSLT, the context node is often (but not always) determined by the XPath in the match attribute of the xsl:template tag.

Current Node

Changes as an expression is evaluated. The next part of the expression uses the last current node as its context node.

Context Size

The number of nodes being evaluated at any point in an expression.

Proximity Position

The position of a node relative to other nodes in a node list. The proximity position of the first node in a node list is always one (1).

Next