OptionalnodeThe current context node being evaluated.
OptionalpositionThe position of the context node within the current node set (1-based). Used by position() function and numeric predicates.
OptionalsizeThe size of the current node set. Used by last() function.
OptionalnodeThe full node list for the current context. Used by the 'self-and-siblings' axis (XSLT-specific).
OptionalvariablesVariable bindings available during evaluation. Variables are referenced in XPath as $variableName.
OptionalfunctionsCustom functions available during evaluation. These extend the built-in XPath 1.0 function library.
OptionalnamespacesNamespace bindings for resolving prefixes in XPath expressions. Maps namespace prefixes to namespace URIs. Example: { "atom": "http://www.w3.org/2005/Atom" }
OptionalxsltXSLT version ('1.0', '2.0', '3.0') for version-specific behavior. Used by functions like json-to-xml() which are only available in XSLT 3.0+
OptionalxpathXPath specification version being used. Default: '1.0'
This affects:
Optionalxpath10Enable XPath 1.0 backward compatibility mode (Phase 8.1). When true, XPath 2.0+ expressions follow XPath 1.0 type conversion rules. This enables:
OptionaldefaultDefault collation for string comparisons (XPath 2.0+). Default: Unicode codepoint collation
OptionalbaseBase URI for resolving relative URIs (XPath 2.0+).
OptionalimplicitImplicit timezone as duration offset from UTC (XPath 2.0+). Example: '-PT5H' for US Eastern Time (UTC-5)
OptionalextensionsExtension data for XSLT or custom implementations. This allows attaching arbitrary data to the context without polluting the main interface.
OptionalcurrentCurrent dateTime in the dynamic context (XPath 2.0+). Returned by fn:current-dateTime(). If not provided, defaults to system time when accessed.
OptionalavailableAvailable documents mapping for fn:doc() function (XPath 2.0+). Maps document URIs to their root document nodes. Example: { "http://example.com/data.xml": rootNode }
OptionalavailableAvailable collections mapping for fn:collection() function (XPath 2.0+). Maps collection URIs to sequences of nodes. Example: { "http://example.com/collection": [node1, node2, ...] }
OptionaldefaultDefault collection URI when fn:collection() is called without arguments (XPath 2.0+). If provided, fn:collection() returns availableCollections[defaultCollection].
OptionalfunctionFunction implementations registry (XPath 2.0+). Maps QName function names to their implementations. Allows defining custom/XSLT functions at evaluation time. Format: "localName" or "prefix:localName"
The evaluation context for XPath expressions.
This context is passed to all expression evaluate() methods and contains: