El 18/03/2011 14:45, Hussein Shafie escribió:
> On 03/18/2011 01:31 PM, Manuel Collado wrote:
>> ...
>> In brief, is it really necessary to invent always different names for
>> commands in different configurations that may eventually be used at the
>> same time?
>
> Yes, you should always use globally unique command names in your custom
> configurations.
>
> Here at XMLmind, we do this by adding a short "XXX." prefix to the
> actual name of the command. Doing the same in your custom configurations
> is strongly recommended.

Is this limitation/recommendation documented somewhere?

>
> Actual examples:
> ---
>    <command name="dita.editIndexTerm">
>      <class>com.xmlmind.xmleditext.dita.EditIndexTerm</class>
>    </command>
>
>    <command name="docb.editIndexTerm">
>      <class>com.xmlmind.xmleditext.docbook.EditIndexTerm</class>
>    </command>
>
>    <command name="db5.editIndexTerm">
>      <class>com.xmlmind.xmleditext.docbook.EditIndexTerm</class>
>    </command>
> ---
>
> Of course, in the above examples, all the commands serve the same
> purpose, but have different implementations (or db5.editIndexTerm, the
> DocBook 5 instance will have a slightly different behavior from
> docb.editIndexTerm, the DocBook 4 instance).
> ...
>> If what I describe is a possible bug,
>
> No, it's not a bug in XXE.

Well, not a bug. But IMHO a serious limitation. In the extreme case, one 
should consult all XXE powerusers around the world before choosing a 
command name prefix, to be sure there are no clashes.

If the unique global namespace limitation persists, then I would 
recommend, at least:

- Make it explicit somewhere in the documentation, and

- Issue a warning alert at startup or at document open if there are 
actually duplicated command names.

Not a real solution, I think, but at least it would have saved me a full 
work day of tests before realizing why activating the same option in the 
current custom menu does different things at different times (I was 
comparing a couple of alternate variants of a common base configuration).

Thanks for your quick answer.

Regards,
-- 
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado

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

Reply via email to