Each XSL Pattern query is evaluated relative to a single node or context for the query. XSL Patterns also define operators and methods that can change the context as a prelude to performing the query.
Context Changing Operators and Methods
.. | Change the context of the query or filter to the node that is the parent of the current context. |
/ | Change the context of the query or filter to the root node of the document. |
// | Change the context of the query or filter to the root node of the document; selection of children is by recursive descent. |
ancestor | Change the context of the query or filter to the node that is the nearest ancestor of the current context that matches the pattern. |
context | Retrieve nodes relative to the node at which the query starts. |
id | Change the context of the query or filter to the node that has the requested ID. |
Remarks
The context changing operators and methods above must appear to the left of any / or // operators, or as the first term in a filter pattern.