Re: XT implementation question
This can be done but you need to modify XT. I'll attach my mods which should give you an idea of how to do this in your environment. To load the sheet: String sheet = getServletContext().getRealPath(vvalue); XSLProcessorImpl xsl = (XSLProcessorImpl) hash.get(sheet); if (xsl != null) return xsl; xsl = new XSLProcessorImpl(new CommentDriver()); xsl.setStylesheet(fileInputSource(sheet)); xsl.prepareSheet(); hash.put(sheet, xsl); return xsl; To use the sheet: // prepare for output OutputStream p = res.getOutputStream(); res.setContentType("text/html"); ResultTypeHandlerImpl resultTypeHandler = new ResultTypeHandlerImpl(xsl); xsl.setResultTypeHandler(resultTypeHandler); resultTypeHandler.setOutputStream(p); // transform with XSL and write the data xsl.parse(doc); p.close(); This also includes an extension for externally set setting global variables in XT. Jon Smirl jonsmirl@xxxxxxxxxxxx ----- Original Message ----- From: Sebastien Sahuc <ssahuc@xxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Friday, August 06, 1999 4:31 AM Subject: XT implementation question > Hi there, > > We're using James Clark's processor(XT) succesfully in our project. > But as processing speed is important for us, we're looking for a way > to 'cache' Java Object that are used several time. The first kind of > object we need to cache would be object that handles the structure of > an XSL documents so we won't need to parse them again and again. How > can I implemement it ? I mean by this, which Classes should I look for > ? > > Thank for any reply. > > Sebastien Sahuc > ssahuc@xxxxxxxxxxxxxx > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list >
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format