cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Øie <k...@gan.no>
Subject RE: SAX tree?
Date Tue, 13 Nov 2001 14:18:41 GMT
i see what you are getting at and i guess you'll need to wrap your SAXSource
into a XMLFragment first... but i don't really know because i cannot find
anywhere xsp documentation except the little pieces of documentation for
cocoon1.8.

This is pseudo code, i havent even tried to run it!!!! but it should give
you an idea...


<xsp:logic>

public class myFragment implements XMLFragment {

	private SAXSource source = null;

	public myFragment(SAXSource source ) {
		this.source = source;
		}

	public void toSAX( ContentHandler handler ) {
		try {
			TransformerFactory factory = TransformerFactory.newInstance();
			Transformer transformer = factory.newTransformer();
			transformer.transform( this.source, new SAXResult(handler) );
			}
		catch( Exception e ) {
			aaaaarrrrrggggg!!!
			}
		}
	}


	SAXSource msg = Controller.execute();
	myFragment myfrag = new myFragment( msg );

</xsp:logic>

<xsp:expr>myfrag</xsp:expr>



mvh karl øie/gan media


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message