import org.w3c.tidy.Tidy;
import org.wamblee.xml.ClasspathUriResolver;
import org.wamblee.xml.DOMUtility;
-import org.wamblee.xml.XSLT;
+import org.wamblee.xml.XslTransformer;
/**
* General support claas for all kinds of requests.
aMethod = executeWithRedirects(aClient, aMethod);
byte[] xhtmlData = getXhtml(aMethod);
- XSLT xsltProcessor = new XSLT(new ClasspathUriResolver());
+ XslTransformer xsltProcessor = new XslTransformer(new ClasspathUriResolver());
Document transformed = xsltProcessor.transform(xhtmlData,
xsltProcessor.resolve(_xslt));
ByteArrayOutputStream os = new ByteArrayOutputStream();
import org.apache.commons.mail.HtmlEmail;
import org.dom4j.Element;
import org.wamblee.xml.ClasspathUriResolver;
-import org.wamblee.xml.XSLT;
+import org.wamblee.xml.XslTransformer;
/**
* A notifier that uses SMTP to notify users by mail.
private String transformReport(Element aReport, String aXslt)
throws IOException, TransformerException {
String reportXmlText = aReport.asXML();
- XSLT xsltProcessor = new XSLT(new ClasspathUriResolver());
+ XslTransformer xsltProcessor = new XslTransformer(new ClasspathUriResolver());
return xsltProcessor.textTransform(reportXmlText.getBytes(), xsltProcessor.resolve(aXslt));
}
}
/**
* XSLT utilities.
*/
-public class XSLT {
+public class XslTransformer {
private TransformerFactory _factory;
* @param aResolver
* URI resolver to use.
*/
- public XSLT(URIResolver aResolver) {
+ public XslTransformer(URIResolver aResolver) {
_factory = TransformerFactory.newInstance();
_factory.setURIResolver(aResolver);
}
* Constructs the XSLT processor.
*
*/
- public XSLT() {
+ public XslTransformer() {
_factory = TransformerFactory.newInstance();
}