cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <>
Subject RE: [RFE] Some enhancements to XSP
Date Wed, 01 Jun 2005 08:42:29 GMT
> -----Original Message-----
> From: Vadim Gritsenko []
> Sent: Dienstag, 31. Mai 2005 15:30
> To:
> Subject: Re: [RFE] Some enhancements to XSP

> > 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 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 know AxKit in detail but I assume that them using "{foo}" syntax means
that they are not using XSLT-based logicsheets.  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 

> As for backward compatibility, is is already solved by:
>    <xsp:page attribute-value-interpolation="no">

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.

Cheers, Alfred.
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

View raw message