CSSDocumentHandler ssh;
Parser parser = ss.getParser();
parser.setSelectorFactory(AbstractCSSRule.SELECTOR_FACTORY);
parser.setConditionFactory(AbstractCSSRule.CONDITION_FACTORY);
parser.setDocumentHandler(ssh = new CSSDocumentHandler(ss, null, false));
parser.parseRule(new InputSource(new StringReader(rule)));
return ssh.currentRule;
} catch (DOMException e) {
throw CSSDOMExceptionFactory.createDOMException
(DOMException.SYNTAX_ERR,
"rule.syntax.error",