if (ref == null || ref.length() == 0) {
return getPreserveAspectRatioTransform(e, w, h, ctx);
}
ViewHandler vh = new ViewHandler();
FragmentIdentifierParser p = new FragmentIdentifierParser();
p.setFragmentIdentifierHandler(vh);
p.parse(ref);
Element attrDefElement = e; // the element that defines the attributes
if (vh.hasId) {
Document document = e.getOwnerDocument();
attrDefElement = document.getElementById(vh.id);