Transformations
Serving it up
Once C2 is installed you want to be able to serve pages. It's all too easy to jump into doing complex XML/XSL/Logicsheet stuff without understanding the basics of how it works. When I failed in this I changed my approach to trying to do the simplest things then build up. This way has enforced some concepts and most importantly started me on the way to becoming familiar with the sitemap.
The Sitemap
The biggest change I have seen in C2 over C1.8 is the Sitemap. This file ({TOMCAT_HOME}\webapps\cocoon\sitemap.xmap) contains a load of XML that tells Cocoon what code handles what type of requests and what actions should take place when a file is requested. It looks to be really powerful and as I understand it more I will seek to open it up to more understanding. For the time being it is sufficent to know that you have to do stuff with this file before anything will work!
The Building Blocks
The links below will take you to examples of using C2 to serve XML that increase in complexity and demonstrate some of the techniques that I am using. If you know better ways of doing these things or can add something new please contribute and I will make the examples better. One final point - these pages are being served from simple free web space. C2 is not running behind this so I cannot provide working results of my examples on this site. You will have to create the files and get them to work yourself for the time being.
Please note that, unless otherwise indicated, all my examples assume that the files are in a folder called ctwig underneath {TOMCAT_HOME}/webapps/cocoon/
You can find links to more information in the resources section.
|