cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [RT] input-modules in the sitemap
Date Mon, 31 Jan 2005 13:11:31 GMT
Carsten Ziegeler wrote:

> Sylvain Wallez wrote:
>
>> Stefano Mazzocchi wrote:
>>
>>> Am I the only one that is bugged by the fact that you have to add 
>>> the input modules in the cocoon.xconf while the sitemap components 
>>> go in the sitemap?
>>
>
> We had several attempts to change this but there was always someone 
> against it :(
>
>> You can do it right now. <map:components> is handled exactly as an 
>> xconf file to feed the service manager. And since components don't 
>> care about namespaces in their configurations, you can even write:
>>
>> <map:input-modules>
>>  <map:input-module name="blah" class="com.blah.BlahModule"/>
>> </map:input-modules>
>>
>> (notice though the use of "class" instead of "src")
>>
>> This behaviour, although unofficial, is effective since day one in 
>> the TreeProcessor. IMO, it's time to make it official.
>
>
> No, please not - with 2.2 we have the official include feature and 
> imho this is sufficient for this.


Yeah, but technically speaking, this makes absolutely no difference, as 
<include> does nothing but expanding the contents of an xconf within 
<map:components>

So writing
  <map:components>
    <include src="blah.xconf"/>
  </map:components>
is exactly the same as copy/pasting the contents of blah.xconf in the 
sitemap...

Going further, add the possibility to specify a class-path to 
<map:components> to feed a per-sitemap classloader (or autocompiling 
classloader) and you have cheap semi-real blocks.

Sylvain

-- 
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