Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 54295 invoked from network); 30 Dec 2003 12:00:42 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Dec 2003 12:00:42 -0000 Received: (qmail 11801 invoked by uid 500); 30 Dec 2003 12:00:37 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 11767 invoked by uid 500); 30 Dec 2003 12:00:36 -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 11743 invoked from network); 30 Dec 2003 12:00:36 -0000 Received: from unknown (HELO tux.wh17.tu-dresden.de) (141.76.124.49) by daedalus.apache.org with SMTP; 30 Dec 2003 12:00:36 -0000 Received: from localhost (localhost [127.0.0.1]) by tux.wh17.tu-dresden.de (Postfix) with ESMTP id 25682A3A9A; Tue, 30 Dec 2003 13:00:36 +0100 (CET) Received: from tux.wh17.tu-dresden.de ([127.0.0.1]) by localhost (tux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02237-10; Tue, 30 Dec 2003 13:00:32 +0100 (CET) Received: by tux.wh17.tu-dresden.de (Postfix, from userid 1000) id B0A12CAAF8; Tue, 30 Dec 2003 13:00:32 +0100 (CET) Date: Tue, 30 Dec 2003 13:00:32 +0100 From: Sebastian Klamar To: dev@cocoon.apache.org Cc: Cocoon User Mailinglist Subject: concatenate two pipelines (was on dev list: Re: Running Schematron validation from flow) Message-ID: <20031230120032.GA2284@tux.wh17.tu-dresden.de> Mail-Followup-To: dev@cocoon.apache.org, Cocoon User Mailinglist References: <1E0CC447E59C974CA5C7160D2A2854EC097D5B@SJMEMXMB04.stjude.sjcrh.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1E0CC447E59C974CA5C7160D2A2854EC097D5B@SJMEMXMB04.stjude.sjcrh.local> X-PGP: 0x1E727CE6 / 9085 48BD 8332 4BFC D80C A6CF D162 20BB 1E72 7CE6 X-Operating-System: Debian GNU/Linux testing/unstable (Kernel 2.4.23-xfs) X-Echelon: debugging, package, BRLO User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at tux.wh17.tu-dresden.de 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 * Hunsberger, Peter [2003-12-29 21:45 +0100] wrote: > Ok, figured this out: don't use copy, use processPipelineTo and use the > xmodule as the target... So far so good, except I'm not seeing the > result in the request attribute after I've written it. > > I might note that if this works we've sort of got the capabliity for > dynamically composing pipelines in flowscript: run whatever pipeline > you want to write whatever data into memory, later run a regular > pileline to aggregate this in memory data with it's normal output.... Peter, could you be more verbose how to concatenate several pipelines together with the help of the new xmodule? I'm currently using the pair WriteDOMSessionTransformer/SessionAttributeGenerator to pipe the output of one pipeline into another one. This is not an elegant solution bc it requires a session. Besides this, Vadim's comment for Bug #25517 suggests to kill the components I use. FUP cocoon-user? TIA -- Sebastian A fullquote for history on user list: > > Vadim Gritsenko writes: > > > > > > > > Hunsberger, Peter wrote: > > > > > > >Is > > > >there any existing in-memory writable source available for > > > reuse? Any > > > >hints on how to do this? > > > > > > > > > > Try: > > > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25210 > > > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25517 > > > > > Thanks, that seems to be half the picture, but I think I'm > > still missing > > something: can I call a Cocoon pipeline using xmodule? I'm > > getting the > > error: > > > > "Cannot set XMLSerializer outputstream" > > > > Which would seem to indicate a problem with the output > > stream, but since I've tried using the request-attr stream > > from the samples and got the same error I assume it's > > something to do with the input side of the equation? > > > > The sitemap fragment for the input data is straightforward enough: > > > > > > > > > > > src="cocoon:/{1}/validationTemplate/{2}"/> > > > > > > > > > > The flowscript looks like: > > > > var sourceURI = "xmodule:cocoon:run/_validate/"+collection; > > var destinationURI = "xmodule:request-attr:validate"; > > > > var resolver = null; > > var source = null; > > var destination = null; > > try { > > resolver = cocoon.getComponent( > > Packages.org.apache.cocoon.environment.SourceResolver.ROLE ); > > source = resolver.resolveURI( sourceURI ); > > destination = resolver.resolveURI( destinationURI ); > > return Packages.org.apache.excalibur.source.SourceUtil.copy( > > source, destination ); > > } finally { > > if ( source != null ) > > resolver.release( source ); > > if (destination != null) > > resolver.release( destination ); > > cocoon.releaseComponent( resolver ); > > } > > > > Where "collection" is a variable previously set that tells me > > what collection of metadata I'm dealing with. > > > > Is this just a case of using the wrong protocol (If so what > > would it be)? Do I perhaps need a version of Cocoon from CVS > > and not the 2.1.3 release? > > > > One interesting thing to note is that the error is reported > > as occurring at the "cocoon.releaseComponent( resolver);" > > line of the flow script... -- Die letzten Worte... des Weintrinkers: "Der hat aber einen komischen Geschmack." ************************************************************************ PGP Key: 0x1E727CE6 / 9085 48BD 8332 4BFC D80C A6CF D162 20BB 1E72 7CE6