Wednesday, April 8, 2009, 5:27:11 PM, Hussein Shafie wrote:
> Daniel Dekany wrote:
>> If I select a bunch of para-s (and like), and try wrap it (Ctrl + T),
>> XXE won't offer the "section" element, despite that "section" would be
>> a proper wrapper according to the schema. I suppose it's because
>> "section" needs a "title" child, and by merely wrapping into a
>> "section" it wouldn't be there. Still, inserting a "section" works as
>> expected (it adds an empty title automatically), I guess because there
>> is a hand-made template for new "section" elements. This reminds me to
>> the problem with DocBook 5 "link"-s (you can't wrap stuff into that
>> either, yet you can insert it). I understand that the core of the
>> problem is that merely with simple operations (adding one element at
>> once) it's not possible to build all possible valid XML-s through a
>> sequence of valid states... but since some of the problematic elements
>> can already be inserted, can't that feature be extended to
>> automatically work with wrapping as well? Like, can't those templates
>> (if you use templates for this) have a slot for the enclosed content?
>> Then, after wrapping into a bare "section" turns out to be invalid,
>> XXE could try wether wrapping into the template leads to valid state.
>> I don't know anyway... just thinking aloud. It's quite confusing when
>> elements are missing from the list for reasons like this.
>>
>
> * May be this will work for you: explicitly select the first paragraph
> to be wrapped and then use DocBook|Demote (shortcut: "F2 Left-Arrow").
(You meant DocBook|Promote, of course.)
> * XXE v4.3 (to be released next friday) has a slightly more powerful
> convert and split commands. However the enhanced convert command
> still cannot wrap paragraphs into a section. We do not intend to
> further enhance generic commands in the near future. If you often
> need to wrap paragraphs into a section, the only solution you'll
> have is to write a macro for that.
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'm usually confident about what elements can occur where, so usually
I won't be confused if an element is missing from that filtered list,
find out why it's missing. But certainly this doesn't stand for many
other users. That element list meant to help, yet sometimes it does
the opposite. Especially in tricky cases like this with "section". How
this could be improved (like in the far future)... what comes into my
mind right now (so it's just a possible starting point) is that there
should be a second filtered list with some reddish coloring that shows
the elements that are known but not allowed for the current operation.
So, if I select some para-s, Ctrl+T, and then type "sec", then I will
see "section" is shown in that second list (an instant feedback
regarding I remember and typed the elment name well, and I won't have
to look harder in the first list -- this could be even more useful
with rarely used elements anyway), and selecting it could tell why it
can't be used now. I don't know how difficult this would be to
implement though... or something like this...
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
--
Best regards,
Daniel Dekany