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

Re: p:aggregate proposal

From: Innovimax SARL <innovimax@gmail.com>
Date: Mon, 30 Apr 2007 18:51:22 +0200
Message-ID: <546c6c1c0704300951o3c22d12evb7b94636f0e84b28@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org

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 GMT

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