Search in sources :

Example 6 with InputSource

use of org.w3c.css.sac.InputSource in project onebusaway-application-modules by camsys.

the class CssResourceTransformationStrategy method parse.

/**
 ***************************************************************************
 * Private Methods
 ***************************************************************************
 */
private String parse(ResourceService resourceService, URL url) throws IOException {
    InputStreamReader reader2 = new InputStreamReader(url.openStream());
    InputSource source2 = new InputSource(reader2);
    Parser p = new SACParserCSS2();
    CssDocumentHandler handler = new CssDocumentHandler(resourceService, _locale);
    p.setDocumentHandler(handler);
    p.parseStyleSheet(source2);
    reader2.close();
    return handler.getResults();
}
Also used : InputSource(org.w3c.css.sac.InputSource) InputStreamReader(java.io.InputStreamReader) SACParserCSS2(com.steadystate.css.parser.SACParserCSS2) Parser(org.w3c.css.sac.Parser)

Aggregations

InputSource (org.w3c.css.sac.InputSource)6 SACParserCSS2 (com.steadystate.css.parser.SACParserCSS2)3 InputStreamReader (java.io.InputStreamReader)3 Parser (org.w3c.css.sac.Parser)3 IOException (java.io.IOException)2 StringReader (java.io.StringReader)2 CSSStyleDeclaration (org.w3c.dom.css.CSSStyleDeclaration)2 CSSStyleRuleImpl (com.steadystate.css.dom.CSSStyleRuleImpl)1 CSSStyleSheetImpl (com.steadystate.css.dom.CSSStyleSheetImpl)1 CSSOMParser (com.steadystate.css.parser.CSSOMParser)1 BufferedReader (java.io.BufferedReader)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 StyleDefinition (org.kie.workbench.common.stunner.svg.gen.model.StyleDefinition)1 StyleSheetDefinition (org.kie.workbench.common.stunner.svg.gen.model.StyleSheetDefinition)1 CSSException (org.w3c.css.sac.CSSException)1 CSSRule (org.w3c.dom.css.CSSRule)1 CSSRuleList (org.w3c.dom.css.CSSRuleList)1 CSSStyleSheet (org.w3c.dom.css.CSSStyleSheet)1 WikiModelException (org.xwiki.rendering.wiki.WikiModelException)1