Re: p:aggregate proposal

On 4/30/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / Innovimax SARL <innovimax@gmail.com> was heard to say:
> | For-each generate zero or one document for each selection. But we have
> | no micro operation for helping concatenating documents at the moment
>
> We removed the aggregate component a few weeks ago. Any step that
> would accept the output of the aggregate component can simply
> aggregate on its p:input.

It was an aggregate AS THE SEQUENCE level, not the DOCUMENT one

>
> | * a "group-by" option which takes an XPath value, which is evaluated
> | on each document of the sequence and if bounded to the same result,
> | will group the document to make then aggregate
>
> How is that different from matching-documents?

Sorry, I miss that one, can you give me a pointer ?

>
> | * a "root-document" option which takes a QName
>
> That's just a p:wrap, no?

Not exactly, because you can group documents
>
> I must be confused.


Here is an example

You use a for-each to split a sequence of documents with (//div) into
multiple documents

the result is a sequence of documents each having a div root and an
attribute @name

you want then group the div elements into a sequence of document
grouped by first letter of the name attribute

<root>
  <div name="Albert">...</div>
</root>
<root>
  <div name="Béatrice">...</div>
  <div name="Boeing">...</div>
</root>
:
:
<root>


OF COURSE THERE IS NO REORDERING OF THE INPUT, the sequence was a
sequence of VOLUME (A-Cher), (Chi-Eff), .... already sorted

Hope this helps

Mohamed

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

Received on Monday, 30 April 2007 16:51:33 UTC