> I would represent the log as a global map variable and place any action
there as an entry like {action-key, action-info}, immediately on completing
each action.
>
> Finally, when the processing is finished, we can produce from the log-map
a single result-document that contains all entries of the log-map.
>
This suffers the same problem as the original proposal: it's based on order of
events, recognisable by the use of temporal language ("immediately",
"finally", "when"), and (if interpreted literally) involves a mutable
variable.
I think you have to find a way to do this kind of thing in multiple phases.
For example, first phase creates a composite document, phases 2 and 3 extract
parts of this into different result documents.
Michael Kay
Saxonica
|