public void endElement(String uri, String localName, String name) throws SAXException {
String content = flushText();
if (uri.equals(OPSDocument.xhtmlns)) {
if (localName.equals("style")) {
CSSParser parser = new CSSParser();
parser.setCSSURLFactory(new EPUBCSSURLFactory(document.resource));
try {
CSSStylesheet css = parser.readStylesheet(new StringReader(content));
String inlineName = PathUtil.resolveRelativeReference(document.resource.getName(), "inline.css");
StyleResource sr = epub.createStyleResource(inlineName);
sr.setCSS(css);