cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Wildcard includes in cocoon.xconf
Date Wed, 19 Jan 2005 22:29:19 GMT
Stefano Mazzocchi wrote:

> Carsten Ziegeler wrote:
>
>> Stefano Mazzocchi wrote:
>>
>>> what about reusing the code from the Wildcard matchers and have a 
>>> context://WEB-INF/xconf/*.xconf instead? alternatively, the traverse 
>>> code is already there... so you just need to do convert the above * 
>>> into .* and use a regexp package, voila'...
>>>
>> Yepp, sounds good to me, with the little change to separate the two 
>> parts, like this:
>>
>> <include dir="context://WEB-INF/xconf" pattern="*.xconf"/>
>>
>> WDYT?
>
>
> hmmm, I'd rather have one thing only... so that I can do stuff like
>
>  context://WEB-INF/**/blocks/**/xconf/*.conf
>
> ;-)


Sure, that would be better, but we'll have to import Ant scanners just 
for this!

Separating directory and name pattern avoids this. However, it would 
seem more natural (well, for those used to Ant) to have it written as 
<include dir="context://WEB-INF/xconf" include="*.xconf"/> as the 
meaning of the pattern isn't exactly the same as in <map:match 
pattern="..."/>: in the xconf, it defines a filter on the collection 
resulting from the traversal of the directory, whereas in the sitemap 
it's a pattern-matching on a single value (the URL).

WDYT?

Sylvain (who removed its Incredible suit before going to sleep)

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message