cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Mauch <>
Subject JDOMTransformer
Date Thu, 14 Feb 2002 16:56:37 GMT
Hi All
I made a simple JDOMTransformer. If you like it, i contribute it. Somebody
can commmit it to CVS.
I don't made any tests how the performance is affected by 
this transformer. But is comfortable to use :)

package org.apache.cocoon.transformation;

import org.jdom.Document;
import org.jdom.input.DOMBuilder;
import org.jdom.output.DOMOutputter;
 * Title: A simple JDOM transformer
 * @author Thorsten Mauch
 * @version 1.0

public abstract class AbstractJDOMTransformer extends AbstractDOMTransformer

  protected org.w3c.dom.Document transform(org.w3c.dom.Document doc) {
    DOMBuilder builder = new DOMBuilder();
    DOMOutputter outputter = new DOMOutputter();

      return outputter.output(transform(;
    catch(Exception e){
      log.error("Error while JDOMTransformation",e);
      return doc;

  protected abstract Document transform(Document doc);


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message