Re: Compound steps with unconnected output ports

"Toman_Vojtech@emc.com" <Toman_Vojtech@emc.com> writes:
> Suppose I have this p:pipeline:
>
> <p:pipeline>
>   <p:output port="foo" primary="false"/>
>   <p:identity/>
> </p:pipeline>
>
> The "foo" output port is not connected to anything. Also, because it is
> not primary, it will not get connected to the primary output port of
> p:identity.
>
> Is this allowed? I can't find anything in the spec that makes this an
> error, or that says what happens when I actually refer to "foo" when I
> call the pipeline.
>
> Also, would there be any difference if I declared "foo" as
> sequence="true"?

If you don't specify sequence=true, then I think you get an error because
you can't send an empty sequence to a port that doesn't accept sequences.

If you do specify sequence=true, then you just get an empty sequence on
that port.

It's statically valid in either case.

> The only thing I found is in section 2.2:
>
> "Within a compound step, the declared outputs of the step *can* be
> connected to: ..."
> (Notice that the sentence uses "can", not "must".)

Since that's a p:pipeline, the identity step will get connected to the
primary result port. If it was a declare step, you'd get a static error
because the primary output port of the identity step would be unbound.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Nothing ever becomes real till it is
http://nwalsh.com/            | experienced--even a proverb is no
                              | proverb to you until your life has
                              | illustrated it.-- Keats

Received on Friday, 17 July 2009 17:04:40 UTC