a component with * inputs

Dear,

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)

Mohamed
-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 

Received on Sunday, 29 July 2007 17:22:40 UTC