Dear M. Shafie, Unless we have missed something, we seem to experience an undesirable interaction between template definition and putAttribute (in our case) function. This is what happens:
1. We have a template for one of our element, auxbuf: <cfg:elementTemplate name="auxbuf" selectable="override"> <auxbuf xmlns="http://www.cggveritas.com/geovation/module/2.0" type="Output" number="???" id="???"> <nativeDescript name=""> <shorthelp/> </nativeDescript> <code/> </auxbuf> </cfg:elementTemplate> 2. We have defined a macro to insert an 'auxbuf' element at various places; in this macro, we provide the @type attribute as a parameter (%1). Below is an excerpt of this macro: (NB: 'insert.jxmo2' simply calls 'insert' and assigns an unique, valid ID to the inserted element). <cfg:command name="insert.auxbuf"> <cfg:macro trace="true"> <cfg:sequence> <cfg:pass> <cfg:command name="insert.jxmod2" parameter="%0 {http://www.cggveritas.com/geovation/module/2.0}auxbuf"/> </cfg:pass> <cfg:command name="insert.jxmod2" parameter="%0 {http://www.cggveritas.com/geovation/module/2.0}auxbuf"/> <cfg:set variable="implicitElement" expression="$selectedElement"/> <cfg:command name="putAttribute" parameter="[implicitElement] type %1"/> <!-- Skipped ..... --> </cfg:sequence> </cfg:macro> </cfg:command> When when execute this macro with %1 set to 'Output' (one of the two possible values for this mandatory attribute, the other being 'Input'), we get the following error reported (when the trace is ON): -->insert.auxbuf:command: checking... putAttribute "type Output" <--insert.auxbuf:command: CANNOT EXECUTE Meaning that 'Output' would not be a legal value for this attribute, which is wrong. 3. When we comment out our template's definition, the macro works as expected again: -->insert.auxbuf:command: checking... putAttribute "type Output" <--insert.auxbuf:command: can execute The same macro works fine when 'Input' is passed instead of 'Output'; did we miss something here ? Many thanks, Philippe. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

