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

Re: Propose to add 'group-by' option to p:wrap and p:wrap-sequence

From: Norman Walsh <ndw@nwalsh.com>
Date: Thu, 24 May 2007 09:41:33 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <87d50qgwz6.fsf@nwalsh.com>
/ ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
| Further to the action I took a few weeks ago, I propose that we add an
| optional 'group-by' option, with value an XPath expression, to the
| required p:wrap and p:wrap-sequence steps, semantics as follows:
| For p:wrap, 'adjacent' matches of the 'match' option which have the
| same string value for the 'group-by' expression, given the matched
| node as context node, are wrapped together in a single 'wrapper'
| element.  Matches are 'adjacent' if they are siblings, and nothing
| intervenes between them except all-white text nodes, comment nodes and
| processing instruction nodes (but see below under 'ignore').

That sounds reasonable to me.

| If control over what is ignored in determining 'adjacency' is felt to
| be necessary, an optional 'ignore' option could be added, value an
| XPath expression, to specify what nodes can be ignored between
| matching siblings for grouping purposes.  I have a modest inclination
| not to provide this. . .

Me too.

| For p:wrap-sequence, documents are grouped and wrapped so that each
| output document wraps input documents which have the same string value
| for the 'group-by' expression, given their document node as context
| node.  This may result in a sequence output.

Works for me.

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | The facts, although interesting, are
http://nwalsh.com/            | usually irrelevant.

Received on Thursday, 24 May 2007 13:41:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:43 UTC