/** * constructor creating the transformer from the junitreport task. * @param task task delegating to this class */ public AggregateTransformer(Task task) { this.task = task; xsltTask = new XSLTProcess(); xsltTask.bindToOwner(task); }
private XSLTProcess xsltTask() { XSLTProcess xsltTask = new XSLTProcess(); xsltTask.bindToOwner(task); xsltTask.setClasspath(classpath); xsltTask.setXslResource(getStylesheet()); xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile()); return xsltTask; }
private XSLTProcess xsltTask() { XSLTProcess xsltTask = new XSLTProcess(); xsltTask.bindToOwner(task); xsltTask.setClasspath(classpath); xsltTask.setXslResource(getStylesheet()); xsltTask.setIn(((XMLResultAggregator) task).getDestinationFile()); return xsltTask; }
private void gen(ResolutionCacheManager cache, String organisation, String module, String style, String ext) throws IOException { XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); String resolveId = ResolveOptions.getDefaultResolveId(new ModuleId(organisation, module)); xslt.setIn(cache.getConfigurationResolveReportInCache(resolveId, "default")); xslt.setOut(new File(getTodir(), outputname + "." + ext)); xslt.setBasedir(cache.getResolutionCacheRoot()); xslt.setStyle(style); xslt.execute(); }
private void genreport(ResolutionCacheManager cache, String organisation, String module) throws IOException { // first process the report with xslt XSLTProcess xslt = new XSLTProcess(); xslt.setTaskName(getTaskName()); xslt.setProject(getProject()); xslt.init(); String resolveId = ResolveOptions.getDefaultResolveId(new ModuleId(organisation, module)); xslt.setIn(cache.getConfigurationResolveReportInCache(resolveId, "default")); xslt.setOut(new File(getTodir(), outputname + "." + xslext)); xslt.setStyle(xslFile); XSLTProcess.Param param = xslt.createParam(); param.setName("extension"); param.setExpression(xslext); // add the provided XSLT parameters for (Iterator it = params.iterator(); it.hasNext();) { param = (XSLTProcess.Param) it.next(); XSLTProcess.Param realParam = xslt.createParam(); realParam.setName(param.getName()); realParam.setExpression(param.getExpression()); } xslt.execute(); }