AttributeRuleList getRuleList(InputStream stream) throws IOException {
InputSource source = new InputSource(new InputStreamReader(stream));
CSSOMParser parser = new CSSOMParser(new SACParserCSS3());
CSSStyleSheet stylesheet = parser.parseStyleSheet(source, null, null);
CSSRuleList ruleList = stylesheet.getCssRules();
return new AttributeRuleList(ruleList);
}