use of com.steadystate.css.parser.SACParserCSS2 in project onebusaway-application-modules by camsys.
the class CssResourceImpl method parse.
private String parse() throws IOException {
InputStreamReader reader2 = new InputStreamReader(_cssUrl.openStream());
InputSource source2 = new InputSource(reader2);
Parser p = new SACParserCSS2();
CssDocumentHandlerImpl handler = new CssDocumentHandlerImpl(_context, _parentBundle);
p.setDocumentHandler(handler);
p.parseStyleSheet(source2);
reader2.close();
return handler.getResults();
}
use of com.steadystate.css.parser.SACParserCSS2 in project onebusaway-application-modules by camsys.
the class CssDocumentHandlerImpl method parse.
private void parse(String snippet) throws CSSException {
try {
BufferedReader reader = new BufferedReader(new StringReader(snippet));
InputSource source = new InputSource(reader);
Parser p = new SACParserCSS2();
p.setDocumentHandler(this);
p.parseStyleSheet(source);
reader.close();
} catch (IOException ex) {
throw new CSSException(ex);
}
}
use of com.steadystate.css.parser.SACParserCSS2 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();
}
Aggregations