cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: Newbie: DOM -XSL-> markup?
Date Tue, 02 May 2000 11:26:29 GMT wrote:
>All the information I\'ve found on XML/DOM/XSL etc
>is rather focused on applying XSL on XML files.

XML entities in Cocoon do not have to be actual "files" on a disc. They can 
be entirely generated at request time, for example. The word "files" is just 
used as a figure of speech.

>Is there a way to control XSL in my \'object space\'?
>What I want to do, is generate a DOM object on
>the basis of IMAP data, apply client dependant
>XSL to that, and output a valid markup (eg. WML/HTML).
>The XML technologies are new to me, so if this
>doesn\'t make sense, please correct me:
>Can I construct a DOM object in memory, instantiate
>some \'XSL object\' from an XSL file and somehow
>generate/restrict output based on that?

Sure, this is precisely what Cocoon does! Write either a Producer or an XSP 
page to construct the DOM object (XSP will be probably be easier and more 
maintainable), and return it from the getDocument methods (this is done 
automatically with XSP, you don't need to do anything). Put processing 
instructions in the DOM to specify the stylesheet and formatters to be used, 
and Cocoon will do the rest. See the javadocs for 
org.apache.cocoon.producer.Producer (no typo).

However, be warned - DOM will not be used in Cocoon 2, SAX will because it's 

>Pointers to info relevant to this topic is greatly
>appreciated, thanks.

The webserver is not responding right now (connection 
refused) but you should have all the docs you need under docs javadocs or 
build/docs in your cocoon directory.


270+ Open Source Java links!

Get Your Private, Free E-mail from MSN Hotmail at

View raw message