// Open the canvas page.
canvasAttributes.setStyles(styles);
canvasAttributes.setPageTitle(htmlElement.getTitle());
VolantisProtocol protocol = getProtocol(context);
protocol.setWriteHead(true);
protocol.openCanvasPage(canvasAttributes);
} catch (PolicyException e) {
logger.error("unexpected-exception", e);
throw new XDIMEException(e);
} catch (RepositoryException e) {
logger.error("repository-exception", e);