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

could be replaced with

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

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)"/>
</px:my-step>

Seeking comments from the WG for todays discussions.

J

[1] http://lists.w3.org/Archives/Public/public-xml-processing-model-comments/2014Nov/0025.html

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