DCI expressions

The DCI expression module parses, compiles and evaluates expressions for use within the pipeline. The expressions are a subset of XPath 2.0, extended with some additional product specific functions.

The DCI expression module parses, compiles and evaluates expressions for use within the pipeline. The expressions are a subset of XPath 2.0, extended with some additional product specific functions.

Grammar

The grammar defined in XPath grammar is a subset of the full XPath 2.0 Grammar. The pipeline grammar retains the names of XPath rules to aid comparison, although the numbering is different. Each grammar production that differs from the standard XPath 2.0 production is marked with a comment to explain how it differs. In addition to those differences, pipeline expressions do not allow comments.

The XPath 2.0 grammar defines a number of additional semantic and tokenization constraints on the grammar that cannot be expressed in EBNF format. Where applicable those constraints also apply to this pipeline subset.

Focus

Pipeline expressions and XPath 2.0 are quite different in the way that they rely upon and use the focus. For its primary use within XQuery 1.0, and XSLT 2.0, XPath 2.0 requires a focus to provide context size, item and position. Pipeline expressions require a focus mainly for filtering sequences using predicates. A focus is also needed for pipeline operations that use paths in their expressions.

Paths

The path support in the pipeline subset is provided to query information from a document fragment provided by an operation. It is not intended to provide access to a whole document, including the page within which the pipeline operations are used. So document relative paths starting with a '/' are not supported. Neither are reverse axes supported.

The only paths that can be used are those that are relative to an existing node sequence. Where the node sequence could come from a PrimaryExpr, for example a function, or variable, or one that contains the context node. In the latter case, paths can only be used within a pipeline expression if the context node against which the paths are resolved has been set. Failure to do this will result in a runtime exception when the path expression is evaluated.

XPath functions

The pipeline supports the use of a subset of XPath 2 functions. The following functions are available. See XQuery 1.0 and XPath 2.0 Functions and Operators for further information.

Related topics