On 11/22/2011 10:29 AM, Yves Forkl wrote:
> Am 22.11.2011 09:19 schrieb Hussein Shafie:
>
>> The split command is a generic command which works with any document
>> type, with or without a configuration.
>>
>> This command leverages the schema to determine whether the document
>> after splitting the explicitly selected element in two at caret
>> position would still be valid. If this is the case, the split command
>> should work fine, otherwise it is disabled (grayed).
>
> Does this mean that split will never work when I am unable to find a caret 
> position within my list instance at which the split command becomes enabled, 
> with the whole list explicitly selected?
>

That's right.



> Can you explain this on the basis of the structure info below?
>
> My list instance looks like:
>
> <labeledlist>
>    <labeledlistitem>
>      <itemlabel>One.</itemlabel><listitem><para>Item 1.</para></listitem>
>    </labeledlistitem>
>    <labeledlistitem>
>      <itemlabel>Two.</itemlabel><listitem><para>Item 2.</para></listitem>
>    </labeledlistitem>
> </labeledlist>
>
> And the DocBook 4.5 DTD has been extended with:
>
> <!ELEMENT labeledlist
>            (blockinfo?,
>             (%formalobject.title.content;)?,
>             (%listpreamble.mix;)*,
>             labeledlistitem+)>
>
> <!ELEMENT labeledlistitem
>            (itemlabel,
>             listitem)>
>
> <!ELEMENT itemlabel
>            (%docinfo.char.mix;)*>
>
> I suspect it is the mandatory pairing of<itemlabel>  and<listitem>  that 
> prevents splitting because the split command is unable to duplicate it.

That's right.

Other examples, the split command cannot split a section:

     REASON: the split command cannot generate a title for the section 
resulting from the split.

or a variablelist:

     REASON: the split command cannot generate a listitem for the 
varlistentry being split and/or it cannot generate a term for the 
varlistentry resulting from the split.




> If so, what approach can I take to enable splitting of the list (beyond 
> modifying the DTD)?
>

I'm afraid you'll have to write a custom command for that. A 
macro-command should do (if you are well-versed in advanced 
macro-command writing).

 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to