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

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

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 24 May 2007 12:24:35 +0100
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
Message-ID: <f5bmyzu79cc.fsf@hildegard.inf.ed.ac.uk>

Hash: SHA1

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').

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. . .

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.

- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Thursday, 24 May 2007 11:24:48 UTC

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