throws PAPIException {
MarinerPageContext pageContext
= ContextInternals.getMarinerPageContext(context);
PaneAttributes attributes = (PaneAttributes) papiAttributes;
// Try and find the pane with the specified name, if it could not be
// found then return and skip the element body.
String paneName = attributes.getName();
if (paneName != null) {
FormatReference formatRef =
FormatReferenceParser.parsePane(paneName, pageContext);
Pane pane = pageContext.getPane(formatRef.getStem());
NDimensionalIndex paneIndex = formatRef.getIndex();
if (pane == null) {
skipped = true;
return SKIP_ELEMENT_BODY;
}
paneInstance = (AbstractPaneInstance)
pageContext.getFormatInstance(pane, paneIndex);
if (paneInstance.ignore()) {
skipped = true;
return SKIP_ELEMENT_BODY;
}
paneInstance.setStyleClass(attributes.getStyleClass());
MCSAttributes pAttributes = paneInstance.getAttributes();
// get the styles for the current element and set it on the MCSAttributes
pAttributes.setStyles(pageContext.getStylingEngine().getStyles());
pageContext.pushContainerInstance(paneInstance);