Nico wrote:
> ? Of course the following case cannot be supported, and I'm sure that  
> na?ve users can easily understand why:
> 
> <section id="example">
>   <para>Paragraph #1.</para>
>   <section id="invalid-sub-example">
>     <para>Paragraph #2.</para>
>     <para>Paragraph #3.</para>
>   </section>
>   <para>Paragraph #4.</para>
> </section>
> 
> The first two cases are what I think should be supported (well, at 
> least  that's what the naive users I know are waiting for ;-). The last 
> wrong  case is meaningless for word like users since when you insert a 
> section  title in a .doc file it's scope always go until the end of the 
> doc, or  until a higher section title level is reached (i.e. the first 
> two cases in  fact).
> 
> So, what is possible and what is not? Anyway even if only the first or  
> second case is possible I'm sure it would be very useful.

I agree on the usefulness of first and second case. And the DocBook DTD, 
for example, clearly forbids third case. But in *our* experience, some 
naive users may expect third case to work too. This the only reason why 
I gave the <section id="example"> example.



---
Please find attached to this email 2 macros:

* splitSection bound to F5, implements first case.
Usage: explicitly select the child of the section which is the split 
point and press F5.

* wrapInSection bound to F6, implements second case.
Usage: explicitly select the child of the section which is the first 
element to be wrapped in a subsection and press F6.

Remarks:
~~~~~~~

* Requires V2.8 Patch 1 because the macros have been marked as undoable.

* Use with DocBook or Simplified DocBook. Requires the use of <section>. 
Will not work with <sect1>, <sect2>, etc.

* Assumes that the <section> has a <title> followed by content elements. 
Probably does not work with metadata such as <sectioninfo>.

* Not extensively tested.

* I often test my macros using customize.xxe but the above macros are 
DocBook specific, therefore they should go into a DocBook customization 
file. See http://lupo/xmleditor/_distrib/docs/configure/ch04.html



---
PS: In my <section id="example">, I forgot to add the mandatory <title> 
child element to the <section>. This changes nothing at all to the above 
discussion.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: customize.xxe
Type: text/xml
Size: 2047 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20041206/500af65b/attachment.xml
 

Reply via email to