On Wed, Apr 8, 2009 at 2:54 PM, Daniel Dekany <ddekany at freemail.hu> wrote:
> I just wanted to draw attention to this kind of problem: it's not
> about convenience (how many keystrokes is it to achieve something),
> but about preventing confusion ("Why the heck I can't do that???").

I argue that it's about both; for a novice user, it's about preventing
confusion, but for an advanced user, it's about convenience.  That
aside, 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.

Take care,

    John L. Clark

[0] http://www.xmlmind.com/pipermail/xmleditor-support/2009-February/007413.html

Reply via email to