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

RE: Please help with XT

Subject: RE: Please help with XT
From: prasadm@xxxxxxx
Date: Fri, 28 Apr 2000 11:20:42 -0500
jclark xt usage
If you are using jclark's XT. Here is the piece of code which we use
for XSL transformation is servlets.

Note: DMWriteErrorLog is our custom class used for logging debug statements.

      // Parse xsl and xml documents
      Class clasz = Class.forName(com.jclark.xml.sax.Driver);
      Parser parser = (Parser) clasz.newInstance();

      XSLProcessor xslProcessor  = new XSLProcessorImpl();
      xslProcessor.setParser(parser);

      // load the stylesheet
      Reader rdr = (Reader) (new FileReader(XslFilePath));

      InputSource inpS_StyleSheet = new InputSource(rdr);
      DMWriteErrorLog.writeError(METHOD_NAME + "After Creating Input Source
");
      xslProcessor.loadStylesheet(inpS_StyleSheet);
      DMWriteErrorLog.writeError(METHOD_NAME, "Load the StyleSheet");

      // set the output destination
      OutputMethodHandlerImpl outputMethodHandler = new
OutputMethodHandlerImpl(xslProcessor);
      xslProcessor.setOutputMethodHandler(outputMethodHandler);
      outputMethodHandler.setDestination(new ServletDestination(res));

      // xml string
      StringReader strRdr = new StringReader(strXML);
      org.xml.sax.InputSource inpS_Xml = new
org.xml.sax.InputSource(strRdr);
      DMWriteErrorLog.writeError(METHOD_NAME, "Applying XSL");

      try {
         xslProcessor.parse(inpS_Xml);
      }
      catch (Exception ex) {
         DMWriteErrorLog.writeError(METHOD_NAME, " Error in parsing : " +
ex.getMessage());
         throw new Exception(ex.getMessage());
      }


- Prasad

> -----Original Message-----
> From:	Maksim Zhizhkun [SMTP:maksims@xxxxxxxx]
> Sent:	Friday, April 28, 2000 9:26 AM
> To:	XSL-List@xxxxxxxxxxxxxxxx
> Subject:	Please help with XT
> 
> Does anyone could send some piece of code as an example of XT parser usage
> for XSLTransformation.
> I cannot find any documentation on it.
> I've tried many variants of code but always got  an XSL in result doc for
> both SAX and DOM models.
> Could someone recommend some good source of information regarding XT
> usage?
> 
> I'll be appreciated for any help,
> Max
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.