I’m using XProc 3.0 with XML Calabash 3. I have a pipeline where:
- I iterate over a directory of XML files
- For each file, I run an XSLT trasnformation and store a modified version back to disk
- After that, I run
p:xincludeon a different document which depends on the files that were fixed and stored in step (2)
The problem: Calabash lets p:xinclude start before the p:for-each has finished writing files, leading to missing-file errors in p:xinclude. I understand why this happens (no data dependency, the loop does not feed any data into the later step so its p:store steps look like side effects), but I can't figure out an idiomatic XProc 3 solution for this.
The question: How can I make sure that all the iterations of p:for-each complete, including all thep:store operations, before running a later step (p:xinclude) when there is no natural document flow between them?
Many thanks in advance!