- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Tue, 08 May 2007 16:26:01 +0100
- To: "Innovimax SARL" <innovimax@gmail.com>
- Cc: "XProc WG" <public-xml-processing-model-wg@w3.org>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Innovimax SARL writes: > I have skipped the groupBy name for two reason : > * it sounds like group-by in XSLT 2.0 for-each-group > * it suggest than the element will be grouped whatever the document order > is. Not fussed about the name. . . > With > <?xml version="1.0"?> > <a> > <b att="a" id="_1"/> > <b att="a" id="_2"/> > <b att="b" id="_3"/> > <b att="a" id="_4"/> > <b att="b" id="_5"/> > </a> > > what will be the result of p:wrap(name="my:wrapper", match="a/b", > groupBy="@att") ? <a> <my:wrapper> <b att="a" id="_1"/> <b att="a" id="_2"/> </my:wrapper> <my:wrapper> <b att="b" id="_3"/> </my:wrapper> <my:wrapper> <b att="a" id="_4"/> </my:wrapper> <my:wrapper> <b att="b" id="_5"/> </my:wrapper> </a> > 1) with reorganizing the document order. I'm really doubtful about this one. > we could end up with duplicating nodes. And it seems really to cumbersome to > implement in a streaming fashion. No way, I agree - - the whole point is that it's trivial to implement this in a typical SAX-type environment -- when a start-tag matches the match pattern, you output a start event for the wrapper, read and echo the whole matching subtree, if the next event is a) matching and b) has same value for group-by, carry on and ship _that_ subtree, otherwise close the wrapper. Wrt whitespace, my implementation does _not_ close a group for all-white text nodes or comments or PIs. . . ht - -- 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] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFGQJaJkjnJixAXWBoRAkNIAJ9GgoMecM4hyzyCAkI+KtWIUl45fACfeoe+ 0ieISfUTqXWpJvFWCYogMGU= =jt24 -----END PGP SIGNATURE-----
Received on Tuesday, 8 May 2007 15:26:14 UTC