// Javadoc inherited.
public void doMenu(MenuAttributes attributes) throws ProtocolException {
Styles styles = attributes.getStyles();
PropertyValues propertyValues = styles.getPropertyValues();
// Initialise the content buffer.
Pane pane = attributes.getPane();
// NOTE: old menu code is unused.
ContainerInstance containerInstance =
(ContainerInstance) context.getFormatInstance(pane,
NDimensionalIndex.ZERO_DIMENSIONS);
DOMOutputBuffer dom = (DOMOutputBuffer)
containerInstance.getCurrentBuffer();
Element menu = dom.openStyledElement("menu", attributes);
// Add the id attribute if there is one.
String id = attributes.getId();
if (id != null) {
menu.setAttribute("id", id);
}
StyleValue styleValue;
styleValue = propertyValues.getComputedValue(
StylePropertyDetails.MCS_AURAL_MENU_SCOPE);
String scope = styleValue.getStandardCSS();
menu.setAttribute("scope", scope);
styleValue = propertyValues.getComputedValue(
StylePropertyDetails.MCS_AURAL_DTMF_ALLOCATION);
boolean manualDTMF = styleValue == MCSAuralDTMFAllocationKeywords.MANUAL;
if (!manualDTMF) {
menu.setAttribute("dtmf", "true");
}