- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Fri, 23 May 2008 09:54:15 +0100
- To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>
On 23 May 2008, at 08:41, Alessandro Vernet wrote: > On Thu, May 22, 2008 at 10:43 AM, Norman Walsh <ndw@nwalsh.com> wrote: >> If I run <p:wrap match="section" wrap="chap"/> what do I get? >> >> This: >> >> <doc> >> <chap><section>...</section></chap> >> <chap><section>...</section></chap> >> <chap> >> <section> >> <section/> >> </section> >> </chap> >> </doc> >> >> or this: >> >> <doc> >> <chap><section>...</section></chap> >> <chap><section>...</section></chap> >> <chap> >> <section> >> <chap> >> <section/> >> </chap> >> </section> >> </chap> >> </doc> > > The latter seems to give pipeline authors more latitude: assuming that > p:wrap wraps every element matched by the "match" expression, if > pipeline authors only want to wrap top-level sections, they can always > write match="/doc/section". +1 My thinking exactly. Conversely, getting the latter output when p:wrap behaves in the first way would require a recursive pipeline. So I think it should wrap all occurrences. Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Friday, 23 May 2008 08:54:54 UTC