cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stevens" <>
Subject RE: Why two different matchers for project root and subdirectories?
Date Wed, 17 May 2006 07:15:34 GMT
>From: Ferdinand Soethe <>
>Date: Wed, 17 May 2006 09:09:22 +0200
>I'm sorry if this a really silly question but I found no explanation
>searching the archives and the net.
>I keep stumbling across the the problem with WildcardURI-Matcher that
>need to catch a resource in the project root directory or a subdirectory.
>A pattern like
>  <map:match pattern="**/*">
>seems to catch calls for all files in subdirectories, but will not apply
>to files in the project root even though docs say that 'Matches zero
>or more characters including the slash ('/') character'.

The "**" may match zero or more characters, but the "/" in there will only 
match a slash.  Hence the final "*" must be a file in a subdirectory.

>So to catch files on the project root it seems like you have to create
>a second matcher like
>  <map:match pattern="*">
>in a second pipeline.
>Since I've seen the same technique used in Forrest pipelines I'm
>begging to wonder if there isn't a better way of doing that with just
>one matcher.

How about just matching on "**" rather than "**/*"?


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

View raw message