cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gunter D'Hondt" <>
Subject doing a Cocoon XSL transformation inside java code
Date Mon, 17 May 2004 14:14:40 GMT

Inside my apple (Cocoon block) I've got a org.w3c.dom.Document (coming
from a org.apache.excalibur.source.Source-object) which I'd like to
transform into another org.w3c.dom.Document using an XSL transformation
(stylesheet is available thru a Source-object); how can I do this with
the Cocoon classes?

So something like:
private Document doTheTransformation(Source xmlsrc, Source
stylesheetsrc) {
	Document outputdoc;
	//get the document from the source-obj            
	InputSource inputsource = new
      Document inputdoc = DomHelper.parse(inputsource);	

	//do the xsl transformation using the stylesheetsrc
	Transformer transformer = .. ??
	transformer.transform(inputdoc, outputdoc);

	//return the result document
	return outputdoc;

Gunter D'Hondt 

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

View raw message