cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Daniel Ardolino <ma...@altersoft.com.ar>
Subject Re: Cocoon, sockets and not a web browser.
Date Wed, 09 Oct 2002 16:54:06 GMT
> PD: Lets join efforts in this try Mauro, we can then make public some
> examples of how to accomplish this.
All right! But I warn you I'm new with this.

> PD3: What I am looking for is to be able to do something like this: (is it
> your need too?)
> ....the example....look down.....
Yes.  I'm trying to do something like this.  Exactly!  Even more complicated,
but "thanking cocoon" for its services.  
May be some part of cocoon may be used without cocoon.  I mean that may
be we can "simply" use the transformation classes (generators,tranformers)
inside our java code, without needing a sitemap.  We can write the
pipelines like this:
      ...
      xmlFile= generatorX.generate("doc/anXmlFile.xml","file");
      xmlFile= transformerY.transform(xmlFile,"style/anXslStylesheet.xsl");
      xmlFile= transformerZ.transform(xmlFile,"style/otherXslStylesheet.xsl");
      ...   

-- Mauro


On Wed, 9 Oct 2002, Dario Liberman wrote:

> Hola Mauro,
>     I am trying the same path for similar reasons.
> 
> I send attached a message interchange with Marcus (the Soap guru of Cocoon).
> 
> Sounds like it has to be with extending some part of the 'action' part
> See http://localhost:8080/cocoon/documents/developing/extending.html
> 
> Best Regards,
> Dario.
> 
> PD: Lets join efforts in this try Mauro, we can then make public some
> examples of how to accomplish this.
> 
> PD2: To all the others, please let us know if you have gone with a similar
> approach of having cocoon be an internal module for xml transformations
> pipeline, so that one may have the input source and the output target be
> both of them memory objects.
> 
> PD3: What I am looking for is to be able to do something like this: (is it
> your need too?)
> 
> /* Pseudocode here inside my servlet or whatever: */
> While ( manager.keepOnWorking()==true) {
>     /* in this example I get an XML from a soap request
>     but it may be any other source, Like a database XML. */
>     SoapObj.SyncWaitMessage();
>     myInputXmlDomRef = SoapObj.GetXMLRequest();
> 
>     cocoonref = Cocoons.getCocoonInstance();
> 
>     /* Here I add objects to a hash table So That an Xsp (or whatever) Can
> Call Me for logic questions, DB interaction, etc  */
>     cocoonref.PutObject("mylogicClass", this);
> 
> 
>     /* Here I call cocoon with the xml input (it may be even empty), and ask
> it to process the transformation pipeline (using cocoons cache and all its
> cool stuff). The entry 6 in the map in this case produces an XML, so I
> transform the Sax into Dom and put it in myOuputXML object. */
>     cocoonref.ApplyPipeline("MapEntry6",myInputXmlDomRef, myOutputXML);
> /* Cocoon may call me back many times during the transformation process
> through "mylogicClass" entry or EJB lookup, etc */
> 
>     Try {
>         /* I am done! thank you cocoon! Lets send the reply:  */
>         SoapObj.PutResponse(myOutputXML);
>         SoapObj.SendXMLResponse();
>     } catch(error e) {
>         cocoonref.PutObject("error", e);
>         cocoonref.ApplyPipeline("MapEntry99_errorlogguer",myOutputXML,
> myLogOutputStream);
>         /* The output may also be a stream of bytes in case of an image,
> etc. For example here it is a simple text log file */
>     }
> 
>     cocoonref.free();
> }
> 
> 
> I hope this is not too crazy an example, and that I managed to explain the
> idea.
> Thanks to everyone having got to here in the message, stay in contact.
> Bye.
> 
> 
> ----- Original Message -----
> From: "Mauro Daniel Ardolino" <mauro@altersoft.com.ar>
> To: <cocoon-users@xml.apache.org>
> Sent: Wednesday, October 09, 2002 09:47
> Subject: Cocoon, sockets and not a web browser.
> 
> 
> > Hello!
> > I need to know if cocoon can be used to apply transformations to
> > xml files that comes from a socket or from a soap communication.
> > Also I need to know if I can serialize the results to a java class
> > to parse them for example with sax.
> >
> > So what I mean is that I want to use cocoon to make only the
> > transformations.  I need to make transformations (using xpath)
> > and I think that cocoon (and XSL) can help me, but the results will
> > not go to a web-browser.  They have to go to a class.
> >
> > My program can be a stand alone program with Swing or SWT gui interface,
> > or can be a batch program.
> >
> > Am I clear?  If not, please let me know.
> >
> > Thanks in advance, reggards,
> >
> > -- Mauro
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

-- 
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: mauro@altersoft.com.ar
website: http://www.altersoft.com.ar


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message