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

Re: a component with * inputs

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 01 Aug 2007 11:07:43 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87myxbnvi8.fsf@nwalsh.com>
/ Innovimax SARL <innovimax@gmail.com> was heard to say:
| When I was re reading the answer of Norm to my demand for a
| p:equal-sequence (which was do-it-with-for-each !), I suddently see
| that we cannot do that efficiently in for-each
| And moreover that's a task that is useful
|
| I propose to add a p:pack (not so sure about the name)
|
| <p:declare-step type="p:pack">
|      <p:input port="*" sequence="yes"/>
|      <p:output port="result" sequence="yes"/>
|      <p:option name="wrapper" required="yes"/>
| </p:declare-step>
|
| What it does is simple
|
| It takes p sequence (seq_1,....seq_p) of respective length (len_1, ....len_p)
|
| It outputs a sequence of length max(len_1, ...len_p)
| and for each position of doc of the result sequence
| we have
| result_1 (wrap(seq_1(i), .....seq_p(i))
|
| Where seq_k(i) is non empty if k <= len_k
|
| I was thinking to give a special component that can distribute
| multiple flows at the same time, but the fact is that we that
| component and for-each, you can do it as efficiently
|
| I ask it for beeing a required step (since it's not difficult to implement)

Can you give an example? I'm afraid I can't quite figure out what this
step does.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Two starving men cannot be twice as
http://nwalsh.com/            | hungry as one; but two rascals can be
                              | ten times as vicious as one.--George
                              | Bernard Shaw

Received on Wednesday, 1 August 2007 15:08:01 GMT

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