// attach the referenced element to the current document
((HiddenChildElement)g).setParentElement(e);
// compute the style of the <g> as it may have local
// references we have to update
ViewCSS viewCSS = (ViewCSS)document.getDefaultView();
CSSOMReadOnlyStyleDeclaration decl =
(CSSOMReadOnlyStyleDeclaration)(viewCSS).getComputedStyle(g, null);
try {
CSSUtilities.updateURIs(decl, refDocument.getURLObject());
} catch (MalformedURLException ex) {