Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 48085 invoked from network); 26 Sep 2005 15:31:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2005 15:31:17 -0000 Received: (qmail 35789 invoked by uid 500); 26 Sep 2005 15:31:15 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 35059 invoked by uid 500); 26 Sep 2005 15:31:11 -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 List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 35046 invoked by uid 99); 26 Sep 2005 15:31:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Sep 2005 08:31:11 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jc.textor@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Sep 2005 08:31:17 -0700 Received: (qmail invoked by alias); 26 Sep 2005 15:30:48 -0000 Received: from i577A12F9.versanet.de (EHLO [192.168.0.23]) [87.122.18.249] by mail.gmx.net (mp001) with SMTP; 26 Sep 2005 17:30:48 +0200 X-Authenticated: #2236490 Message-ID: <43381428.6070004@gmx.de> Date: Mon, 26 Sep 2005 17:30:48 +0200 From: Johannes Textor User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050727) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: AW: Flow Script Output References: In-Reply-To: X-Enigmail-Version: 0.92.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Jan, >All three Jobs are using the same Styleshteets. I just want to stylsheets to >generade PDF files and not to contain any Job logic. This is why I have the >job logic somewhere else. > > Do I correctly understand that the XML tree you are generating is the status xml ? >I m using cocoon.processPipelineTo() in the script. >// calling cocoon pipeline using processPipelineTo() method and dumping the >results to the outputstream >cocoon.processPipelineTo( pdf_uri, null, outstreamPDF ); > >How could I use this to generate a XML file? > > The same way. Just create a JX Template that creates your XML status information, passing any variables as business objects. Then you open an output stream and process the pipeline to it: if( somecondition ){ var xml_output = new java.io.FileOutputStream( "filename.xml" ); cocoon.processPipelineTo( xml_uri, { data:data } , xml_output ); } if( othercondition ){ cocoon.sendPage( xml_uri ); } That way, you can use the same pipeline to deliver the status.xml to the client or create some file in a directory or both. IMHO, creating an XML tree in flowscript is wrong design, since that is what JX Templates and Pipelines are for. The purpose of flowscript is just to control the application flow, it should generally not be used to perform complex operations. Regards, Johannes --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org