About xpath:

Plexippus XPath is an XPath 1.0 implementation for Common Lisp.

About xpath-sys:

The XPATH-SYS package provides an API for extensions to Plexippus XPath.

About xpattern:

The XPATTERN package implements pattern matching compatible with XSLT 1.0.

Contents

Using XPath

Almost all uses of XPath involve the evaluate function, which can parse, compile, and invoke XPath expressions.

Function evaluate (xpath context &optional unordered-p)
Arguments:
  • xpath -- an XPath expression
  • context -- an XPath context
  • unordered-p -- specify true to get unordered node-set
Returns:
the result of evaluating xpath within the context
Details:
Evaluates an XPath expression

xpath can be a string, a sexpr-based XPath epression or a compiled expression. The context can be obtained using make-context. As an alternative, a node can be specifed.

If unordered-p is false (default) and value being returned is a node-set, it will be sorted using sort-node-set so its nodes will be in document order. If unordered-p is true, the order of the nodes is unspecified. Unordered mode can be significantly faster in some cases (and never slower).
See also:

Macro xpath (form)
Arguments:
  • form -- a sexpr-based XPath form
Returns:
a list consisting of symbol XPATH and the form
Details:
This macro is used to specify sexpr-based XPath expression for evaluate
See also:

Compiling XPath dynamically

compile-xpath allows the compilation of XPath into a closure ahead of time, so that evaluate only needs to invoke that closure rather than having to re-compile it first.

Although evaluate itself already performs caching of compiled closures, explicit precompilation can aid optimizations if one call site uses multiple XPath expressions.

Explicit compilation using compile-xpath is also required when using custom environment classes, since evaluate compiles expressions using the dynamic environment only.

parse-xpath can be used to translate the standard string representation of XPath into a Plexippus-specific sexp representation. Both compile-xpath and evaluate accept sexps instead of strings.

Function parse-xpath (str)
Arguments:
  • str -- a string
Returns:
a s-expression-based XPath expression
Details:
Parses a string-based XPath expression into s-expression-based one.

Function compile-xpath (xpath &optional (environment (make-dynamic-environment *dynamic-namespaces*)))
Arguments:
  • xpath -- an XPath expression
Returns:
a compiled XPath expression
Details:
Compiles an XPath expression

The xpath expression is compiled using current environment if it isn't compiled yet. xpath can be a string, a sexpr-based XPath epression or a compiled expression. In the latter case xpath argument value itself is returned.

Type coercion

These correspond to the XPath functions boolean(), string(), and number(). In addition, node-set-value is provided, which turns nodes into node sets.

Function boolean-value (value)
Arguments:
  • value -- value of an XPath-supported type or an XML node
Returns:
an XPath boolean
Details:
Returns the value of XPath boolean() function.

For XML nodes returns the value of XPath boolean() function applied to the result of calling string-value for the specified value.
See also:

Function string-value (value)
Arguments:
  • value -- value of an XPath-supported type or an XML node
Returns:
an XPath string
Details:
Returns the value of XPath number() function.

For XML nodes returns the value of xpath-protocol:node-text applied to the specified value.
See also:

Function number-value (value)
Arguments:
  • value -- value of an XPath-supported type or an XML node
Returns:
an XPath number
Details:
Returns the value of XPath number() function.

For XML nodes returns the value of XPath number() function applied to the result of calling string-value for the specified value.
See also:

Function node-set-value (value)
Arguments:
  • value -- value of an XPath-supported type or an XML node
Returns:
a node set
Details:
Returns the value of XPath node-set() function.

For XML nodes returns a node set consisting of the single node specified by value.

The dynamic environment

The default enviroment used by evaluate is the dynamic environment, backed by information bound in dynamic variables. The following macros are used to bind these variables. They have dynamic scope. (The dynamic environment is currently not capable of dynamic declarations for variables, but can be used with extension functions that are declared globally.)

(The XPATH-SYS defined an environment protocol for user-defined environment classes.)

Macro with-namespaces ((&rest bindings) &body body)
Arguments:
  • bindings -- bindings in the form (PREFIX VALUE). PREFIXes and VALUEs are evaluated
Returns:
the tresult of evaluating body
Details:
Provides namespace bindings for XPath compilation

Namespace bindings are used for compilation of XPath expressions. nil is equivalent of "" prefix. Bindings provided by this macro have dynamic scope.

Macro with-variables ((&rest bindings) &body body)
Arguments:
  • bindings -- bindings in the form (QNAME VALUE). QNAMEs and VALUEs are evaluated
Returns:
the tresult of evaluating body
Details:
Provides bindings for XPath variables

Variable bindings are used for evaluation of compiled XPath expressions. Bindings provided by this macro have dynamic scope.

The run-time context

Instead of passing a node to evaluate, user code can construct a full context object.

The context object specifies values to be returned by position(), current(), and last().

Class context
Superclasses:
common-lisp:standard-object, sb-pcl::slot-object, common-lisp:t
Documented Subclasses:
None
Details:
Represents XPath context

Function make-context (node &optional (size 1) (position 1) (starting-node node))
Arguments:
  • node -- an XML node
  • size -- context size, a non-negative integer or a function without arguments returning non-negative integer
  • position -- context position, a positive integer
Details:
Makes a context object.
See also:

Function context-node (context)
Arguments:
  • context -- an XPath context
Returns:
an XML node
Details:
Returns the context node of the XPath context.

Function context-starting-node (context)
Arguments:
  • context -- an XPath context
Returns:
an XML node
Details:
Returns the node for which the whole XPath expression is evaluated.

Function context-position (context)
Arguments:
  • context -- an XPath context
Returns:
a positive integer
Details:
Returns the current position of the XPath context.

Function context-size (context)
Arguments:
  • context -- an XPath context
Returns:
a non-negative number
Details:
Returns the size of context If the context size was specified as a function, the result of calling that function is returned.

Node sets

Node sets are the XPath data type used to represent the results of evaluations that select multiple nodes. As sets, they never contain duplicates.

In addition to the high-level functions defined here, the XPATH-SYS package defined several low-level node set functions. Please also refer to the description there for details on node set order.

Function first-node (node-set)
Arguments:
Returns:
a node-set or nil
Details:
Returns the first node in the node-set or nil if it's empty.
See also:

Function all-nodes (node-set)
Arguments:
Returns:
a list of nodes
Details:
Returns all nodes of the node-set as a list.
See also:

Function map-node-set (func node-set)
Arguments:
  • func -- a function
  • node-set -- a node-set
Returns:
nil
Details:
Calls func for each node in node-set

The operation is performed lazily, i.e. if it's terminated via a non-local exit it doesn't necessarily cause the XPath engine to find out all nodes in the node-set internally.
See also:

Function map-node-set->list (func node-set)
Arguments:
  • func -- a function
  • node-set -- a node-set
Returns:
a list
Details:
Calls func for each node in node-set and conses up a list of its return values

The operation is performed lazily, i.e. if it's terminated via a non-local exit it doesn't necessarily cause the XPath engine to find out all nodes in the node-set internally.
See also:

Macro do-node-set ((var node-set &optional result) &body body)
Arguments:
  • var -- symbol, a variable name
  • node-set -- a node-set
  • result -- a form
Returns:
the result of evaluating result
Details:
Executes body with var bound to successive nodes in node-set

The operation is performed lazily, i.e. if it's terminated via a non-local exit it doesn't necessarily cause the XPath engine to find out all nodes in the node-set internally.

Returns nil if result form isn't specified.
See also:

Function make-node-set-iterator (node-set)
Arguments:
Returns:
a node-set iterator
Details:
Creates a node set iterator for node-set

Node set iterators can be used to iterate over node-sets. This can be done without causing the XPath engine to find out all their nodes and using non-local exits.
See also:

Function node-set-iterator-end-p (iterator)
Arguments:
Returns:
a generalized boolean
Details:
Returns true if iterator points to the end of its node set
See also:

Function node-set-iterator-next (iterator)
Arguments:
Returns:
the value of iterator
Details:
Advances iterator if it's not at the end of its node set, does nothing otherwise.
See also:

Function node-set-iterator-current (iterator)
Arguments:
Returns:
a node or nil
Details:
Returns current node of iterator or nil if it's at the end of its node set.
See also:

Function node-set-p (object)
Arguments:
  • object -- a value of any type
Returns:
a generalized boolean
Details:
Returns true if object is a node-set
See also:

Function node-set-empty-p (node-set)
Arguments:
  • node-set -- a node-set
Returns:
a generalized boolean
Details:
Returns true if node-set is empty

Function list->node-set (list)
Arguments:
  • list -- a list of nodes
Returns:
Details:
Makes a node-set from the list of nodes.
See also:

Function sort-node-set (node-set)
Arguments:
  • node-set -- a node set
Returns:
a sorted version of node-set
Details:
Sorts the node-set according to document order.

Miscellaneous

Other useful functions, variables, and classes:

Macro with-plx-extensions (&body body)
Details:
Binds plx prefix to Plexippus XPath extensions namespace.

The following functions are currently available:

plx:matches(string, pattern, flags?)
Returns true if string is matched by regular expression pattern, false otherwise. Optional flags specify modifiers (i, m, s). CL-PPCRE is used as regular expression engine.

plx:replace(string, pattern, replacement, flags?)
Returns string with all matches of regular expression pattern replaced with replacement. Optional flags specify modifiers (i, m, s).

plx:current()
Returns a node-set consisting of one node which was specifed as context node for expression evaluation. Analagous to current() function of XSLT.

plx:generate-id(node-set?)
Returns an alphanumeric string that uniquely identifies the first node of the node-set (or context node if node-set isn't specified) within its document. Analagous to generate-id() of XSLT.
See also:

*navigator*
Class xpath-error
Superclasses:
common-lisp:simple-error, common-lisp:simple-condition, common-lisp:error, common-lisp:serious-condition, common-lisp:condition, sb-pcl::slot-object, common-lisp:t
Documented Subclasses:
None
Details:
The class of all xpath errors.

Other functions in xpath

Function evaluate-compiled (compiled-xpath context &optional unordered-p)
Arguments:
  • compiled-xpath -- a compiled XPath expression
  • context -- an XPath context
  • unordered-p -- specify true to get unordered node-set
Returns:
the result of evaluating compiled-xpath within the context
Details:
Evaluates a compiled XPath expression returned by compile-xpath

The context can be obtained using make-context. As an alternative, a node can be specifed.

If unordered-p is false (default) and value being returned is a node-set, it will be sorted using sort-node-set so its nodes will be in document order. If unordered-p is true, the order of the nodes is unspecified. Unordered mode can be significantly faster in some cases (and never slower).
See also:

Function xpath-error (fmt &rest args)
Arguments:
  • fmt -- format control string
  • args -- format arguments
Details:
Signals the xpath-error condition with specified message.
See also:

Other classes in xpath

Class node-set
Superclasses:
common-lisp:standard-object, sb-pcl::slot-object, common-lisp:t
Documented Subclasses:
None
Returned by:
Details:
Represents an XPath node set


Other variables in xpath

Variable *navigator*

No documentation string. Possibly unimplemented or incomplete.


Pipes

Pipes are lazy lists, inspired by their implementation in Norvig's 'Paradigms of Artificial Intelligence Programming'.

Macro make-pipe (head tail)
Arguments:
  • head -- pipe head (evaluated)
  • tail -- tail expression
Returns:
a pipe
Details:
Constructs a pipe (lazy list).

The head expression is evaluated immediatelly. The value of head will be returned by pipe-head called for the pipe object returned by make-pipe. Evaluation of tail expression is delayed until pipe-tail is called for the pipe returned by this function. Evaluation of tail expression should produce a pipe or a list.
See also:

Function pipe-head (pipe)
Arguments:
  • pipe -- a pipe
Returns:
an object
Details:
Returns the head of the pipe.

Function pipe-tail (pipe)
Arguments:
  • pipe -- a pipe
Returns:
an object
Details:
Returns the tail of the list.

First time pipe-tail is called it causes pipe tail expression to be evaluated and remembered for later calls.

Node sets

Node sets are the XPath data type used to represent the results of evaluations that select multiple nodes. As sets, they never contain duplicates. Conceptually, they are unordered, with the most important order defined on them being the document order.

As a data structure though, node sets are backed by a pipe, and the order of elements in that pipe is well-documented: By default, the pipe of returned node sets is sorted into document order. When unordered results are requested, the order is usually not specified, but in some cases, are already sorted according to the axis being queried, which is usually sorted either in document order,or in reverse document order. See xpath:evaluate for the unordered argument.

Function make-node-set (pipe &optional (ordering unordered))
Arguments:
  • pipe -- a pipe
  • ordering -- one of :document-order, :reverse-document-order, :unordered
Returns:
a node set
Details:
Makes a node set containing nodes from the pipe with specified ordering.

Function pipe-of (node-set)
Arguments:
  • node-set -- a node set
Returns:
a pipe
Details:
Returns the pipe that contains the elements of the node-set.

Implementing environments

Environments provide compilation-time configuration for XPath. An environment is a CLOS object, which is queried by the compiler using generic functions that users can implement on their own subclasses of xpath::environment.

The default environment class implements a `dynamic' environment, backed by information bound in dynamic variables, so that typical uses of XPath work without special environment classes.

Function environment-find-namespace (environment prefix)
Arguments:
  • environment -- an XPath environment object
  • prefix -- prefix part of a QName
Details:
Returns namespace URI for specified prefix.

Function environment-find-variable (environment local-name uri)
Arguments:
  • environment -- an XPath environment object
  • local-name -- local part of expanded-name of the function
  • uri -- namespace URI of the function
Returns:
XPath variable "thunk"
Details:
Finds an XPath variable by local-name and uri.

XPath variable is represented by a "thunk". A "thunk" is a function that takes an instance of context as its argument and returns the value of one of XPath types.
See also:

Function environment-find-function (environment local-name uri)
Arguments:
  • environment -- an XPath environment object
  • local-name -- local part of expanded-name of the function
  • uri -- namespace URI of the function
Returns:
an XPath function or nil if it cannot be found
Details:
Finds an XPath function by local-name and uri.

XPath function is a Lisp function that takes zero or more "thunks" as its arguments (corresponding to XPath expressions passed as function arguments) and returns a new "thunk". A "thunk" is a function that takes an instance of context as its argument and returns the value of one of XPath types.
See also:

Defining extension functions

XPath defines built-in functions in the empty namespace. Using the extension API, user code can implement XPath functions addressed using other namespaces.

Macro define-extension (name uri &optional documentation)
Arguments:
  • name -- the name of XPath extension (a symbol)
  • uri -- URI corresponding to XPath extension (a string)
  • documentation -- documentation string for the XPath extension
Details:
Defines an XPath extension with specified name and uri.

An XPath extension is a collection of XPath functions that are defined using one of define-xpath-function/lazy, define-xpath-function/eager or define-xpath-function/single-type macros. In order to use the extension, one must bind a prefix string to its uri using with-namespaces macro.

Example:
   (defparameter *my-namespace* "http://example.net/my-xpath-extension")

(xpath-sys:define-extension my-ext *my-namespace* "My Extension")

(xpath-sys:define-xpath-function/single-type my-ext add-quotes string (string) (concat "\"" string "\""))

(defun get-my-quoted-string(doc) (with-namespaces (("my" *my-namespace*)) (evaluate "add-quotes(//some-element)" doc)))
See also:

Macro define-xpath-function/lazy (ext name args &body body)
Arguments:
  • ext -- name of an XPath extension (a symbol)
  • name -- XPath function name
  • args -- XPath function arguments
Details:
Defines an XPath function, "lazy" style.

The body is evaluated during compilation of XPath expressions each time the function being defined is referenced. It's passed a list of "thunks" corresponding to XPath function arguments and should return a new "thunk". A "thunk" is a function that takes an XPath context as argument and returns value of one of XPath types (string, boolean, number, node set).

Example:
   (define-xpath-function/lazy my-ext my-if (v if-part else-part)
     #'(lambda (ctx)
         (if (boolean-value (funcall v ctx))
             (funcall if-part ctx)
             (funcall else-part ctx))))   
See also:

Macro define-xpath-function/eager (ext name args &body body)
Arguments:
  • ext -- name of an XPath extension (a symbol)
  • name -- XPath function name
  • args -- XPath function arguments
Details:
Defines an XPath function, "eager" style.

The body is evaluated during evaluation of XPath expressions each time the function being defined is called. It's passed a list of values corresponding to XPath function arguments and should return a value of one of XPath types (string, boolean, number, node set).

Example:
   (define-xpath-function/eager my-ext join (delim node-set)
     (reduce (lambda (a b) (concatenate 'string a delim b))
             (map-node-set->list #'string-value node-set)))   
See also:

Macro define-xpath-function/single-type (ext name type args &body body)
Arguments:
  • ext -- name of an XPath extension (a symbol)
  • name -- XPath function name
  • args -- XPath function arguments
Details:
Defines an XPath function, "eager" style with automatic type conversion.

The body is evaluated during evaluation of XPath expressions each time the function being defined is called. It's passed a list of values corresponding to XPath function arguments and should return a value of one of XPath types (string, boolean, number, node set). Argument values are automatically converted to specified XPath type.

Example:
   (xpath-sys:define-xpath-function/single-type my-ext add-quotes string (string)
     (concat "\"" string "\""))   
See also:

Function find-xpath-function (local-name uri)
Arguments:
  • local-name -- local part of the function name
  • uri -- namespace URI of the function
Returns:
an XPath function object
Details:
Performs an XPath function lookup using standard lookup rules

All defined extensions for the namespace specified by uri are scanned for function with specified local-name.

Miscellaneous functions

Other useful functions:

Function get-node-id (node-or-node-set)
Arguments:
  • node-or-node-set -- a node-set or a single XML node
Returns:
an alphanumeric string
Details:
Generates an unique identifier for the first node node-set (or, if a node is specified, for that node).

This function is similar to the generate-id() XSLT function, but its results are unique only within its document, whereas XSLT also prepends an ID designating the document.
See also:

Utilities powered by pattern matchers

The following convenience functions and macros use patterns. They are implemented using the lower-level functions listed below.

Function node-matches-p (node pattern-expression)
Arguments:
  • node -- any node implementing the XPath protocol
  • pattern-expression -- a string or s-expression
Returns:
a boolean
Details:
Determine whether node matches the pattern expression.

The expression is compiled using the dynamic environment.

See also:

Macro pattern-case (node &body clauses)
Arguments:
  • node -- any node implementing the XPath protocol
  • clauses -- cases of the form (expression &rest body)
Returns:
The value returned by the matching clause body, or nil.
Details:
Match a node against static expressions.

Evaluates node, and matches them against the specified XSLT patterns. The first matching pattern will be chosen, i.e. earlier clauses have higher priority that later clauses.

Expressions are compiled using the dynamic environment.

As a special case, the last expression can be t, in which case it matches unconditionally.

See also:

Macro pattern-ecase (node &rest clauses)
Arguments:
  • node -- any node implementing the XPath protocol
  • clauses -- cases of the form (expression &rest body)
Returns:
The value returned by the matching clause body.
Details:
Match a node against static expressions.

Evaluates node, and matches them against the specified XSLT patterns. The first matching pattern will be chosen, i.e. earlier clauses have higher priority that later clauses.

Expressions are compiled using the dynamic environment.

If no clause matches, an error will be signalled.

See also:

Compiling pattern matchers dynamically

Pattern are represented as objects:

Class pattern
Superclasses:
common-lisp:structure-object, sb-pcl::slot-object, common-lisp:t
Documented Subclasses:
None
Returned by:
Slot Access Functions:
Details:
Represents a parsed XSLT pattern.
See also:

Function pattern-value (instance)
Arguments:
Returns:
an object
Details:
Return the user-specified value that will be returned by pattern matchers if this pattern matches.
See also:

Function pattern-priority (instance)
Arguments:
Returns:
an integer
Details:
Return the priority of this pattern. When several patters would match the same node, the pattern matcher will only consider the patterns that have the highest priority.
See also:

Use compute-patterns to parse a pattern expression into pattern objects:

Function compute-patterns (expression priority value environment)
Arguments:
  • expression -- a string or s-expression
  • priority -- an integer
  • value -- an object
  • environment -- an environment
Returns:
a list of patterns
Details:
Parse an XSLT pattern expression into one or more pattern objects.

Parses an expression, resolves its namespace-, variable-, and function-references using the specified environment, and creates a pattern object for the expression (if it does not use a union) or one pattern object for each sub-expression that is being joined into the union.

The specified priority is used as the pattern-priority, and the specified value is used as the pattern-value.

See also:

make-pattern-matcher builds a matcher functions from multiple pattern objects. The matcher will find the highest-priority match among them.

Function make-pattern-matcher (patterns)
Arguments:
Returns:
the pattern matcher, a function
Details:
Create a pattern matcher that distinguishes between multiple patterns.

This function combines several patterns, and creates a matcher function for use with matching-value or matching-values. The matcher function will compare a node against each pattern, and find the highest-priority pattern or patterns that match the node.

See also:

Function make-pattern-matcher* (expression environment)
Arguments:
  • expression -- a string or s-expression
  • environment -- an environment
Returns:
the pattern matcher, a function
Details:
Create a pattern matcher for a single pattern.

This function is a convenience wrapper around compute-patterns and make-pattern-matcher.

The resulting matcher will return T if the specified expression matches, or NIL if it doesn't.

See also:

Applying pattern matchers

To invoke a matcher created by make-pattern-matcher, use matching-value or matching-values:

Function matching-value (matcher node &optional (default nil))
Arguments:
  • matcher -- a pattern matching function
  • node -- any node implementing the XPath protocol
  • default -- an object
Returns:
an object
Details:
Apply a pattern matcher to node, and return exactly one value.

For use with matcher functions that have been returned by make-pattern-matcher or a higher-level function like make-pattern-matcher*.

If exactly one pattern matches, or several patterns for the same value match, the user-specified values as determined by pattern-value will be returned by this function.

If no pattern matches, default will be returned instead.

If more than one pattern of highest priority and different values match, an xpath-error will be signalled.

See also:

Function matching-values (matcher node)
Arguments:
  • matcher -- a pattern matching function
  • node -- any node implementing the XPath protocol
Returns:
an object
Details:
Apply a pattern matcher to node, and return one or more matching values.

For use with matcher functions that have been returned by make-pattern-matcher or a higher-level function like make-pattern-matcher*.

The resulting list will contain the user-specified values as returned by pattern-value on the patterns for this matcher, in any order. Duplicates under eql will have been removed from the list.

See also:

Other functions in xpattern

Function parse-pattern-expression (str)
Arguments:
  • str -- a string
Returns:
a s-expression-based pattern expression
Details:
Parses an XSLT pattern into an s-expression.

Other variables in xpattern

Variable *allow-variables-in-patterns*
Details:
If set to T, predicates in patterns are permitted to reference variables using $var syntax. If set to NIL, such variable references signal a compilation-time error. The default is T. Bind this variable to NIL to enable compatibility with XSLT 1.0.
See also:

Index of exported symbols

xpattern:*allow-variables-in-patterns*, variable
xpath:*navigator*, variable  (undocumented)
xpath:all-nodes, function
xpath:boolean-value, function
xpath:compile-xpath, function
xpattern:compute-patterns, function
xpath:context, class
xpath:context-node, function
xpath:context-position, function
xpath:context-size, function
xpath:context-starting-node, function
xpath-sys:define-extension, macro
xpath-sys:define-xpath-function/eager, macro
xpath-sys:define-xpath-function/lazy, macro
xpath-sys:define-xpath-function/single-type, macro
xpath:do-node-set, macro
xpath-sys:environment-find-function, function
xpath-sys:environment-find-namespace, function
xpath-sys:environment-find-variable, function
xpath:evaluate, function
xpath:evaluate-compiled, function
xpath-sys:find-xpath-function, function
xpath:first-node, function
xpath-sys:get-node-id, function
xpath:list->node-set, function
xpath:make-context, function
xpath-sys:make-node-set, function
xpath:make-node-set-iterator, function
xpattern:make-pattern-matcher, function
xpattern:make-pattern-matcher*, function
xpath-sys:make-pipe, macro
xpath:map-node-set, function
xpath:map-node-set->list, function
xpattern:matching-value, function
xpattern:matching-values, function
xpattern:node-matches-p, function
xpath:node-set, class
xpath:node-set-empty-p, function
xpath:node-set-iterator-current, function
xpath:node-set-iterator-end-p, function
xpath:node-set-iterator-next, function
xpath:node-set-p, function
xpath:node-set-value, function
xpath:number-value, function
xpattern:parse-pattern-expression, function
xpath:parse-xpath, function
xpattern:pattern, class
xpattern:pattern-case, macro
xpattern:pattern-ecase, macro
xpattern:pattern-priority, function
xpattern:pattern-value, function
xpath-sys:pipe-head, function
xpath-sys:pipe-of, function
xpath-sys:pipe-tail, function
xpath:sort-node-set, function
xpath:string-value, function
xpath:with-namespaces, macro
xpath:with-plx-extensions, macro
xpath:with-variables, macro
xpath:xpath, macro
xpath:xpath-error, function
xpath:xpath-error, class