Re: 'Protection' from parameter 'polution'

On 5/24/07, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> _If_ we think we need to allow pipeline writers to 'protect' steps or
> regions of their pipelines from pollution by miscellaneous inherited
> parameters, we should provide a specific mechanism to do this,
> e.g. with a 'block-parameter-inheritance' attribute on p:group.
>
> I'm inclined _not_ to do this, on the grounds that the two step types
> we know of which will use parameters at all will not have a problem:
>
>  1) XSLT, XQuery and friends - spurious params have no impact, as they
>     aren't looked at -- there's no way to iterate over all visible
>     params;

The case I'm worried about with XSLT is a parameter that is specified
on the invocation of the pipeline (e.g. command-line) that might be used
elsewhere but changes the outcome of the pipeline because it changes
what the XSLT does by mistake.  How does a pipeline author prevent
that?

Right now I'd have to bind all the parameters to the XSLT transformation
on the step invocation to options or static values to make sure
that the right thing always happens.   I keep wondering if that will
be the "recommended" way to do things to keep bad things from
happening when you distribute your pipeline to random and
uninformed users.  Then the task of publishing your pipeline becomes
an onerous task of sorting though XSLT parameters and the invocation
of transformations.

>
>  2) http-request - We can and probably should use a separate namespace
>     for the params which http-request is spec'd to turn into headers,
>     to avoid collision with XSLT params.

Or we could not use parameters on http-request to set headers.  I generally
think this is a bad idea.  Setting headers is an edge-case and we have an
XML syntax for handling setting parameters already.


-- 
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."

Bertrand Russell in a footnote of Principles of Mathematics

Received on Thursday, 24 May 2007 16:16:46 UTC