[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XT implementation question

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.