cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: [RT] Flow/Sitemap Integration
Date Tue, 14 Jan 2003 16:52:43 GMT
Michael Melhem wrote:

>>Hmmm, but if we get that far, then
>>  <flowmap>
>>   <map type="regexp" patter="blah*" flow="blahFlow"/>
>>  </flowmap>
>>isn't just syntax sugar for
>>  <pipeline>
>>   <match type="regexp" pattern="blah*">
>>    <call function="blahFlow"/>
>>   </match>
>>  </pipeline>
> Hmm..Well maybe, but for the fact that flowmap section in not within the
> pipeline section (which I think we agreed is what we want)
> and that the treeprocessor would not allow actions or
> other routing components which would otherwise be allowed within the
> pipeline section.

Good point.

> if we agree that something like the following sitemap syntax
> is desirable:
> <map:sitemap>
>   <map:components>
>   </map:components>
>   <map:flow>
>     <map:script>
>       <src="myflow.js">
>     </map:script>
>     <map:flowmap>
>       <map:map pattern="login/"  flow="login"/>
>       <map:map type="regexp" pattern="register*/"  flow="registerUser"/>
>       <map:map pattern="logout/" flow="logout"/>
>     </map:flowmap>
>   </map:flow>
>   <map:pipelines>
>     ...
>   </map:pipelines>
> </map:sitemap>
> We could define a flow mapping as a "matching" between a flow function
> and its corresponding entry point pattern (which could be an URI
> or whatever)


> We could use the <map:match> directly withing the flowmap to implement
> this, but this would not force the user to call a flow method and would
> not allow for the compact easy-to-read syntax above.

But I'm pretty sure that people *will* want to extend that and will 
complain about the fact that <map> and <match> do, in fact, the same 
thing, but with different semantics and this won't please people (nor 
please my sense of semantic elegance, to tell you the truth)

> If we use <map:map> component (as suggested above), the question then
> becomes, how do we get the <map:map> component to match (URIs in
> the above case)?
> Is there a reason why we wouldnt use (under the hood) the
> already existing matcher components to the matching here?.

No technical reason (that I can think of) but it's a purely semantical one.

Granted that it makes sense to move the flow hooks from the pipeline, I 
think that we should reuse semantics where it makes sense, because 
people already made an effort to learn it and in that case we reduce 
their need to learn new stuff.


Stefano Mazzocchi                               <>

To unsubscribe, e-mail:
For additional commands, email:

View raw message