Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 85081 invoked by uid 500); 10 Jun 2002 07:32:46 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 85070 invoked from network); 10 Jun 2002 07:32:46 -0000 Date: Mon, 10 Jun 2002 09:32:38 +0200 From: Christian Haul To: cocoon-users@xml.apache.org Subject: Re: sitemap design patterns - hybrid selector/matcher? Message-ID: <20020610093238.C1980@bremen.dvs1.informatik.tu-darmstadt.de> Reply-To: haul@dvs1.informatik.tu-darmstadt.de References: <20020609195346.A26043@badtz.alieos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020609195346.A26043@badtz.alieos.com> User-Agent: Mutt/1.3.22.1i Organization: Databases and Distributed Systems Group, Darmstadt University of Technology X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 09.Jun.2002 -- 07:53 PM, Jonathan Layes wrote: > Hi all, > > I have a recurring theme in a few of my sitemaps and, although I > have solved the problem, I'm not particularly happy with the solution. > Here's the problem in pseudo-sitemapese: > > > > > > > > > > > > > > > > > > > > > > > > > The above doesn't work when coded with matchers. C2 falls through > the nested matches, hits the generic case and obviously throws > an exception because it tries to call a second generator. That sounds like a bug. Although I'm probably not the right person to help finding it, it would be important to provide more information, like the version of Cocoon you're running and the actual sitemap snippet plus sitemap.log for this case. > There are some obvious solutions to this problem. One is to copy > the common transform and serialize stages into each of the > nested matches, forcing C2 to stop processing in the individual > nested matches. Slightly cleaner is to put the final transform/ > serialize step in a resource and have each of the nested matches > call the resource. I really don't like the finality of resources, > however - they feel too much like goto statements. > > What I think I want to do here is use the "if-then-else" processing > model of selectors. Choose only one of the a*, b* or * patterns, > generate the xhtml, and finish by applying the final transform/ > serialization regardless of source. Look for a switch selector. I'm not aware whether it's in 2.0.3 or HEAD only. AFAIR it was invented for such a case. Chris. -- C h r i s t i a n H a u l haul@informatik.tu-darmstadt.de fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: