cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject Re: XSP confusion
Date Thu, 25 May 2000 21:34:32 GMT
on 5/25/00 3:35 PM, Giacomo Pati at Giacomo.Pati@pwr.ch wrote:

> I understand what Ricardo was saying is that the process of generating
> the java code from a XSP page is done using DOM. The compiled java class
> is in fact a generator which emits SAX events. As long as you use "pure"
> XSP you don't have to worry if it's DOM or SAX.
> 
> If you use XSP internal stuff like:
> 
> xspCurrentNode.appendChild(document.importNode(domElement, true));
> 
> you're in trouble because in Cocoon 2 it will be something like
> 
> xspAttr.clear();
> this.contentHandler.startElement("", "p", "p", xspAttr);
> this.characters("I'm a logicsheet-generated text!");
> this.contentHandler.endElement("", "p", "p");
> 
> Giacomo
Thanks.
My question is, why do I have to be in "trouble" :-)
If I have classes that generate DOM elements and Node's (which I won't mind
porting to SAX if need be) is there no way to easily append them to the XSP
pages?  This is where I'm confused about what direction to take.  Is it
prudent to start rewriting my methods that return DOM Element objects to
return SAX objects?  Any advice appreciated.


Mike


Mime
View raw message