final SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
final String uri = "file:" + scope.basePath + "/" + file;
final SVGOMDocument doc = (SVGOMDocument) f.createDocument(uri);
// Initialize the CSS Engine for the document
final SVGDOMImplementation impl = (SVGDOMImplementation) SVGDOMImplementation.getDOMImplementation();
final UserAgent userAgent = new UserAgentAdapter();
final BridgeContext ctx = new BridgeContext(userAgent, new DocumentLoader(userAgent));
doc.setCSSEngine(impl.createCSSEngine(doc, ctx));
return Context.javaToJS(doc, scope);
}
catch (Exception e)
{