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

Re: p:wrap

From: Jeni Tennison <jeni@jenitennison.com>
Date: Fri, 23 May 2008 09:54:15 +0100
Message-Id: <117C8504-4392-42CF-8C8D-986BAAE756D9@jenitennison.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 23 May 2008 08:54:56 GMT