Hello Edward, I am not sure what your level yet is of cocoon, but I do think somewhere you are now thinking in the wrong direction..(perhaps I am wrong, forgive me, and perhaps my thing below is way to simple for you....anyway )
A cocoon pipeline typically consists of a generator (perhaps aggregated), then zero, one,or more transformers, and then one serializer. A pipeline without a generator or transformer is not a complete one. Now, cocoon has some (very many :-) ) standard things you can use, like generators: for example file generator jxtemplate generator image directory generator request generator directory generator calendar generator, and many many more and like transformers, for example sql transformer ldap transformer webdav transformer xsl transformer i18n transformer linkrewriter transformer, etc etc and like serializer, for example html/xhtml/xml/text serializers pdf serializer svg serializer zip archive serializer, etc, etc Now, from MPOV, make use of the standard available components, and only use a custom one if really necessary. Now, coming back to your email, I have the idea that you are mis-using the serializers in the first place. What are you replacing in the startDocument() things....are you matching on elements and replacing them with others? It really sounds to me like you want to do transformations!! And perhaps just simple xslt. Or, I might be missing the point. Now, your question about passing the entire input XML to another class is possible, but default, peoply do this in a transformer, not in a serializer! (I actually think you also totally destroy cocoon's free caching it provides for you when you are going to implement custom method calls in the serializers (or you have to account for it in someway) ) I think, if you really need some custom things, like you have some xml that needs to be send to another server, and you get a response from it, you need a transformer for it (or a generator). A good example for you would be the webdav transformer. It transforms a dasl (a search in xml), by recording some xml stream and executes the dasl. You just need a custom transformer, extend AbstractTransformer, and look how the WebDAVTransformer handles the startRecoring things. Hopefully this clears things up a little Regards Ard hey guys, I am new to this forum and cocoon as well. I have seen the source code for the serializers and have gone thru the various methods like startElement(), startDocument(), endDocument(), characters etc. I was also able to create a new serializer extending AbstractSerializer and over-riding the methods shown above. Now for another serializer that I am working on, I need a way to pass on the whole input XML (stream) to another class and am having a hard time figuring out how can I access the whole XML inside the serializer? any inputs on the same? thanks Ed. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
