p:json-join — The standard p:json-join step.
The p:json-join
step joins the sequence of documents on port source
into a single JSON document (an array) appearing on port result. If the sequence on
port source
is empty, the empty sequence is returned on
port result
.
Input port | Primary | Sequence | Content types |
---|
source | ✔ | ✔ | any |
Output port | Primary | Sequence | Content types |
---|
result | ✔ | | application/json |
Option name | Type | Default value |
---|
flatten-to-depth | xs:string? | '0' |
Declaration
1 |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">
| <p:input port="source" sequence="true" content-types="any"/>
| <p:output port="result" content-types="application/json"/>
| <p:option name="flatten-to-depth" as="xs:string?" select="'0'"/>
5 |</p:declare-step>
Errors
Code | Description |
---|
err:XC0111 |
It is a dynamic error (err:XC0111 ) if a document of an unsupported document type appears on
port source of p:json-join . |
err:XC0119 | It is a dynamic error (err:XC0119 ) if flatten is
neither “unbounded ”, nor a string that may be cast to a non-negative integer. |
Implementation defined features
- It is implementation-defined if
p:json-join
is
able to process document types not mentioned yet, i.e. types of binary documents.