public int elementStart(
MarinerRequestContext context,
PAPIAttributes papiAttributes) throws PAPIException {
// @todo overrides the attributes member of this tag
MontageAttributes attributes = (MontageAttributes) papiAttributes;
// Get the internal context from the request context.
pageContext = ContextInternals.getMarinerPageContext(context);
// The MarinerPageContext has been initialised for the page but not for
// the canvas so we need to initialise it here before we do anything
// else.
initialiseCanvas(pageContext, false,
false,
attributes.getId(),
null,
attributes.getTheme(),
attributes.getLayoutName());
// Push the style sheet associated with the montage onto the styling
// engine before we try and process the element. This is required since
// montage can itself have styles.
MarinerPageContext pageContext =