XmlDocument xmlDocument = (XmlDocument)node.getOwnerDocument().getUserData(CACHED_NODE);
if (!(xmlDocument instanceof HtmlDocument)) {
String prefix = getLocalNameForNamespace(((Attr)node).getName());
prefix = prefix != null ? prefix : "";
String href = ((Attr)node).getValue();
XmlNamespace xmlNamespace = xmlDocument.getNamespaceCache().get(prefix, href);
if (xmlNamespace != null) return xmlNamespace;
else return XmlNamespace.createFromAttr(ruby, (Attr)node);
}
}
XmlNode xmlNode = getCachedNode(node);