What the semantics of a construct should look like

The semantics of a construct should describe:

 - which external ports are visible to the subpipelines within
   the construct
 - which new ports are provided to those subpipelines by the pipeline
 - what document is available on each of the new ports
   (the documents available on the visible external ports are of
    course those that were avilable to the construct itself)
 - probably something similar about parameters

So the semantics of for-each will state that all the ports visible to
the for-each itself are visible to the sub-pipeline, that an
additional port (the iteration port) is visible, and that during
successive executions of the sub-pipeline, the document available on
the iteration port will be successive portions of the input document
selected by the XPath.

This does not seem to have any compositionality problem.  An inner
for-each that references an outer for-each's iteration port will see
it as a constant, just because the semantics of the outer for-each
specified the document that is available on it for a given iteration.

-- Richard

Received on Thursday, 28 September 2006 16:24:38 UTC