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

>     <p:compare fail-if-not-equal="true" name="compareBookstores">
>         <p:input port="source">
>             <p:pipe step="main" port="source"/>
>         </p:input>
>         <p:input port="alternate">
>             <p:pipe step="main" port="alternate"/>
>         </p:input>
>         <p:output port="result"/>
>     </p:compare>

No, that's not right. You aren't allowed to put a p:output on an atomic
step.

Is that really wrong?

The WD says:  "It is a static error (err:XS0029) to specify a binding for a
p:output inside a p:declare-step for an atomic step."  It also defines a
binding:  "A binding associates an input or output port with some data
source."

I guess I'm trying to figure out what "binding" means.  Is there no
difference between declaring an output port and binding it?  IOW, is this
binding?

<p:output port="result"/>

Or is this binding?

<p:output port="result">
  <p:pipe  step="someStep" port="somePort"/>
</p:output>

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.

Appreciating all the help!

James Garriss
http://garriss.blogspot.com




From: Norman Walsh <ndw@nwalsh.com>
Date: Fri, 19 Sep 2008 09:19:59 -0400
To: James Garriss <james@garriss.org>
Cc: XProc Dev <xproc-dev@w3.org>
Subject: Re: Where is my c:result?

James Garriss <james@garriss.org> writes:

> Excellent.  My mistake was assuming that p:compare had a primary output.
> What should have tipped me off as I read the spec?  Is it that primary
> equals false?  From the spec:

Yep, primary=false is the flag.

> <p:declare-step type="p:compare">
>      <p:input port="source" primary="true"/>
>      <p:input port="alternate"/>
>      <p:output port="result" primary="false"/>
>      <p:option name="fail-if-not-equal" select="'false'"/>         <!--
> boolean -->
> </p:declare-step>
>
> As to a working solution, you had the right idea, but as calabash informs
> us:  Attribute "step" not allowed on p:output.  Instead, we can put a result
> port in p:compare, like such:
>
>     <p:compare fail-if-not-equal="true" name="compareBookstores">
>         <p:input port="source">
>             <p:pipe step="main" port="source"/>
>         </p:input>
>         <p:input port="alternate">
>             <p:pipe step="main" port="alternate"/>
>         </p:input>
>         <p:output port="result"/>
>     </p:compare>

No, that's not right. You aren't allowed to put a p:output on an atomic
step. Does Calabash miss that too? Sigh. Another day, another bug :-)

The output port is part of the declaration of the p:compare step.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | A proof tells us where to concentrate
http://nwalsh.com/            | our doubts.-- Anonymous

Received on Friday, 19 September 2008 21:18:27 UTC