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 portPrimarySequenceContent types
source✔ ✔ any 
query  text xml 
Output portPrimarySequenceContent types
result✔ ✔ any 
Option nameTypeDefault value
parametersmap(xs:QName,item()*)?()
versionxs: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="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
CodeDescription
err:XC0009It is a dynamic error (err:XC0009) if the specified XQuery version is not available.
err:XC0101It 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:XC0102It 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:XC0103It is a dynamic error (err:XC0103) if any error occurs during XQuery’s static analysis phase.
err:XC0104It is a dynamic error (err:XC0104) if any error occurs during XQuery’s dynamic evaluation phase.
Implementation defined features
Implementation dependent features

Description

The p:xquery step is defined in the XProc 3.0: Standard Step Library. It is also described on XProcRef.org.