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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Innovimax SARL writes:

> Are you saying that
> p:wrap
> option : wrapper (QName)
> option : match (XPath)
> option : group-by (XPath with matched node as context evaluated as a string key)

Yes.

> option : ignore (Pattern matching the ignorable nodes)

Or not -- I prefer not.

> p:wrap-sequence
> option : wrapper (QName)
> option : match (XPath)
> option : group-by (XPath with matched node as context evaluated as a string key)

Yes.

> How will it works for flatten hierarchie ?
> ...
> I want this
>
> <div>
>  <wrapper>
>  <h1>...</h1>
>  <h2>...</h2>
>  <p>..<p>
>  <h2>...</h2>
>  <h3>...</h3>
>  <p>..<p>
>  <p>..<p>
>  <h2>...</h2>
>  <p>..<p>
>  </wrapper>
>  <wrapper>
>  <h1>...</h1>
>  <h2>...</h2>
>  <p>..<p>
>  <h2>...</h2>
>  <h3>...</h3>
>  <p>..<p>
>  <p>..<p>
>  <h2>...</h2>
>  <p>..<p>
>  </wrapper>
> </div>
>
> How will I do that ?

With XSLT?

Seriously, this component doesn't do everything, but what it does do
is useful.

I should, I guess, have raised the question of whether the 'group-by'
XPath is restricted to the subtree which is rooted at the context
node, i.e. the node which matched the 'match' expression. . .

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)

iD8DBQFGVbz0kjnJixAXWBoRAolCAJ9ZOGm2dmsJc2DkvB+J4iSTKVmHpQCdFRap
nsIJld1nWl5afi1CISbJuew=
=bzxX
-----END PGP SIGNATURE-----

Received on Thursday, 24 May 2007 16:27:39 UTC