Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 51928 invoked from network); 18 Feb 2005 11:22:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Feb 2005 11:22:20 -0000 Received: (qmail 87555 invoked by uid 500); 18 Feb 2005 11:22:17 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 87502 invoked by uid 500); 18 Feb 2005 11:22:17 -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 87488 invoked by uid 99); 18 Feb 2005 11:22:17 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from Unknown (HELO server.bizzdesign.nl) (80.89.226.18) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 18 Feb 2005 03:22:16 -0800 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Write binary data to output stream from flow X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Date: Fri, 18 Feb 2005 12:19:20 +0100 Message-ID: <5E091A68F794974CAF431CA31F5AF2CC189698@server.bizzdesign.nl> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Write binary data to output stream from flow Thread-Index: AcUVq0LTKLNMoYsxS62Ro5CuPuOKlgAACShA From: "Bart Molenkamp" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >=20 > Bart Molenkamp wrote: > > Maybe it is even better to have a source that can lookup mimeType, > > contentLength, inputStream from the context using JXPath expressions? > > Then one could use the ResourceReader to serve the content, and use the > > source in other places as well. The only difficult thing would be to > > configure the Xpath expressions... Would that be a good idea? >=20 > You could configure the source in the cocoon.xconf, specifying the > JXPath expressions there. So yes, you could do it with a source. But I > think they're better placed in the sitemap, thus as a reader. Specifying this in cocoon.xconf is a little bit too static for me. >=20 > Otherwise, you could have a source such as: >=20 > stream:/my/path/to/JXPath/Object(application/zip) Well, I don't think that the (application/zip) at the end isn't required, as you specify this path in cocoon.xconf. But still I think you're right about a reader being the best choice. I'll go for that one. >=20 > But that seems to be abusing the URL metaphor a bit too much for me. >=20 > Regards, Upayavira >=20 > >>-----Original Message----- > >>From: Upayavira [mailto:uv@upaya.co.uk] > >>Sent: Friday, February 18, 2005 11:47 AM > >>To: dev@cocoon.apache.org > >>Subject: Re: Write binary data to output stream from flow > >> > >>Bart Molenkamp wrote: > >> > >>>>-----Original Message----- > >>>>From: Upayavira [mailto:uv@upaya.co.uk] > >>>>Sent: Friday, February 18, 2005 11:20 AM > >>>>To: dev@cocoon.apache.org > >>>>Subject: Re: Write binary data to output stream from flow > >>>> > >>>>Bart Molenkamp wrote: > >>>> > >>>> > >>>>>Yes, it makes even better sense. > >>>>> > >>>>>Would such a more generic, JXPath oriented stream reader be a > >>> > >>>valuable > >>> > >>> > >>>>>contribution to Cocoon? > >>>> > >>>>To me it would. Anyone else think so, or have some reasons against? > >>>> > >>>>In fact, the object you pass to the reader (via the XPath string), > >>>>should not be the input stream, but some object that has a > >>>>getInputStream method. That would make better sense. > >>> > >>> > >>>If the object in the context is a bean, the path ./inputStream will > > > > make > > > >>>JXPath invoke getInputStream(), right? And the same for mimeType of > >>>course. So this leaves the user to make the decision if he passes an > >>>object which has a getInputStream() method, or if he passes the > > > > stream > > > >>>directly. > >> > >>Guess so, yes. But it must be possible to configure the mime type > >>manually via the sitemap as well as having it provided by the > > > > flowscript. > > > >>Regards, Upayavira > > > >