Re: No more parameter ports

On Tue, 2013-10-08 at 16:44 +0100, Norman Walsh wrote:
> Hi folks,
> 
> I expect many of you have seen the requirements document (still an
> unofficial draft) that the XProc WG produced in Edinburgh:
> 
>   http://www.w3.org/XML/XProc/docs/xproc-v2-req.html
> 
> I want to draw particular attention to the "simplify parameters"
> requirement:
> 
>   Experience with parameters in XProc 1.0 reveals that they are too
>   complicated. They often cause user confusion and introduce syntactic
>   complexity not justified by their function. XProc v2.0 must
>   dramatically simplify parameters, perhaps simply removing parameter
>   ports altogether without replacing them with a new mechanism of
>   equivalent power (and complexity).
> 
> Not inventing a new mechanism would mean that p:with-param would still
> exist but parameter ports would not. Consider this pipeline:
> 
>   <p:declare-step name="main">
>     <p:input port="source"/>
>     <p:output port="result"/>
>     <p:option name="page-size" select="'A4'"/>
> 
>     <p:xslt>
>       <p:input port="stylesheet">
>         <p:document href="style.xsl"/>
>       </p:input>
>       <p:with-param name="page-size" select="$page-size"/>
>       <p:with-param name="style" select="'draft'"/>
>     </p:xslt>
>   </p:declare-step>
> 
> Without parameter ports that would be valid (no more stupid warnings
> about unbound parameter input ports, thank you very much!)
> 
> The pipeline caller could change the value of the 'page-size'
> parameter by passing in the page-size option to the pipeline. They
> could not change the value of the 'style' parameter or pass in any
> other parameters.
> 
> On the one hand, this is a decrease in functionality. On the other,
> the complexity of parameters VASTLY outweighs the practical utility of
> that functionality (in the experience of the members of the WG present
> in Edinburgh).
> 
> Your thoughts on this trade off would be most appreciated.

I'm new to the business of writing pipelines, but parameter ports did
not register among my learning difficulties. It seems hasty to dispense
with a potentially useful feature at this early stage. Can't we expect
the difficulties to subside with more experience, tool support, and
learning resources?

Regards,
--Paul

Received on Wednesday, 9 October 2013 01:16:13 UTC