RE: XProc execution model

Hi Bert,


Omitting parts of the pipeline not needed for the results on output ports sounds like a bad idea to me. I sometimes have these “appendices” on pipelines that do things like logging or writing stuff to disk, but do not contribute to the “official” results on the output ports. 


Personally I don’t see any added value in a “pure=true” flag. And anyway, for the 3.0 spec that idea would be too late, but we can always add it to the list of ideas for a next version (if we ever get to that).


Erik Siegel


From: Bert Frees <> 
Sent: Thursday, 28 May 2020 20:49
To: XProc Dev <>
Subject: XProc execution model



There is something in the XProc specification that I hadn't noticed before and that was kind of surprising to me. I apologize in advance if this has been discussed many times before.

The spec says:

Unless otherwise indicated, implementations must not assume that steps are functional (that is, that their outputs depend only on their inputs, options, and parameters) or side-effect free.

Without ever having actually checked it in the spec, I was in the belief that engines had the choice to omit parts of a pipeline that are not needed to compute the requested outputs. I just assumed.

This would give you a nice way to do optional stuff in a pipeline, based on whether a certain output port is connected. If you are not interested in an output, don't connect the port and it will also not be computed. This is a feature I would use extensively. Has this ever been considered or discussed?

Would it be a good idea to add an attribute (e.g. pure=true|false) on steps to control the behavior (to indicate whether it is a pure function)? Or are there maybe already extension attributes for it? Would it be easy to do?


Received on Friday, 29 May 2020 12:16:40 UTC