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

Re: Another ('nother) parameters proposal

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Wed, 06 Jun 2007 13:05:15 +0100
To: Norman Walsh <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org
Message-ID: <f5bbqfte1ac.fsf@hildegard.inf.ed.ac.uk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Norman Walsh writes:

> 1. No more automatic inheritance. That was easy :-) It no longer makes
>    any sense to allow p:parameter on compound steps.

Right.

> 2. Add a grouping mechanism. What do parameter groups remind me of?
>    XSLT attribute sets:
>
>    <p:parameter-set
>      name = NCName>
>     (p:parameter*)
>    </p:parameter-set>

OK.

>    The ability to group parameters gives the pipeline author control
>    over all the parameters *except* those that are passed to the
>    pipeline (either by the application, e.g., from the command line
>    or by the invocation of the pipeline from some other pipeline).
>
>    There are a few ways we could address this, the simplest that
>    occurs to me is to allow "#default" as a parameter set name. It
>    means "all the parameters passed to the p:pipeline", which might be
>    the empty set.

I'd prefer a more informative name, e.g. #external or #from-user, but
I don't really care.

> Today, any parameters passed to the pipeline are automatically
> available to the XSLT step. To obtain that behavior under this
> proposal, the pipeline would have to be changed as follows:
>
>   <p:pipeline>
>     ...
>     <p:xslt use-parameter-sets="#default">
>       <p:input port="source">...</p:input>
>       <p:input port="stylesheet">...</p:input>
>     </p:xslt>
>   </p:pipeline>

So that's the one thing I'd change -- I want the zero-effort situation
to do what users and authors expect, i.e. that externally-supplied
parameters are available to XSLT steps by default.

The simplest way to achieve this is just to say that the
'use-parameter-sets' attribute defaults to #default, or whatever it's
called.  If you really want to protect an XSLT step, use an explicit
use-parameter-sets="".

If people are worried that this will have unintended consequences for
careless step implementors and/or pipeline writers, my sympathy is
limited, I think it's a feature, not a bug, but I could see pushing the
default into the step type definition, i.e.

 <p:declare-step name="p:xslt" default-parameter-sets="#default">
  . . .

with the default for default-parameter-sets being the empty string.
What its value should be for p:http-request remains to be decided.

With this change, this meets my MNtDV bar, and my "all of this goes in
a section most readers can and should ignore without risk" test, and I
would support it.

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFGZqL7kjnJixAXWBoRArynAJwIHdU/77knFynVU+I6/1kE1wgFfACcD9J5
WVTa9w0EQ8uwYvAGj1ddsHA=
=yaD+
-----END PGP SIGNATURE-----
Received on Wednesday, 6 June 2007 12:05:29 GMT

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