Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 7498 invoked from network); 1 Dec 2000 14:02:47 -0000 Received: from unknown (HELO mail.anyware-tech.com) (213.11.20.188) by locus.apache.org with SMTP; 1 Dec 2000 14:02:47 -0000 Received: from anyware-tech.com (anyware1 [10.0.0.1]) by mail.anyware-tech.com (8.9.3/8.8.7) with ESMTP id PAA10534 for ; Fri, 1 Dec 2000 15:01:46 +0100 Message-ID: <3A27AEEA.9793FED7@anyware-tech.com> Date: Fri, 01 Dec 2000 15:00:10 +0100 From: Sylvain Wallez Organization: Anyware Technologies X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr,en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [C2/Patch] Selector Heaven :-) References: <20001130124842.8030.qmail@web6203.mail.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Giacomo Pati a �crit : > > --- Marcus Crafter wrote: > > Hi All, > > > > Hope all is going well across the Cocoon globe! > > > > Attached is a set of files to add initial support for the following > > selectors to Cocoon 2: > > > > Yes I have :) Does it make sense to combine all Selectors above into > one and use a syntax like > > > > I mean can we prefix the context of the variable used to test (header, > parameter, session, context so far). > Mmmmh... Marcus did a very nice job, but that remembers me of a discussion in the thread "[C2]Action proposal (long)" at the beginning of november where I was warning about the possible temptation of defining yet another scripting language for the sitemap to handle complex sites. Seems your proposal looks like the early stages of a boolean expression language... Two points against that : - C2 was made with speed in mind, and the sitemap is the central dispatch point of the web site. As such, it must be as quick as possible, and parsing and interpreting a script expression at each and every request seems to me a big waste of CPU. - this is yet another language to learn. So why not allow these expressions to be raw Java boolean expression which the CodeFactory can include as is in the sitemap generated code, thus avoiding interpretation overhead ? Sitemap managers may not be fluent in Java (but I think they will very likely know JavaScript), but Java boolean expressions are simple enough to be learned as quickly as a new language. > > > > I have lots of questions though! - Are there other > > operators/types people would like to use ? Are there any functions > > people would like to use ? (eg. I thought about being able to test > > the > > length of a request parameter in a selector ?), etc. Do people want > > to > > compare floating point numbers internationally (ie. 0.00 in > > Australia, > > and 0,00 in Germany ?). Are the chosen english style operator > > names ok ? etc. What other kinds of selectors would be appropriate ? > > And then comes the subject of documentation ?? :-) > > > > Ok, Well I'll leave it there for the moment. Look forward to > > responses. > > Just express the conditions in Java, and all these question will have an instant answer ;-) -- Sylvain Wallez Anyware Technologies