// The referenced 'svg' and its contents are deep-cloned into the
// generated tree. If attributes width and/or height are provided
// on the 'use' element, then these values will override the
// corresponding attributes on the 'svg' in the generated tree.
try {
SVGOMAnimatedLength al = (SVGOMAnimatedLength) ue.getWidth();
if (al.isSpecified()) {
localRefElement.setAttributeNS
(null, SVG_WIDTH_ATTRIBUTE,
al.getAnimVal().getValueAsString());
}
al = (SVGOMAnimatedLength) ue.getHeight();
if (al.isSpecified()) {
localRefElement.setAttributeNS
(null, SVG_HEIGHT_ATTRIBUTE,
al.getAnimVal().getValueAsString());
}
} catch (LiveAttributeException ex) {
throw new BridgeException(ctx, ex);
}
}