Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10009 invoked from network); 12 Jun 2004 16:00:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Jun 2004 16:00:13 -0000 Received: (qmail 90077 invoked by uid 500); 12 Jun 2004 16:00:11 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 90043 invoked by uid 500); 12 Jun 2004 16:00:11 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 90029 invoked by uid 99); 12 Jun 2004 16:00:11 -0000 Received: from [212.247.154.33] (HELO mailfe02.swip.net) (212.247.154.33) by apache.org (qpsmtpd/0.27.1) with ESMTP; Sat, 12 Jun 2004 09:00:11 -0700 X-T2-Posting-ID: YDyXpwPYDYIiwGSrhv/xvvOTlRj9KJJ6iXPBjefBV38= Received: from [80.170.26.75] (HELO apache.org) by mailfe02.swip.net (CommuniGate Pro SMTP 4.2b5) with ESMTP id 61404365 for dev@cocoon.apache.org; Sat, 12 Jun 2004 18:00:03 +0200 Message-ID: <40CB2882.2050004@apache.org> Date: Sat, 12 Jun 2004 18:00:02 +0200 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: fr, en, en-us MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: JXTG and caching References: <40BBBA14.2030402@mobilebox.pl> <40BC39CA.7070305@apache.org> <7CB92C16-B3A7-11D8-A9B2-000A95AF004E@apache.org> <40BC42CE.4070501@apache.org> <40BC465B.1010507@mobilebox.pl> <40BC4970.4020507@upaya.co.uk> <40BC4AE5.3040507@mobilebox.pl> <40BC4D0D.9000903@apache.org> <40BC90DB.3050403@reverycodes.com> <40BCB65F.2020909@apache.org> <40CA3D0A.3020700@reverycodes.com> In-Reply-To: <40CA3D0A.3020700@reverycodes.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Vadim Gritsenko wrote: > Sylvain Wallez wrote: > >> Vadim Gritsenko wrote: >> >>> Sylvain Wallez wrote: >>> >>>> Moreover, you may consider the case of complex pipelines where the >>>> actual template depends on the user rights, target browser or >>>> whatever else. In that case, the cache information can be different >>>> depending on used template. >>> >>> >>> >>> And for caching to play right with proxies and browsers, Vary header >>> (and/or some others) should be set. What mechanism can be used to >>> set headers from the JX template? >> >> >> >> ?? > > > > Thought a bit about it... Due to streaming nature of the Cocoon > (forget for a second that pipeline's default behavior is to buffer > output - default can be changed anyway), this won't work. First > startElement() event corresponding to root element is already out, > and, under ideal conditions, already written to the output stream. > > Thus, this will fail. You're right. Also, if the pipeline is cached, headers aren't set again. Headers must actually be set in setup(). > The only other option I see is to mimic XSP page structure: Introduce > root tag which is *not* printed to the output. Then, > everything between the and first SAX event can perform > whatever setup operations needed. That additional root tag is something I dislike in XSP. Furthermore, a valid JX template may not contain any element if only expression expansion is used. Adding an additional mandatory root tag breaks this simplicity. Don't know... what about some statements that would be allowed only as children of the root element and executed in setup()? Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }