allowing p:variable definition within step

In recent discussions [1], we discussed allowing p:variable to be
defined within a step.

This would mean that such constructions;

  <p:variable name=“count” select=“count(//elem)”>
    <p:pipe step=“earlier-step” port=“result” />
  <px:my-step numberOfWidgets=“fx:function($count)” />

could be replaced with

    <p:variable name="count" select="count(//elem)"/>
    <p:with-option name="numberOfWidgets" select="fx:function($count)"/>

where the p:variable automatically connects to the step's primary input
port. One would still be free to use a p:pipe to explicitly choose
some other step/port,
though existing constraints to avoid ordering paradoxes would remain
(as explained in
5.7.1 p:variable).

I think we should also consider allowing reference when used in option shorthand

<px:my-step numberOfWidgets="fx:function($count)">
    <p:variable name="count" select="count(//elem)"/>

Seeking comments from the WG for todays discussions.



Received on Wednesday, 3 December 2014 11:06:31 UTC