Take a look at http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=106649931022515&w=2 for a description on how the treeprocessor works. The function of the virtual sitemap components is described here http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111316710610638&w=2. I don't know if the VPCs work anymore, haven't tested them for quite a while.

For the understanding the resource handling (or other parts of the treeprocessor), it is a good idea to start looking at http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/treeprocessor/treeprocessor-builtins.xml, which configure all the execution element of the sitemap. Where you can see that a resource definition is handled by a NamedContainerNodeBuilder, and that calling a resource is handled by a CallNodeBuilder.

IIRC, there are a few subtle things involved in the resource handling code, so be prepared to that you might need to spend some time learning how it works ;)

/Daniel

Adrien Guillon skrev:
Okay, I really prefer this solution... porting my code from resources to virtual sitemap components in the future will be very easy from what I have seen. Could you please direct me to a few classes to look at and documentation? Maybe any pointers you could give for how to proceed? This is my first dive into the guts of Cocoon :-)

I really do not want to sacrifice a good design because I'm missing components. Also, I would be very interested in taking a better look at the new way that 2.2 does things, perhaps I will have some relevant input as I look at this rather complex project I am working on.

Thanks for the help!

AJ

On 4 May 2006 2:34 pm, Carsten Ziegeler wrote:
Adrien Guillon schrieb:
How difficult would it be to alter 2.1.9 instead, to allow access to
resources defined in parent sitemaps from children sitemaps?  If I can do
that, I can easily change the resource access methods to the virtual
sitemap components when 2.2 rolls out...
That shouldn't be too hard I think. You have to dig into the tree
processor code
and find out how it works. At least it should be much easier to do that
than to implement the virtual sitemap components in 2.1.9 :)

Carsten

Reply via email to