John L. Clark wrote:
> this is another use case that could be elegantly addressed with
> placeholder elements in element templates, which I proposed in
> February[0].  In this case, you might have an 'elementTemplate'
> instruction like the following:
>
>   <cfg:elementTemplate name="wrapper" selectable="override">
>     <section xmlns="http://docbook.org/ns/docbook";>
>       <title></title>
>
>       <cfg:convertedContent>
>         <para></para>
>       </cfg:convertedContent>
>     </section>
>   </cfg:elementTemplate>
>
> Note the use of `selectable="override"`, to make this work as a
> drop-in replacement for the automatically generated template for the
> 'section' element.  If there is no existing content, then the contents
> of the 'cfg:convertedContent' element would be used as the default.
> Otherwise, such as when wrapping existing content, the existing
> content would replace the 'cfg:convertedContent' element.  Users could
> write their own element templates to have a set of wrappable sections
> to choose from, each with different default content.
>   
I would find this feature extremely useful as well, and not just on
sections. We have other kinds of structures in our DTD where a paragraph
is contained into an intermediate element, itself contained in the one
I'd like to wrap the para with:

wrapper
intermediate
para (the one selected initially)
anotherElement
para (which would be filled by the cfg:elementTemplate


A similar useful use case to consider when you're going to improve
elementTemplate: select a few paragraphs (or even just one, actually)
and convert/wrap them into a list. This is a single button click action
in common word processing software so, in XXE, new users struggle with
this use case. I know, we can write a button for this, but then we'll
have 2 sets of list-handling toolbar buttons...

I teach users to build block structure/styling first and type the text
after, but this is the exact opposite of the approach taken by common
word processing software, so it takes a while for new users to get used
to it.


Cheers,
Benoit

> Take care,
>
>     John L. Clark
>
> [0] 
> http://www.xmlmind.com/pipermail/xmleditor-support/2009-February/007413.html
>  
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
>   

-- 
Benoit Maisonny                benoit at synclude.com
Director & Consultant          http://synclude.com
Synclude


Reply via email to