[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: Maintaining request in match string.
From:       Christian Haul <haul () dvs1 ! informatik ! tu-darmstadt ! de>
Date:       2003-09-16 8:05:54
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic