cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <>
Subject Re: how to create XML DOM from SAX event
Date Mon, 15 Dec 2003 08:52:39 GMT
Because If I do not write it, I don't get the Document coming from the 

At 10:37 11/12/2003 +0100, you wrote:
>Lionel Crine wrote:
>>  * Get the DOM return it in the flow.
>>  */
>>protected Document transform(Document doc) {
>>doc = this.builder.getDocument(); //get the doc as DOM
>>doc = this.addDmidref(doc); //any method you want to use.
>>return doc;
>In above code, why do you set doc to this.builder.getDocument()? I thought 
>the document was already handed to you as DOM already so why not use the 
>reference passed in the function?
>>At 13:44 03/12/2003 -0500, you wrote:
>>>i have tried to extend the AbstractDOMTransformer class. and now i dont find
>>>anyhelp for ,"how to work with transform method"? it takes Document argument
>>>and returns the document.but which other methods do I need to implement. I m
>>>new bie and have started writing transformer straight away so, please help
>>>here is my code.i want to now get the Document object of the sax event that
>>>has come from generator into my transformer.where do I write my code ? do i
>>>have toimplement startElement and endElement methods? or just carry on with
>>>transformer method? and another question is,
>>>what does this transformer passes to next componanat? SAX event or DOM ?
>>>public class MyTransformer
>>>         extends AbstractDOMTransformer
>>>         implements Transformer, DOMBuilder.Listener, Composable, 
>>> Disposable,
>>>Recyclable {
>>>         public void setup(
>>>                 SourceResolver resolver,
>>>                 Map objectModel,
>>>                 String src,
>>>                 Parameters par)
>>>                 throws ProcessingException, SAXException, IOException {
>>>         }
>>>         public void parameterize(Parameters parameters) throws 
>>> ParameterException {
>>>         }
>>>         protected Document transform(Document doc) {
>>>                 doc = this.builder.getDocument();
>>>                 return doc;
>>>         }
>>>-----Original Message-----
>>>From: Reuben Christie []
>>>Sent: Tuesday, December 02, 2003 11:58 AM
>>>To: Cocoon Apache
>>>Subject: how to create XML DOM from SAX event
>>>Hi all, I m currently writing custom transformer  to connect to external
>>>java program from cocoon. i m stuck here where i need to convert the sax
>>>event into xml DOM object.
>>>I use file generator to read from xml file and then pass it to the
>>>transformer(my custome transformer) in pipeline in this transformer i want
>>>to create the original xml file (anything, either string or DOM object). can
>>>anybody help me out and throw me some ideas how to do that?
>>>anyhelp will be grtly appriciated
>>>thanks alot in advance
>>>To unsubscribe, e-mail:
>>>For additional commands, e-mail:
>>Lionel CRINE
>>Ingénieur Systèmes documentaires
>>Société : 4DConcept
>>22 rue Etienne de Jouy 78353 JOUY EN JOSAS
>>Tel : Fax :
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Lionel CRINE
Ingénieur Systèmes documentaires
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : Fax :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message