17. 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
  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 label="C_ell">
      <item label="_Increment Column Span"
            icon="../common/icons2/incrColumnSpan.gif"
            command="xhtml.tableEdit" parameter="incrColumnSpan"/>
      <item label="_Decrement Column Span"
            icon="../common/icons2/decrColumnSpan.gif"
            command="xhtml.tableEdit" parameter="decrColumnSpan"/>
      ...
    </menu>
    <separator />
    <item label="_Go to Opposite Link End"
          command="followLink" parameter="swap"/>
    ...
    <separator />
    <item label="Pre_view" icon="../common/icons/Refresh16.gif"
          command="xhtml.preview">
      <accelerator code="F5" />
    </item>
  </menu>