forked from xproc/3.0-steps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<section xmlns="http://docbook.org/ns/docbook" | ||
xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" | ||
xmlns:p="http://www.w3.org/ns/xproc" | ||
xmlns:xi="http://www.w3.org/2001/XInclude" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xml:id="c.json-join" | ||
version="5.0-extension w3c-xproc"> | ||
<title>p:json-join</title> | ||
|
||
<para>The <code>p:json-join</code> step joins a sequence of JSON | ||
documents into a single JSON document (an array). If the sequence on | ||
port <code>source</code> is empty, the empty sequence is returned on | ||
port <code>result</code>.</para> | ||
|
||
<p:declare-step type="p:json-join"> | ||
<p:input port="source" sequence="true" content-types="json"> </p:input> | ||
<p:output port="result" content-types="application/json"/> | ||
<p:option name="flatten-arrays" as="xs:boolean" select="false()"/> | ||
</p:declare-step> | ||
|
||
<para>If option <code>flatten-arrays</code> is | ||
<literal>false</literal>, a member in the array is created for each | ||
document in the sequence appearing on port<code>source</code>. | ||
Therefore the produced array with have the same number of members as | ||
the number of documents appearing on port <code>source</code>. However | ||
if <code>flatten-arrays</code> is <literal>true</literal>, for each | ||
member of an array appearing at the top level of a JSON document on | ||
port <code>source</code> a new member in the resulting array will be | ||
created.</para> | ||
|
||
</section> |