W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

RE: Initialize a variable with a parameter port

From: Geert Josten <geert.josten@dayon.nl>
Date: Tue, 22 Nov 2011 07:44:05 +0100
Message-ID: <5007efa28e3ee65f6f380abec4f53d94@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: Norman Walsh <ndw@nwalsh.com>, XProc Dev <xproc-dev@w3.org>
Actually, I don't really understand why the parameters port is returning a
sequence at all. Can anyone give a use case for that? I was kinda
surprised it isn't normalized with a p:parameters under the hood by

About sequence input: if you use the ut:parameters within a declare-step
that has non-sequence primary input, ut:parameters will receive just a
single doc and pass that through identically. So, it works anyhow. But
perhaps useful for static analysis. Though, it is my impression, it isn't
that advanced yet. (These no-doc or multi-doc errors could be prevented
with it largely I'd think. Not sure though, always tricky cases like an
XSLT producing wrong results..)

Kind regards,

-----Oorspronkelijk bericht-----
Van: fgeorges@gmail.com [mailto:fgeorges@gmail.com] Namens Florent Georges
Verzonden: dinsdag 22 november 2011 1:19
Aan: Geert Josten
CC: Norman Walsh; XProc Dev
Onderwerp: Re: Initialize a variable with a parameter port

On 21 November 2011 21:57, Geert Josten wrote:


> You can put it just below your inputs, outputs and options as a
> simple <ut:parameters name="params"/>. After that you have to
> use a p:group, and declare p:variables at the top of that with
> a <p:pipe step="params" port="parameters"/>.

  Yes, that's more or less what I had in mind too.  The problem
for a generic step is that you have to choose between a sequence
or not for the primary input port (which is supposed to be the
pass-through).  Probably both ut:parameters and ut:parameters-seq
would make sense then...

  Nice library of tools, BTW :-)


Florent Georges
Received on Tuesday, 22 November 2011 06:44:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:01 UTC