cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <reinh...@apache.org>
Subject Re: cocoon-refdoc initial code is in the whiteboard
Date Wed, 13 Jul 2005 04:50:54 GMT
Robert Graham wrote:
> I'm a little confused as to how the wildcard matchers work here:
> 
> With a given URI  snippets/samples/subdir/dummy-sitemap.xweb
> 
> {global.codebase} = ../annotated-code
> That folder contains the files referenced by the pipeline.
> 
> <map:match pattern="*/**.*">
>         <map:generate type="slop" src="{global:codebase}/{2}.{3}">
> 
> Here we have four asterisks. By my understanding {1}, {2}, {3}, and
> {4} respectively from left to right. Now {2}.{3} in this case is
> "dummy-sitemap.xweb" because {2} is the filename and {3} the
> extension, but from my understanding the last asterisk should match
> the extension. This isn't the case, but I was hoping someone could
> better elucidate the wildcard matching sequence there.

<map:match pattern="*/**.*">
                     1  2 3

a double asterisk is *one* match. The difference to a single asterisk is, that a 
double asterisk also matches slashes.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Mime
View raw message