Subject: RE: Please help with XT From: prasadm@xxxxxxx Date: Fri, 28 Apr 2000 11:20:42 -0500 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Please help with XT, Jan Vopalensky | Thread | Re: Please help with XT, Maksim Zhizhkun |
RE: Please help with XT, Jan Vopalensky | Date | RE: XSLT Programmers Reference, Selva, Francis |
Month |