19. menu

<menu
  label = non empty token
  name = NMTOKEN
  insert = non empty token
  replace = non empty token
  replaceEnd = non empty token
>
  Content: [ menu | separator | item | insert ]*
</menu>

<separator />

<insert />

<item
  label = non empty token
  name = NMTOKEN
  icon = anyURI
  command = NMTOKEN (optionally preceded by a command namespace)
  parameter = string
>
  Content: [ accelerator ]?
</item>

<accelerator
  code = key code
  modifiers = possibly empty list of (ctrl|shift|alt|meta|altGr|mod)
/>

Specifies the label and content of the XML (placeholder) menu.

Note that the mnemonic of a menu or of a menu item is specified by adding an underscore ('_') before the character used as a mnemonic. Currently, only a-zA-Z0-1 characters can be used as mnemonics. Moreover, Java™ does not make a difference between an uppercase letter and a lowercase letter.

Example:

<menu label="_XHTML">
  <menu name="pasteAsMenu" label="Paste _As">
    <item name="pasteAsPItem" label="_p"
          command="pasteAs"
          parameter="toOrAdd
                     #template({http://www.w3.org/1999/xhtml}p,PAA.p)"/>
    ...
  </menu>
  <separator />
  <item name="moveUpItem" label="Move _Up"
        icon="xxe-config:common/icons/up.png"
        command="moveElement" parameter="up" />
  <item label="Move _Down"
        icon="xxe-config:common/icons/down.png"
        command="moveElement" parameter="down" />
</menu>