return transformFile(file.getName(), universalFile, write);
}
private static String transformFile(String filename, UniversalFile universalFile, boolean write)
{
OutputFile classFile= new OutputFile(universalFile);
CompilationBundle resources= new CompilationBundle();
OutputFile outputFile= deXmlvmOutputProcess.generateDEXmlvmFile(classFile, resources);
Collection<XmlvmResource> resources2= resources.getResources();
boolean writing= write;
if (writing)
outputFile.write();
String fileName= "";
String fileAsString= null;
for (XmlvmResource xmlvmResource : resources2)
{
OutputFile runXSLT= XsltRunner.runXSLT("xmlvm2js.xsl", xmlvmResource.getXmlvmDocument());
if (writing)
{
runXSLT.setLocation(".");
fileName= filename + ".js";
runXSLT.setFileName(fileName);
runXSLT.write();
}
fileAsString= runXSLT.getData().getFileAsString();
}
return fileAsString;
}