W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

Re: parameters

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 10 Dec 2008 13:24:14 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m23agvga7l.fsf@nwalsh.com>
Toman_Vojtech@emc.com writes:
> You are probably right, the sentence: "Only one parameter with any given
> name can be passed to a step" is not worded in the best way. You *can*
> pass multiple parameters with the same name, but the step only *sees*
> one. We should probably reformulate the sentence in the spec.
>
> Thanks for pointing this out.

Right. So there are a couple of things that need to be said, but perhaps
they're not being said clearly enough.

1. A step can have an arbitrary number of parameter input ports. (In
   practice, all of the builtin steps have only zero or one, but if
   you're defining your own step, you can have many. And you might
   want to if you're running several XSLT steps and you want to pass
   each of them a separate set of parameters.)

2. A parameter input port accepts an arbitrary number of parameters.
   (IIRC, I used to say that in an early draft, but someone thought
   that didn't cover the case of zero parameters clearly enough so I
   changed it to 'zero or more'. Personally, I think 'zero or more' is
   clunky.)

3. If you send two parameters with the same name to any given
   parameter input port, the step only actually sees the value of the
   "last" one you sent.

Does that all make sense Dave?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | An expert is a person who has made all
http://nwalsh.com/            | the mistakes that can be made in a very
                              | narrow field.--Niels Bohr

Received on Wednesday, 10 December 2008 18:25:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 December 2008 18:25:02 GMT