Ticket #460 (closed defect: fixed)
XSLTUtil optimizations, questions
Description
in static block of XSLTUtil.java I can see the possibleoptmization: Now there is code:
Reader reader = new StringReader(getDefaultXSLT().toXML());
transformer = tfactory.newTransformer(new StreamSource(reader));
I.e. we get a default xslt in the method getDefaultXslt() as an InputStream?, then convert it to XOM's Document, and then again convert it to string via toXML(), and then new Trasformer(reader) tries to parse XSLT again. Maybe it would be worthwhile to write the following line:
transformer = tfactory.newTransformer(new StreamSource(XSLTUtil.class.getResourceAsStream("xsl2/bla.xsl")));
2) Also I don't understand why we use xalan (the default value) when transforming using default xslt, thas is I don't see where we set a property in the static block like:
System.setProperty("javax.xml.transform.TransformerFactory",
"net.sf.saxon.TransformerFactoryImpl");
3) Also when we provide a custom stylesheet to XSLTUtil, then there is no way to provide a URI resolver, thus files in a jar for example won't be resolved
