Name
p:xquery — The standard p:xquery step.
Synopsis
The p:xquery step applies an
XQuery query to the sequence of documents
provided on the source port.
| Input port | Primary | Sequence | Content types |
|---|---|---|---|
| source | ✔ | ✔ | any |
| query | text xml |
| 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" type="p:xquery">
| <p:input port="source"
| content-types="any"
| sequence="true"
5 | primary="true"/>
| <p:input port="query" content-types="text xml"/>
| <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>Errors
| Code | Description |
|---|---|
err:XC0009 | It is a
dynamic error (err:XC0009) if the specified XQuery version
is not available. |
err:XC0101 | It is a dynamic error (err:XC0101) if a document
appearing on port source cannot be represented in the XDM version associated with
the chosen XQuery version, e.g. when a JSON document contains a map and XDM 3.0 is used. |
err:XC0102 | It is a dynamic error (err:XC0102) if any key in option
parameters is associated to a value that cannot be represented in
the XDM version associated with the chosen XQuery version, e.g. with a map, an array,
or a function when XDM 3.0 is used. |
err:XC0103 | It is a dynamic error (err:XC0103) if any error occurs during
XQuery’s static analysis phase. |
err:XC0104 | It is a dynamic error (err:XC0104)
if any error occurs during XQuery’s dynamic evaluation phase. |
Implementation defined features
- Support for XQueryX is implementation-defined.
- It is implementation-defined which XQuery version(s) is/are supported.
- The point in time returned as the current dateTime is implementation-defined.
- The implicit timezone is implementation-defined.
Implementation dependent features
- The set of available documents (those that may be retrieved with a URI) is implementation-dependent.
- The set of available collections is implementation-dependent.
Description
The p:xquery step is a
standard XProc 3.0 step.
It is also described on XProcRef.org.
Extension attributes
cx:cache-queryIf the
cx:cache-queryattribute istrue, and the query expression has a base URI, then that query will be cached. The first time a cached expression is encountered, it is compiled and saved. Subsequent uses of that cached query will reuse the previously compiled version.See Caching compiled resources for more details.
cx:processorSpecifies the processor to use.
cx:fallbackSpecifies the fallback processor, the processor to use if the requested processor is unavailable.