Name
cx:xpath — Evalute XPath expressions.
Synopsis
Input port | Primary | Sequence | Content types |
---|---|---|---|
source | ✔ | ✔ | any |
xpath | text |
Output port | Primary | Sequence | Content types |
---|---|---|---|
result | ✔ | ✔ | any |
Option name | Type | Default value |
---|---|---|
parameters | map(xs:QName,item()*)? | () |
version | xs:string? | () |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:input port="source"
| content-types="any"
| sequence="true"
5 | primary="true"/>
| <p:input port="xpath" content-types="text"/>
| <p:output port="result" sequence="true" content-types="any"/>
| <p:option name="parameters" as="map(xs:QName,item()*)?"/>
| <p:option name="version" as="xs:string?"/>
10 |</p:declare-step>
Description
This step is modeled on the p:xquery
step, but for XPath.
The context item is set by the source port. If more than one document appears on the source port, the context item is undefined and all of the documents from that port form the default collection.
Any parameters
passed are used to configure the in-scope
variables for the expression.
The version
must be “3.1”, if it is specified.