cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: Wildcard includes in cocoon.xconf
Date Thu, 20 Jan 2005 20:14:37 GMT
Sylvain Wallez wrote:
> 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?
> 
+1 :)

I will implement this simpler solution - if someone needs the advanced 
feature it can still be implemented.

Carsten

Mime
View raw message