if (buffer != null && buffer instanceof DOMOutputBuffer) {
DOMOutputBuffer domBuffer = (DOMOutputBuffer) buffer;
// get the shortcut properties from the menu.
Menu menu = item.getMenu();
TextAssetReference shortcutValue = item.getShortcut();
if (menu != null && shortcutValue != null &&
customisation.supportsAccessKeyAttribute()) {
String shortcutTextValue =
shortcutValue.getText(TextEncoding.PLAIN);
if (shortcutTextValue != null) {
// this is never null.
ShortcutProperties shortcutProps =
menu.getShortcutProperties();