cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: [RT] Flowscript [was Re: [RT] Flowmaps]
Date Thu, 20 Jun 2002 22:07:47 GMT
> From: Stefano Mazzocchi [mailto:stefano@apache.org]

<snip/>

> Ah, ok. Just one point, the code above:
> 
>   <map:match pattern="calc/*">
>    <map:flow method="calculator" continuation="{1}" />
>   </map:match>
> 
> would not match "calc/" (at least, in the past I had problems with
this,
> maybe behavior changed today, I'm not sure),

It matches (be sure).


> probably
> 
>   <map:match type="regexp" pattern="calc/?(.*)">

You mean "calc/(.*)?", right?


>    <map:flow method="calculator" continuation="{1}"/>
>   </map:match>
> 
> is a better way to handle it. What do you think?

<snip/>

> > > Yes, and also I was thinking about having something like
> > >
> > > <map:call flow="calculator" method="calculator"/>
> > >
> > > that provides sort of namespacing and avoids collisions.
> >
> > In the new scheme I'm working on, there's no potential for
collisions, each
> > flow script has its own namespace, separated from the others.
> 
> Internally, yes, but how would you specify which flowscript you want
to
> call between all those you have declared in your sitemap?
> 
> For example
> 
>  <map:flowscripts default="a">
>   <map:flowscript name="a">
>    <map:script src="first.js" language="javascript"/>
>    <map:script src="second.js" language="javascript"/>
>   </map:flowscript>
>   <map:flowscript name="b">
>    <map:script src="first.js" language="javascript"/>
>    <map:script src="third.js" language="javascript"/>
>   </map:flowscript>
>  </map:flowscripts>
> 
> as you can see, both flowscripts include the same script 'first.js',
so
> the function calls between the two overlap completely. Let us assume
> that the function 'blah' is described in 'first.js', then you call it
> with
> 
>  <map:flow function="blah" continuation="..."/>
> 
> and it defaults to the 'a' flowscript (since the
> map:flowscripts/@default attribute states so). But how would you call
> the 'blah' function of the 'b' flowscript?
> 
> I would follow the same pattern we use for components and use
> 
>  <map:flow flowscript="b" function="blah" continuation="..."/>

More consistent with the rest will be:

<map:flow type="b" function="blah" continuation="..."/>

Vadim


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message