Re: Options and parameters proposal

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 UTC