You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2004/11/09 14:38:48 UTC
[VOTE] Remove FlowScript Function Parameters Support
Hi Guys,
As discussed before, and several times already, it is time to phase out
"feature" of passing parameters from the sitemap into flowscript as positioned
function parameters:
function myflow (a, b, c) {
...
}
Because this syntax relies on order of <map:parameter/> elements in the sitemap
but not names of the parameters. This syntax is replaced with non-ambigous:
function myflow () {
var a = cocoon.parameters.a;
...
}
Proposed phase out plan is:
1. Write ERROR into the log file in 2.1.6 when usage of deprecated
syntax is detected.
2. Throw exception in 2.1.7 when usage of deprecated syntax
is detected.
3. Completely remove support of deprecated syntax in 2.2.
Please cast your votes.
Vadim
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 9 Nov 2004, at 13:38, Vadim Gritsenko wrote:
> Hi Guys,
>
> As discussed before, and several times already, it is time to phase
> out "feature" of passing parameters from the sitemap into flowscript
> as positioned function parameters:
>
> function myflow (a, b, c) {
> ...
> }
>
> Because this syntax relies on order of <map:parameter/> elements in
> the sitemap but not names of the parameters. This syntax is replaced
> with non-ambigous:
>
> function myflow () {
> var a = cocoon.parameters.a;
> ...
> }
>
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
>
>
> Please cast your votes.
+1 to all
regards Jeremy
--------------------------------------------------------
If email from this address is not signed
IT IS NOT FROM ME
Always check the label, folks !!!!!
--------------------------------------------------------
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Giacomo Pati <gi...@apache.org>.
On Tue, 9 Nov 2004, Vadim Gritsenko wrote:
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
Make sense. +1 to all
--
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 9 nov. 04, à 14:38, Vadim Gritsenko a écrit :
> ...Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
+1
-Bertrand
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Vadim Gritsenko wrote:
> Hi Guys,
>
> As discussed before, and several times already, it is time to phase out
> "feature" of passing parameters from the sitemap into flowscript as
> positioned function parameters:
>
> function myflow (a, b, c) {
> ...
> }
>
> Because this syntax relies on order of <map:parameter/> elements in the
> sitemap but not names of the parameters. This syntax is replaced with
> non-ambigous:
>
> function myflow () {
> var a = cocoon.parameters.a;
> ...
> }
>
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
>
>
> Please cast your votes.
>
>
> Vadim
+1 to all
--
Leszek Gawron
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Antonio Gallardo wrote:
> Vadim Gritsenko dijo:
>
>>Proposed phase out plan is:
>>
>> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
>> syntax is detected.
>> 2. Throw exception in 2.1.7 when usage of deprecated syntax
>> is detected.
>> 3. Completely remove support of deprecated syntax in 2.2.
>
>
> Means that we need to rewrite all the old code, but +1. Seems more
> "natural" to me.
You should not used these function arguments in a first place... I did not! :)
Vadim
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Antonio Gallardo <ag...@agssa.net>.
Vadim Gritsenko dijo:
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
Means that we need to rewrite all the old code, but +1. Seems more
"natural" to me.
Best Regards,
Antonio Gallardo
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Tony Collen <co...@umn.edu>.
Sylvain Wallez wrote:
> Vadim Gritsenko wrote:
>> Proposed phase out plan is:
>>
>> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
>> syntax is detected.
>> 2. Throw exception in 2.1.7 when usage of deprecated syntax
>> is detected.
>> 3. Completely remove support of deprecated syntax in 2.2.
>>
>>
>> Please cast your votes.
>
> For those who haven't followed the discussion, the problem is explained
> here: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=109960611029412&w=2
From Sylvain's message:
I've been wanting to remove forbid this for a long time, but didn't knew
how to identify JS functions with parameters, in order to issue a proper
error message if this buggy construct is used. Looking a bit closer to
Rhino, I now found it: NativeFunction has a getArity() method which is
the number of parameters. We could then raise an error if getArity() != 0.
+1 as long as we don't lose the all-out ability to write functions with
parameters (which I don't think will happen, will it?), just to turn off
the positional-parameter functionality between flow and sitemap.
Sorry for the bad English, I just woke up :)
Tony
[RESULT][VOTE] Remove FlowScript Function Parameters Support
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Sylvain Wallez wrote:
> Vadim Gritsenko wrote:
>
>> Proposed phase out plan is:
>>
>> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
>> syntax is detected.
Done.
>> 2. Throw exception in 2.1.7 when usage of deprecated syntax
>> is detected.
Has to be done post 2.1.6.
>> 3. Completely remove support of deprecated syntax in 2.2.
Done.
Vadim
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Torsten Curdt <tc...@apache.org>.
Sylvain Wallez wrote:
> Vadim Gritsenko wrote:
>
>> Hi Guys,
>>
>> As discussed before, and several times already, it is time to phase
>> out "feature" of passing parameters from the sitemap into flowscript
>> as positioned function parameters:
>>
>> function myflow (a, b, c) {
>> ...
>> }
I am not sure if removing the parameters completely
is the best way ...but the order bugged me from day
one of flowscipt.
so +1 from me
--
Torsten
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:
> Hi Guys,
>
> As discussed before, and several times already, it is time to phase
> out "feature" of passing parameters from the sitemap into flowscript
> as positioned function parameters:
>
> function myflow (a, b, c) {
> ...
> }
>
> Because this syntax relies on order of <map:parameter/> elements in
> the sitemap but not names of the parameters. This syntax is replaced
> with non-ambigous:
>
> function myflow () {
> var a = cocoon.parameters.a;
> ...
> }
>
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
>
>
> Please cast your votes.
+1.
For those who haven't followed the discussion, the problem is explained
here: http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=109960611029412&w=2
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Re: [VOTE] Remove FlowScript Function Parameters Support
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Hi Guys,
>
> As discussed before, and several times already, it is time to phase out
> "feature" of passing parameters from the sitemap into flowscript as
> positioned function parameters:
>
> function myflow (a, b, c) {
> ...
> }
>
> Because this syntax relies on order of <map:parameter/> elements in the
> sitemap but not names of the parameters. This syntax is replaced with
> non-ambigous:
>
> function myflow () {
> var a = cocoon.parameters.a;
> ...
> }
>
> Proposed phase out plan is:
>
> 1. Write ERROR into the log file in 2.1.6 when usage of deprecated
> syntax is detected.
> 2. Throw exception in 2.1.7 when usage of deprecated syntax
> is detected.
> 3. Completely remove support of deprecated syntax in 2.2.
>
>
> Please cast your votes.
>
>
> Vadim
>
+1
--
Reinhard