Re: Variables and parameters

Hi Alessandro,

Alessandro Vernet wrote:
> In my mind, separate namespaces are the main reasons why we have
> parameters in addition to inputs. Say XSLT is invoked with:
> 
> <p:step name="xslt">
>    <p:with-input name="document" select="..."/>
>    <p:with-input name="stylesheet" select="..."/>
>    <p:with-output name="result" label="..."/>
> </p:step>
> 
> Now I happen to have a stylesheet that takes a parameter named
> "document". How can I pass a value for this parameter if I can't add a
> <p:with-param name="document" select="..."/>?

But XSLT parameters aren't the same as pipeline parameters. As it 
stands, you'd add the XSLT parameter called 'document' using something like:

   <p:step name="xslt">
     <p:with-input name="document" select="..." />
     <p:with-input name="stylesheet" select="..." />
     <p:with-param name="parameters" value="document='...'" />
     <p:with-output name="result" label="..." />
   </p:step>

> So it is really up to the component to define the semantic of "input"
> and "parameter". For the XSLT component it would go as follows: there
> are exactly two inputs "document" and "stylesheet", and 0 to n
> parameters that are passed as parameters to the stylesheet.

No: for the XSLT component, there are the inputs "document", 
"stylesheet", and the parameter "parameters" (and possibly other 
parameters, such as the initial mode for the stylesheet, the path to the 
initial context node for the stylesheet, or the name of a template to be 
invoked).

As I've said before, I think we will get into real trouble if we mix 
levels. Perhaps we should call pipeline parameters something other than 
"parameters" to avoid this confusion.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Thursday, 25 May 2006 13:17:10 UTC