From users-return-55188-apmail-cocoon-users-archive=cocoon.apache.org@cocoon.apache.org Fri Sep 05 15:16:06 2003 Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 46038 invoked from network); 5 Sep 2003 15:16:06 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Sep 2003 15:16:06 -0000 Received: (qmail 32269 invoked by uid 500); 5 Sep 2003 15:15:28 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 32207 invoked by uid 500); 5 Sep 2003 15:15:28 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 32171 invoked from network); 5 Sep 2003 15:15:27 -0000 Received: from unknown (HELO warden.diginsite.com) (208.29.163.248) by daedalus.apache.org with SMTP; 5 Sep 2003 15:15:27 -0000 Received: from wlvims01.diginsite.com by warden.diginsite.com via smtpd (for daedalus.apache.org [208.185.179.12]) with SMTP; Fri, 5 Sep 2003 08:15:15 -0700 Received: from calexc01.digitalinsight.com ([10.200.0.20]) by wlvims01.digitalinsight.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Fri, 5 Sep 2003 08:15:09 -0700 Received: by calexc01.diginsite.com with Internet Mail Service (5.5.2653.19) id ; Fri, 5 Sep 2003 08:15:09 -0700 Message-ID: <31DF72A980E5D511B48C000102BD868503EA7F25@calexc01.diginsite.com> From: Ralph Goers To: "'users@cocoon.apache.org'" Subject: RE: Use the value of an XML attribute as sitemap parameter Date: Fri, 5 Sep 2003 08:15:09 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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. =20 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 >=20 >=20 > Here is what I want to do: >=20 > 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=20 > response, also > in a format under y control. >=20 > 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. >=20 > For this I will be using cocoon. For example, for the HTML site > I will be setting up a pipe with: >=20 > - 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 > =09 > The last transformation is the one that I cannot figure how to > create in cocoon. Well, in fact, it seems not possible. >=20 > As you see, I am not interested in the ordinary uses of cocoon. > I want it to do all the presentation, i18n, =BF session handling ?, > integration of content from other sites... for my=20 > application, and keep > a very lightweight application core in another server. >=20 > 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? >=20 > 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,=20 > listing all the > possible values of the selecting parameter. I would like to=20 > do it in one > or two lines.=20 >=20 > Hope this is not too long to read. Thanks for your comments. >=20 > Javier Ramos >=20 > -----Original Message----- > From: Geoff Howard [mailto:cocoon@leverageweb.com]=20 > 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 >=20 > Javier Ramos wrote: > > Hello, > >=20 > > 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,=20 > > and use it to create the src attribute of the next=20 > transformer in the=20 > > pipeline. > >=20 > > Anyone thinks this is possible, and how? >=20 > No, it is impossible on purpose because situations like you=20 > describe can >=20 > lead to applications which are very difficult to maintain. =20 > By the time=20 > generation begins, the complete pipeline must be set up,=20 > meaning all src >=20 > attributes must be fixed. The src can only be affected by sitemap=20 > components executed before pipeline setup (matchers, selectors, input = > modules, actions and flow). >=20 > Perhaps you can describe a simplified version of your use case and=20 > someone can give pointers on how to best achieve this within Cocoon. >=20 > Geoff >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org