[jdom-interest] problems applying XSL transform to JDOM
Justin.Edelson at mtvn.com
Tue Aug 15 08:20:17 PDT 2006
> Transform doesn't appear to have any methods that return a JDOM
> Document. Is there some way to transform a JDOM document object and
> not write directly to a file?
Check out the JDOMResult class.
From: jdom-interest-bounces at jdom.org
[mailto:jdom-interest-bounces at jdom.org] On Behalf Of
wkrick at eio-online.com
Sent: Tuesday, August 15, 2006 10:58 AM
To: jdom-interest at jdom.org
Subject: Re: [jdom-interest] problems applying XSL transform to JDOM
Quoting Mattias Jiderhamn <mj-lists at expertsystems.se>:
> At 2006-08-15 00:22, wkrick at eio-online.com wrote:
>> I'm trying to use the method shown here to apply an XSL transform to
>> my JDOM document...
>> Is there an easier way? Basically, I have a JDOM Document object in
>> my application, I want to apply an XSL transform and write out the
>> result to a file.
> TransformerFactory factory = TransformerFactory.newInstance();
> Transformer transformer = factory.newTransformer( new
> StreamSource(xslFile) );
> JDOMSource xmlSource = new JDOMSource(document);
> StreamResult result = new StreamResult(outputFile);
> transformer.transform(source, result);
Thanks for the help.
Transform doesn't appear to have any methods that return a JDOM
Document. Is there some way to transform a JDOM document object and
not write directly to a file?
To control your jdom-interest membership:
More information about the jdom-interest