Re: binding vs declaring an output port (was Re: Where is my c:result?

James Garriss <james@garriss.org> writes:

> I guess I'm trying to figure out what "binding" means. 

  3.5 Associating Documents with Ports

  [Definition: A binding associates an input or output port with some
  data source.]

Unfortunately, I see that we use the word binding for
variable/option/parameter bindings as well, so I think maybe a little
editorial work is needed.

> Is there no
> difference between declaring an output port and binding it?  IOW, is this
> binding?

The situation is, unfortunately, a little bit complicated and subtle.

On p:declare-step, p:output is a declaration.

On a compound step (p:group, for example), it is *both a declaration
and a binding*. If you don't specify a binding, then it gets a default
binding (based on the primary output port of the last step in its
subpipeline).

If p:output was allowed on atomic steps, it would be only a binding,
just like p:input on atomic steps is only a binding. But p:output is
not allowed on atomic steps, so that case never arises.

> It seems (to me) that it should be ok simply to declare that an output port
> exists, so long as I don't attempt to bind it with a p:pipe.

It's ok to declare it on p:declare-step; on a atomic step, it's *already been
declared* by the p:declare-step that declares that atomic step!

> Appreciating all the help!

I appreciate the questions! By the time you've been working on a
specification for a year or more, it becomes *very hard* to tell what
parts users are going to understand and what parts they're going to
find confusing.

You're helping us a lot! I do plan to write some tutorial/how to docs
eventually and these questions will be a big help.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Reason's last step is the recognition
http://nwalsh.com/            | that there are an infinite number of
                              | things which are beyond it.-- Pascal

Received on Saturday, 20 September 2008 18:53:18 UTC