Marc wrote:
> For the other thing, it's possible to active the menu entry only when the 
> user insert a <A> or the parent of <A> is the current node?

If a macro starts with:

<sequence>
  <command name="selectNode"
    parameter="ancestorOrSelf[implicitElement] A" />

then the menu item bound to this macro will be disabled (i.e. grayed)
unless an <A> element or a descendant of an <A> element is implicitly or
explicitly selected. This is often the kind of behavior we want for a
macro designed to act on a given type of element.

It is also possible to achieve the same effect with
<match pattern="XXX"/>,
however command "selectNode", when possible, will also select the <A>
element for you.

See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/selectNode.html

See
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/macro_reference.html

Reply via email to