Skip to content

Commit

Permalink
Fix xproc#110
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Jul 25, 2019
1 parent 7d753f2 commit 35deee3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 29 deletions.
6 changes: 3 additions & 3 deletions step-json/src/main/xml/specification.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</authorgroup>

<abstract>
<para>This specification describes the <code>p:join-json</code> step
<para>This specification describes the <code>p:json-join</code> step
for
<citetitle>XProc 3.0: An XML Pipeline Language</citetitle>.</para>
</abstract>
Expand All @@ -51,7 +51,7 @@ An XML Pipeline Language</link> published by the W3C.</para>
<title>Introduction</title>

<para>This specification describes the
<code>p:join-json</code> XProc step.
<code>p:json-join</code> XProc step.
A machine-readable description of
these steps may be found in
<link xlink:href="steps.xpl">steps.xpl</link>.
Expand All @@ -63,7 +63,7 @@ steps is assumed; for background details, see
<biblioref linkend="xproc30-steps"/>.</para>
</section>

<xi:include href="steps/join-json.xml"/>
<xi:include href="steps/json-join.xml"/>

<section xmlns="http://docbook.org/ns/docbook" xml:id="errors">
<title>Step Errors</title>
Expand Down
26 changes: 0 additions & 26 deletions step-json/src/main/xml/steps/join-json.xml

This file was deleted.

32 changes: 32 additions & 0 deletions step-json/src/main/xml/steps/json-join.xml
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>

0 comments on commit 35deee3

Please sign in to comment.