RE: p:xquery with multiple input documents

Conal is correct, you can pass a sequence of documents to the p:xquery step. The first document will become the initial context item (accessible using ‘.’), the entire sequence will be the default collection (accessible using the collection() function).

Regards,
Vojtech

From: Conal Tuohy [mailto:conal.tuohy@gmail.com]
Sent: Monday, September 05, 2016 2:15 PM
To: Sebastian Fey
Cc: XProc Dev
Subject: Re: p:xquery with multiple input documents

Hi Sebastian!
You can have a sequence of input documents, NB the "sequence='true'" in the definition:

 <p:input port="source" sequence="true" primary="true"/>

e.g.
<p:input port="source">
   <p:pipe step="first-document" port="result"/>
   <p:pipe step="second-document" port="result"/>
   <!-- etc -->
</p:input>
Only one set of parameters, though, yes.

Conal

On 3 September 2016 at 19:21, Sebastian Fey <fey@ambihome.com<mailto:fey@ambihome.com>> wrote:

According to https://www.w3.org/TR/xproc/#c.xquery p:xquery gets only one input document and parameters (which can only be atomic, right?)

If my query has multiple input documents (from previous steps), do I really have to store them first and load them inside the query?



--
Conal Tuohy
http://conaltuohy.com/

@conal_tuohy
+61-466-324297

Received on Monday, 5 September 2016 13:55:28 UTC