RE: unbound option bug in Calabash, I think

> No, I don't think so. That paragraph is supposed to tell you that the
> select expressions aren't evaluated when the declaration is
> encountered, they're evaluated when a step of that type is used.
> So, if you had a library that contained:
>   <p:declare-step type="my:extension">
>     <p:option name="random" select="java:random()"/>
>   </p:declare-step>
> and a pipeline that contained:
>   <my:extension/>
>   <my:extension/>
> you would not expect each call to my:extension to receive the same
> value for the random option 
> (
> notwithstanding), one computed when the processor read the
> declaration.

I understand that. But that paragraph in 5.7.2 seems to suggest that it
goes even further:

<p:pipeline xmlns:p="">
  <!-- everything fine because select is not evaluated here -->
  <p:option name="myopt" select="$myopt2"/>
  <p:option name="myopt2" select="'foo'"/>
    <!-- here I get err:XD0026 because myopt refers to myopt2
         (which does not precede myopt in the step decl -->
    <p:with-option name="limit" select="... $myopt ..."/>

Or did I just went too far? (...please say so)

> I think (in addition to clarifying the paragraph that bot you and
> Vojtech quoted), we should say either that the $notUsed expression
> MUST or MAY produce an error. In the interest of interoperability and
> simplicity, I favor MUST, but I'm not going to lie down in the road
> about it.

+1 to MUST


Received on Friday, 15 May 2009 12:35:16 UTC