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

Re: Options and parameters proposal

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 07 Mar 2007 08:29:54 +0000
Message-ID: <45EE7802.4030706@jenitennison.com>
To: public-xml-processing-model-wg@w3.org

Hi,

Norman Walsh wrote:
> On today's call, we seemed to be approaching consensus on having
> p:option for configuration options and p:parameter for component
> parameters.

I think this is a step in the right direction. What bothers me is that 
there's only one set of parameters for a given component, and I think we 
need to the flexibility of having any number of sets.

What if I wanted to define a pipeline that used two transformations, 
both of which used parameters. At the moment, the only way to 
distinguish between the two sets of parameters would be to use different 
namespaces for them. I think that's too much of a burden, particularly 
as it places constraints on the XSLT stylesheets themselves.

Or consider Alessandro's HTTP component, which had a set of HTTP headers 
and a set of request parameters.

I suggest that we have named parameter sets. Something like:

<p:http>
   <p:option name="uri">...</p:option>
   <p:parameter-set name="headers">
     <p:parameter name="User-Agent">...</p:parameter>
     <p:parameter name="...">...</p:parameter>
   </p:parameter-set>
   <p:parameter-set name="request-parameters">
     <p:parameter name="...">...</p:parameter>
     <p:parameter name="...">...</p:parameter>
   </p:parameter-set>
</p:http>

and that, rather than using namespaces and wildcards with 
<p:import-parameter>, parameter *sets* be imported by name with 
<p:import-parameter-set>.

Step declarations would declare the name of a parameter set, so XSLT 
would look like:

<p:declare-step type="p:xslt">
   <p:input port="source" sequence="no"/>
   <p:input port="stylesheet" sequence="no"/>
   <p:output port="result" sequence="yes"/>
   <p:option name="initial-mode"/>
   <p:parameter-set name="parameters"/>
</p:declare-step>

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com
Received on Wednesday, 7 March 2007 08:30:22 GMT

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