DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4844>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4844 Implement a reusable structure for Translets and DOMs. [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Additional Comments From [EMAIL PROTECTED] 2002-07-24 19:49 ------- Using the TrAX interface, it does appear that we support reusable translets (aka transformer objects). I ran a simple TrAX driver that reused the transformer object on multiple xml files and even changed some parameters, like so Guys, I ran a simple TrAX driver that reused the transformer object on multiple xml files and even changed some parameters, like so Transformer transformer; TransformerFactory factory = TransformerFactory.newInstance(); try { transformer = factory.newTransformer(new StreamSource(stylesheet)); transformer.setParameter("states", "NY"); transformer.transform(new StreamSource(xmlfile1), new StreamResult(System.out)); transformer.setParameter("states", "CA"); transformer.transform(new StreamSource(xmlfile2), new StreamResult(System.out)); } catch (Exception e) { System.err.println("ERROR: " + e); } and it worked. So I'd say the transformer object is reusable. Unless we are misunderstanding the request for supporting a reusable DOM, it isn't feasible. The DOM xsltc creates from the xml document is specific to that document. You can cache the xsltc-specific DOM using the extension class org.apache.xalan.xsltc.trax.XSLTCSource.
