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] Flowmaps
Date Thu, 20 Jun 2002 00:10:49 GMT
> From: Ovidiu Predescu [mailto:ovidiu@apache.org]

<snip/>

> >> 8. Vadim's idea about making the syntax easier.
> >>
> >> I think the idea of having something as simple as:
> >>
> >> <map:match pattern="calc/*">
> >>   <map:flow method="calculator" continuation="{1}" />
> >> </map:match>
> >>
> >> makes a lot of sense. Using different matchers, the continuation id
can be
> >> extracted from the request parameters, cookies, you name it. The
only
> >> problem with it is that is a bit inflexible in terms of the URI
design. If
> >> I'd like to have calc/kont/*, there's no easy way to specify it.
> >
> > <map:match pattern="calc/kont/*">
> >
> > Did I miss somehting?
> 
> How do you extract the continuation id if it's embedded in a request
> parameter?

You asked for calc/kont/* - and that's very easy to achieve as shown
above. If you want to hide continuation ID to request parameter, that's
also very easy with existing request parameter matcher:

<map:match pattern="calc">
  <map:match type="parameter" pattern="cont-id-param">
    <map:flow continuation="{1}" /> [here we could omit method=""]
  </map:match>
  <map:flow method="calculator"/> [here we can omit continuation=""]
</map:match>


I poked around with continuation sample today... Seems this is even
possible right now, with your current code. The only difference is that
instead of one map operator you have to use two different ones (and one
of them is (over) overloaded map:call):

<map:match pattern="calc">
  <map:match type="parameter" pattern="cont-id-param">
    <map:continue with="{1}"/>
  </map:match>
  <map:call function="calculator"/>
</map:match>


Difference is only in syntax.

Vadim

<snip/>


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


Mime
View raw message