cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Sitemap versionning in TreeProcessor?
Date Fri, 16 Jul 2004 12:57:08 GMT
Carsten Ziegeler wrote:

>>Ok. So I'll continue that way, which means removing your configuration merging stuff
in favor of separate config files. Note that the size of these files has been largely reduced
since they no more contain role definitions.
>>    
>>
>
>Go ahead.
>  
>

Done!

The TreeBuilder is now a regular component.

The TreeProcessor builds the role name of the TreeBuilder using the 
namespace of the root element of the sitemap, tries to load the 
corresponding TreeBuilder and displays a meaningful error message if not 
found (try to change the namespace from 1.0 to 1.1 to see it in effect).

I think we achieved now the maximum possible decoupling of the sitemap 
engine with the container implementation.

There are only two locations with container-specific code:
- the creation of a component container with the contents of 
<map:components>
- the definition of NodeBuilders for a particular version of the 
sitemap. A selector is built, but is used very locally in the builder 
and has no relation with other application code, i.e. it can be kept as 
is while the container above moves to Fortress.

This also reduces memory usage, as moving the TreeBuilder in the root 
component container means that a single instance can be used to build 
several sitemap, wheras previously each processor was creating (and 
keeping in memory) its own TreeBuilder.

Enjoy!

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