On 10/05/2010 07:22 PM, Hussein Shafie wrote:
On 10/05/2010 06:52 PM, Philippe Nobili wrote:
  Dear M. Shafie,

In our XMLMind configuration, we use<elementTemplate>  element to change
some of the templates for elements in our XML schema. When we add
insert-after(),... buttons, we see the following:

+ When we do not use the @selectable attribute, the new template item is
displayed in the menu in addition to the standard element,  for instance
for our element, which is<menu>: menu(menu). This is in line with what
is in the documentation... but we do not want to see the duplicate
items: menu and menu(menu)

+ When we set @selectable to "override", we expected to see only one
menu item in the generated pulldown; it is effectively what happens, but
then our template is not executed and the default element is generated
instead.
-->  This probably happens because inserting the content of your
elementTemplate would cause the document to become invalid.
Dear M. Shafie,

Yes, this is exactly what happens.

But in this case this is unfortunate since the invalidity is due to mandatory attributes (which then receive the default value '???' when the elements are created).

So the result is as invalid as if the default template were used, no more. The same would happen if you create an <xref> in DocBook document: the document becomes invalid until you specify the @linkend attribute...

Is there a workaround ? (needless to say, we cannot suggest default values for the mandatory attributes or we would have done this...).

Many thanks for your help in any case,
Philippe.

<<attachment: philippe_nobili.vcf>>

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

Reply via email to