Name

p:json-join — The standard p:json-join step.

Synopsis

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 portPrimarySequenceContent types
source✔ ✔ any 
Output portPrimarySequenceContent types
result✔  application/json 
Option nameTypeDefault value
flatten-to-depthxs: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
CodeDescription
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:XC0119It 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.

Description

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