Re: XT implementation question

Subject: Re: XT implementation question
From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx>
Date: Fri, 6 Aug 1999 10:56:45 -0400
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
>

Attachment: XSLProcessorImpl.java
Description: java/

Current Thread