Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 46306 invoked by uid 500); 14 Aug 2003 16:45:22 -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 46261 invoked from network); 14 Aug 2003 16:45:22 -0000 Received: from smtp5.wanadoo.fr (HELO mwinf0402.wanadoo.fr) (193.252.22.27) by daedalus.apache.org with SMTP; 14 Aug 2003 16:45:22 -0000 Received: from anyware-tech.com (AToulouse-206-1-1-212.w81-50.abo.wanadoo.fr [81.50.74.212]) by mwinf0402.wanadoo.fr (SMTP Server) with ESMTP id 2241480011E for ; Thu, 14 Aug 2003 18:45:24 +0200 (CEST) Message-ID: <3F3BBCA3.2020402@anyware-tech.com> Date: Thu, 14 Aug 2003 18:45:23 +0200 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: fr, en, en-us MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [RT] Views for readers References: <3F3B9B52.2040907@anyware-tech.com> <3F3BA7FA.4040402@verizon.net> <3F3BAA88.4080403@anyware-tech.com> <3F3BB773.90507@verizon.net> In-Reply-To: <3F3BB773.90507@verizon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Vadim Gritsenko wrote: > Sylvain Wallez wrote: > >> Vadim Gritsenko wrote: >> >>> Sylvain Wallez wrote: >> > > >>>> Any other proposal or opinion on this subject before we start a vote ? >>> >>> >>> Can't you just enable generators in map:view in case when view >>> starts with reader? >> >> >> No, since views "capture" the (XML) output at certain points of the >> pipeline to provide a different formatting. > > > In case of the reader, there is no (XML) output in the pipeline. It's > special case, unless you want to introduce binary pipelines (and I > hope you don't want to), so it would require special handling. > >> E.g. the processing for the "indexable-content" view > > > Sidenote: It's called "content" -- the view which you use to build a > site search index. Picky sidenote : this is configurable using the config of the component ;-) >> is the same for all URIs, be them XML pipelines or a single reader. >> >> So there's no way other than having a generator _before_ jumping to >> the view, feeding that view with the kind of XML content it expects. > > > Here is another wild (or not?) thought. > > All this discussion comes down to the requirement of generating some > XML out of the content usually served by the reader, if that's > possible (and it is possible for some of the types of the content), in > order to feed this XMLized content into the view. This generated XML > is somewhat "equivalent" to the binary represenation for the purpose > of view building. So, I'm going to the conclusion that some types of > readers can be paired with the generator producing "equivalent", but > XMLized, content. The best place to indicate such pairing is the time > when you declare a reader: > > > src="org.apache.cocoon.reading.ResourceReader"/> > src="org.apache.cocoon.reading.ResourceReader"> > > html > > src="org.apache.cocoon.reading.ResourceReader"> > > poi-excel-generator > > > > > pdf-text-extractor-generator > > > I'm afraid this won't work : - a generator specific to a given content-type is very unlikely to produce the document type expected by the view. We will most often need an additional transformation (e.g. the "xword2xdoc.xsl" that was in my example) - views, through their associated labels, can be plugged at any point of the pipelines. Defining pair generators restricts views to be only from-label="start". > PS: Modifying sitemap syntax to allow reader/generator pairs with some > "unless" attrbiutes looks awful to me. Doesn't seem so awful to me, since the reader should be executed "unless" certain conditions are met, which are that the specified label(s) correspond to the one at which the requested view should start. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com