/**
* Returns the translation of the non-CSS hints to the corresponding
* CSS rules. The result can be null.
*/
public static CSSStyleDeclaration getNonCSSPresentationalHints(Element elt) {
CSSStyleDeclaration result = null;
SVGDOMImplementation svgImpl;
svgImpl = (SVGDOMImplementation)elt.getOwnerDocument().getImplementation();
Set pa = svgImpl.getPresentionAttributeSet();
NamedNodeMap nnm = elt.getAttributes();
int len = nnm.getLength();
for (int i = 0; i < len; i++) {
Node attr = nnm.item(i);
String an = attr.getNodeName();
if (pa.contains(an)) {
if (result == null) {
DOMImplementation impl;
impl = elt.getOwnerDocument().getImplementation();
CSSStyleDeclarationFactory f;
f = (CSSStyleDeclarationFactory)impl;
result = f.createCSSStyleDeclaration();
}
result.setProperty(an, attr.getNodeValue(), "");
}
}
return result;
}