cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@digitalinsight.com>
Subject RE: Use the value of an XML attribute as sitemap parameter
Date Fri, 05 Sep 2003 15:15:09 GMT
It seems to me that you need to create an action that gets the info to use
as the basis for the decision on which transformer to use.  

Ralph

> -----Original Message-----
> From: Javier Ramos [mailto:ramos@parsec.es]
> Sent: Friday, September 05, 2003 7:46 AM
> To: users@cocoon.apache.org
> Subject: RE: Use the value of an XML attribute as sitemap parameter
> 
> 
> Here is what I want to do:
> 
> 	I will write a web application that does not deal with any
> presentation issue. There is a central servlet which receives requests
> in XML format via HTTP POST. The XML format of the request is under my
> full control, I do not have to make any contract with the users of the
> services provided by the servlet. The servlet analyzes the request and
> assigns it to a controller, which in turn returns an XML 
> response, also
> in a format under y control.
> 
> 	Now I want to give access to the services provided by the
> servlet to the outside world. I want to have an HTML	 interface, as
> well as several public XML interfaces.
> 
> 	For this I will be using cocoon. For example, for the HTML site
> I will be setting up a pipe with:
> 
> 	- RequestGenerator
> 	- then use XSLTransformer to map request to my own format
> 	- custom transformer to send this XML as a request to the
> servlet, and return the response from the servlet.
> 	- Evaluate an XML element from the response to see what kind of
> response it is ( in my design sometimes the server can return several
> responses to a request, depending on completion status, user,
> environment... )
> 	- Select an XSLTransformer appropriate to the response type that
> was received, to create an HTML page.
> 	- Serialize
> 	
> 	The last transformation is the one that I cannot figure how to
> create in cocoon. Well, in fact, it seems not possible.
> 
> 	As you see, I am not interested in the ordinary uses of cocoon.
> I want it to do all the presentation, i18n, ¿ session handling ?,
> integration of content from other sites... for my 
> application, and keep
> a very lightweight application core in another server.
> 
> 	Is this a crazy idea? Would it be 'heretic' :-) practice to
> instantiate and use a TraxTransformer inside a custom transformer
> extending AbstractDOMTransformer to do the job? Anyone knows how can
> this be done? Are there other solutions?
> 
> 	I also thought if I could obtain the value of an HTTP header as
> a parameter, which would be another solution. But it seems with a
> HeaderSelector I can only do lengthy if-else-if checks, 
> listing all the
> possible values of the selecting parameter. I would like to 
> do it in one
> or two lines. 
> 
> 	Hope this is not too long to read. Thanks for your comments.
> 
> Javier Ramos
> 
> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com] 
> Sent: viernes, 05 de septiembre de 2003 4:58
> To: users@cocoon.apache.org
> Subject: Re: Use the value of an XML attribute as sitemap parameter
> 
> Javier Ramos wrote:
> > Hello,
> > 
> >             I would like to be able to extract from an XML document 
> > transformed several times in a pipeline the name of one of its
> elements, 
> > and use it to create the src attribute of the next 
> transformer in the 
> > pipeline.
> > 
> >             Anyone thinks this is possible, and how?
> 
> No, it is impossible on purpose because situations like you 
> describe can
> 
> lead to applications which are very difficult to maintain.  
> By the time 
> generation begins, the complete pipeline must be set up, 
> meaning all src
> 
> attributes must be fixed.  The src can only be affected by sitemap 
> components executed before pipeline setup (matchers, selectors, input 
> modules, actions and flow).
> 
> Perhaps you can describe a simplified version of your use case and 
> someone can give pointers on how to best achieve this within Cocoon.
> 
> Geoff
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

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


Mime
View raw message