cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject RE: toDOM and toSAX of XMLFragment
Date Tue, 23 Jan 2001 15:54:26 GMT
> > An XMLFragment is an object that can be represented as a XML document
> > fragment. The toDOM() method (used by C1) should append the XML
> > representation of the object as children of the given node, and the
> > toSAX() method (used by C2) should generate the XML representation as
> > SAX events.
> 
> And why are these methods not implemented by cocoon? It doesn't make
> much sense for every user to implement his own version, why not have

That is your part dude! It is an interface! Only you know about the XML
representation of the oject that implements XMLFragment!

> This way it's not as useful, because I'll take my existing code and put
> it into a toDOM method and that's that. It still doesn't run with
> cocoon2 - if there were a generic toSAX method it would.

How would you do a generic toSAX method?! - There cannot be THE ONE!
All you could do is build a DOM tree and then turn it into SAX.
But that would be stupid!:)
--
Torsten


Mime
View raw message