You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joel P W Pitt <jp...@student.canterbury.ac.nz> on 2003/09/16 06:51:38 UTC

Maintaining request in match string.

Hi there,

I've tried several times to get help here with no luck, so I thought I'd
resort to a more general question.

Is it possible to use a matcher to match against the request string?
For example:

If I had the URL
http://localhost/info.html?45,23

Could I use a matcher in this manner:
<map:match pattern="info.html?*,*">
            <map:parameter name="x" value="{1}"/>
            <map:parameter name="y" value="{2}"/>
    <!--do stuff here-->
</map:match>

I've been fretting about how to retrieve image map
coordinates in cocoon. So far I've come to the conclusion
that you can't, but I'd love for someone to prove me wrong! ;-)

I'm using flowscript, and I thought it might be possible to retrieve the
request string through the cocoon request object. But there isn't any
such method that I'm aware of :-(

Any help would be much appreciated!!

Thanks,
Joel


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


Re: Maintaining request in match string.

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 16.Sep.2003 -- 04:51 PM, Joel P W Pitt wrote:
> Hi there,
> 
> I've tried several times to get help here with no luck, so I thought I'd
> resort to a more general question.
> 
> Is it possible to use a matcher to match against the request string?
> For example:
> 
> If I had the URL
> http://localhost/info.html?45,23
> 
> Could I use a matcher in this manner:
> <map:match pattern="info.html?*,*">
>            <map:parameter name="x" value="{1}"/>
>            <map:parameter name="y" value="{2}"/>
>    <!--do stuff here-->
> </map:match>

Try to use the regexp matcher instead of the simple glob pattern
matcher:

<map:match type="regexp" pattern="info.html\?(\d+),(\d+)">

please check that \d (=decimal) and the escaping of brackets is
correct. I'm always struggling with tool takes which flavour of
regular expressions.... if \d is unknown, you could replace it with
[1-0] or [1234567890] 

HTH

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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