Subject: Castor -> XSLT From: Jason Russ <JRuss@xxxxxxxxxxxxxxxxxxx> Date: Thu, 26 Oct 2000 10:56:10 -0400 |
Can someone please tell me how one would go about piping the output of castor to an XSLT processor (specifically Xalan)? I have been trying many ways do this in the last day but to no avail. Here is my latest attempt. public void run() throws Exception { Iterator iter = CoreCentral.instance().getContactSet().iterator(); // create XSLT Engine // Have the XSLTProcessorFactory obtain a interface to a // new XSLTProcessor object. XSLTProcessor processor = XSLTProcessorFactory.getProcessor(); // create and set the stylesheet to be used StylesheetRoot stylesheet = processor.processStylesheet("contacts-html.xsl"); processor.setStylesheet(stylesheet); // create and set the document handler for the XSLT Engine org.xml.sax.DocumentHandler dh = sylesheet.getSAXSerializer(System.out); processor.setDocumentHandler(dh); // Create a File to marshal to // create a Castor marshaller and send the output to the XSLT Engine Marshaller marshaller = new Marshaller(processor); marshaller.setMarshalAsDocument(true); while (iter.hasNext()) { Object o = iter.next(); // Marshal the contact object try{ marshaller.marshal(o); } catch(MarshalException e){ e.printStackTrace(); } catch(ValidationException e){ e.printStackTrace(); } } } -- Jason L. Russ Software Consultant Korson-McGregor, A Software Technology Company (Formerly known as Software Architects) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re[2]: dynamic name/value pairs on , Brennan OShea | Thread | Re: Castor -> XSLT, Gary L Peskin |
Re: How to declare a param which n, Gilles Durys | Date | How do I get the name of the curren, Mike Clarke |
Month |