RE: wrap

> -----Original Message-----
> From: public-xml-processing-model-wg-request@w3.org 
> [mailto:public-xml-processing-model-wg-request@w3.org] On 
> Behalf Of Norman Walsh
> Sent: Thursday, May 22, 2008 7:44 PM
> To: public-xml-processing-model-wg@w3.org
> Subject: p:wrap
> 
> Consider:
> 
>   <doc>
>     <section>...</section>
>     <section>...</section>
>     <section>
>       <section/>
>     </section>
>   </doc>
> 
> 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>
> 

I would say the latter, to make it symmetrical with p:unwrap, for which
the spec explicitly says:

"The matching applies to the entire document, not just the 'top-most'
matches. A pattern of the form h:div will replace all h:div elements,
not just the top-most ones."

Perhaps the same note should be added to p:wrap as well.

Regards,
Vojtech

Received on Friday, 23 May 2008 06:46:51 UTC