RE: Another take on versioning

> "Toman_Vojtech@emc.com" <Toman_Vojtech@emc.com> writes:
> > "1. If an unknown step in the XProc namespace is encountered, it is
> > assumed to be correct."
> >
> > What does "correct" mean in this case? Because the step is 
> unknown, the
> > processor has no idea about how its signature (input ports, output
> > ports, options, ...) looks like. Knowing the input and 
> output ports (and
> > which ones are primary, if any) is essential to determine 
> the correct
> > evaluation order of steps in the pipeline.
> 
> I managed to convince myself that this wasn't actually a problem. Any
> attempt to evaluate an unknown step will raise an error, so unless the
> step occurs inside a p:when or the p:group of a p:try, the error can
> propogate upwards. In a p:when or p:try, you know the order because
> you have the other branches.

I am not sure myself, but perhaps you are right. I still have to think
about this. The biggest problem I have is that the V1 processor would
have to assume too many things when it encounters a V2 step. Consider
this pipeline:

<p:pipeline>
  <p:identity/>
  <p:v2-step/>
</p:pipeline>

Now, let's assume the pipeline is a valid V2 pipeline, with no static
errors. Then, in order to accept this pipeline statically, the V1
processor must:

1. Assume that p:v2-step has a primary input port - otherwise err:XS0005
(unconnected primary output port of p:identity) would be thrown
2. Assume that p:v2-step has a primary output port - otherwise
err:XS0006 (primary output port of the pipeline not connected and the
last step in the subpipeline does not have a primary output port)

We should be very careful here, and really look at different scenarious
where such kinds of assumptions may lead to unexpected behavior, or too
ambitious requirements on V1 implementations.

Regards,
Vojtech

Received on Thursday, 8 October 2009 13:39:47 UTC