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