Hi Dan
Here�s a little method using the XSLTService, that I have added to
a tool I am using:
/**
* Transforms a given xml schema using the given xsl schema
* and returns the result as a string. So it can be used
* in a velocity template as $session.transform("test.xml","test.xsl")
* @param xml name of xml file
* @param xsl name of xsl file
* @return String of rendered output
*/
public String transform(String xml, String xsl)
{
String result = null;
try {
TurbineXSLT xslt = new TurbineXSLT();
Reader r = new FileReader(xml);
result = xslt.transform(xsl,r);
r.close();
}
catch (Exception e) {
Log.error(e);
}
if (result == null)
result = "<font color=\"red\">Error converting file" + xml +
"</font>";
return result;
}
Hope that helps
Uwe
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>