p:declare-step - atomic steps vs. empty pipelines

Hi all,

I have a question about the "new" p:declare-step syntax with regard to
declaring empty pipelines. It seems to me that in some cases the XProc
processor has no way of knowing whether the declared step is an atomic
step or an empty pipeline. Consider this library:

<p:library xmlns:p="http://www.w3.org/ns/xproc"
xmlns:test="http://acme.com/test">

  <p:declare-step type="test:my-atomic-step">
    <p:input port="source"/>
    <p:output port="result"/>
  </p:declare-step>

  <p:declare-step type="test:my-empty-pipeline">
    <p:input port="source"/>
    <p:output port="result"/>
    <!-- empty subpipeline -->
  </p:declare-step>

</p:library>

Suppose the implementation for the step "test:my-atomic-step" is not
available to the processor. In that case, the processor should report an
error on this step (XD0017, attempt to invoke a step which the processor
does not know how to perform). But for the "test:my-empty-pipeline"
step, the situation is different, because it is meant to represent an
empty pipeline - so it should be processed with no problems. The problem
is, however, that the two step declarations look exatcly the same to the
processor...

I can think of two solutions to this:
1. Disallow empty pipelines
2. Enhance the p:declare-step element so it is always clear whether it
declares an atomic step or a pipeline

Regards,
Vojtech

Received on Monday, 14 January 2008 09:51:29 UTC