According to XProc: W3C Recommendation p:xquery gets only one input document and parameters (which can only be atomic, right?)
<p:declare-step type="p:xquery">
<p:input port="source" sequence="true" primary="true"/>
<p:input port="query"/>
<p:input port="parameters" kind="parameter"/>
<p:output port="result" sequence="true"/>
</p:declare-step>
If my query has multiple input documents (from previous steps), do I really have to store them first and load them inside the query?
No, as the syntax description you quote makes clear, the 'source' port has sequence="true"
, which means that the step may receive a sequence of documents on the source port, not just one.
So no, you do not really have to store them and then load them inside the query; just feed them into the p:xquery step's source port as a sequence of documents.