W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > October 2006

Parameter Calculations and Removing Complexity

From: Alex Milowski <alex@milowski.org>
Date: Mon, 02 Oct 2006 18:10:44 -0700
Message-ID: <4521B894.1060207@milowski.org>
To: public-xml-processing-model-wg@w3.org

If we allow arbitrary steps to have parameter calculated
from arbitrary inputs, those parameters would have to
be calculated and "set" on the step before the step
receives any input.  That is, now you have parameters flowing into
components that must be delivered before any input is delivered.  We do
not have the requirement that inputs must be delivered in
a certain order.

So, the affect of adding that "step/source/select" on the [p:]param
element means you've effectively wrapped the step in a [p:]group.
That ensures that the order is correct.

I'm not certain that the "auto-wrapping" of steps to
produce the calculation before the steps runs is so
obvious to the user.  That pre-input dependency may cause
things to happen in orders that they might not expect.

Further, there is a conceptual burden that I'm not certain
we really need for a 1.0 specification.  If the main use-case here is to
set XSLT parameters via inputs, that can be done by another step that
computes a stylesheet:

<p:pipeline name="pipeline">

<p:declare-input port="config"/>
<p:declare-input port="input"/>
<p:declare-output port="output" step="transform" source="result"/>

<p:step name="bind-parameters"
         type="p:xslt">
   <p:input port="document" step="pipeline" source="config"/>
   <p:input port="transform">
      <xsl:transform version="1.0">
         <xsl:template match="/">
             <xslo:transform version="1.0">
                <xslo:import href="mytransform.xsl"/>
                <xslo:param name="color">
                   <xsl:value-of select="/config/@color"/>
                </xslo:param>
             </xslo:transform>
         </xsl:template>
      </xsl:transform>
   </p:input>
</p:step>

<p:step name="transform" type="p:xslt">
    <p:input port="document" step="pipeline" source="input"/>
    <p:input port="transform" step="bind-parameters" source="result"/>
</p:step>

</p:pipeline>

I'm actually inclined to drop both "step/source/select"
from [p:]param completely and reserve that for future expansion.

I believe we can add them in later if we feel we need to do so.

Further, many situations that involve setting parameters on custom
components can be satisfied by setting the parameter on the pipeline
before execution rather than using an additional input.

--Alex Milowski
Received on Tuesday, 3 October 2006 01:11:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:49 GMT