Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 74671 invoked from network); 6 Jun 2005 14:29:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jun 2005 14:29:01 -0000 Received: (qmail 10305 invoked by uid 500); 6 Jun 2005 14:28:56 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 10221 invoked by uid 500); 6 Jun 2005 14:28:56 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 10208 invoked by uid 99); 6 Jun 2005 14:28:56 -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 lakermmtao09.cox.net (HELO lakermmtao09.cox.net) (68.230.240.30) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 06 Jun 2005 07:28:53 -0700 Received: from [192.168.0.103] (really [70.179.64.83]) by lakermmtao09.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050606142817.LHNH6804.lakermmtao09.cox.net@[192.168.0.103]> for ; Mon, 6 Jun 2005 10:28:17 -0400 Message-ID: <42A45D83.9010508@reverycodes.com> Date: Mon, 06 Jun 2005 10:28:19 -0400 From: Vadim Gritsenko User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: [RFE] Some enhancements to XSP References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Nathaniel Alfred wrote: >>From: Vadim Gritsenko [mailto:vadim@reverycodes.com] > >>>Instead of "?" one could also use another character provided it is sufficiently >>>unlikely that the sequence curly-char appears in XSP-embedded content or where >>>XSP can be embedded (XSL). The special character should not be valid at the >>>beginning of an expression at least for CSS, HTML, Java, Javascript, Perl, >>>and XSLT. That excludes >>> >>> + " * % & ` @ ' ^ ~ ! [ $ - . ( / >>> >>>but leaves as sensible alternatives >>> >>> {#expr} >>> {=expr} >>> {:expr} >>> {?expr} >>> >>>Whatever special character we agree on, it should be always the same in all >>>contexts and always enabled. >>> >>>Any preferrences which character to use? >> >>Yes. Given that (a) XSLT already has '{foo}' syntax, and uses '{{foo}}' for >>escaping; and given that the only other XSP implementation (AxKit) uses same >>syntax as in XSLT, I'm for using that same syntax too. > > > I think it is a bad idea to use exactly the same syntax as for XSLT because it > makes really awkward to use XSP attribute interpolation inside logicsheets. You haven't written any XSLT producing Ant files recently, have you? :-) Now it seems really easy to me, you simply write: in the XSLT. > You end up wasting your time figuring out which curly mountain is needed to > get the expression to be interpreted by the right engine. > > It should be easy for both humans and the XSP processor to distinguish between > XSP and XSLT expressions. I don't get your point about XSP processor. It is already dead easy for it. > I don't know AxKit in detail but I assume that them using "{foo}" syntax means > that they are not using XSLT-based logicsheets. It's implemented in PERL, for logicsheets they have .pm files, iirc. > Anyway, we can still claim to > use a common standard by defining: > > interpolated-expr ::= '{' language-expr '}' > language-expr ::= perl-expr | '?' java-expr | '?' javascript-expr | '?' python-expr Extra character does not add any elegance, imho. >>As for backward compatibility, is is already solved by: >> >> > > > But the default value should be attribute-value-interpolation="yes", provided > we can agree on a syntax which is highly unlikely to be used in existing XSPs. If default is "yes" by default :-) then you'll break all the installations of Cocoon out there in one shot. *Not* nice! Hence, default must be at least configurable - in the cocoon.xconf. Vadim