Olivier Richaud wrote: >We think it's time for us to move from C1 to C2. Along other things that we >consider, is i18n that we are force to integrate. > >Now, our system is composed of : >- XSP pages ; >- a logicsheet that supply the main common functionnality shared by the XSP >pages ; >- 1 big stylesheet for the whole site, and 2 secondary stylesheets to render >reports in HTML and PDF. > >One big problem we foudn was the complexity of C2 coming with vairous >samples that are useless for our purposes. Do we have to recreate the war, >or is there any stripped version of C2 ready for prime time? > >Other point : Some tests pointed out difficulties with logicsheets and XSP. >In the past, we just added the namespace for our logicsheet to the xsp:page >tag, and here it goes, provided that the cocoon.properties file was OK. We >made the similar modification to cocoon.xconf file, and we failed to find >any valid explanation. But, we made it work without any logicsheet. > >I would be pleased to hear of anybody that moved from C1 to C2. > >Regards. > >Olivier. > The concept of sitemap is here to replace the various commands for Cocoon, that were embedded into XSP pages.
The general process in a sitemap is not far from what you are explaining: XSP -> logicsheet -> XSL -> output format. In a sitemap the process is called a pipeline with 3 kind of step: generation==production of the XML representing datas (only one generation per pipeline) transformation==manipulation of the XML (any number of successive transformation s per pipeline) serialization==transformation from the final XML tree to an output format (one serialization per pipeline) The sitemap is also a kind of BIG mod_rewrite rules. In fact, it is a mapping between URLs and pipelines. What you want to do in C2, for your application, is to map "http://server_URL/context_URL/path/to/foobar.xsp" to the (classic) pipeline XSP->XSL->HTML/PDF. The URL received by the sitemap manager of Cocoon from the appli server is the URL after the context_URL. So you have to map /path/to/foobar.xsp with the pipeline. The mapping can use wildcards, so you can have a mapping **/*.xsp <-> pipeline. (** means any string including /, * means any string with no / inside) Then you will want to define the classic pipeline. Take an example derivated from the default sitemap: <map:match pattern="**/*.xsp"> <map:generate type="serverpages" src="{1}/{2}.xsp"/> <map:transform src="stylesheets/dynamic-page2html.xsl"/> <map:serialize type="html"/> </map:match> This is exactly an XML version of the pipeline described above. {1} and {2} are only recalls of the matching pattern (very similar to sed or perl system of matching/replacing). For PDF generation, the final step of transformation must provide XSL:FO and the serializer mu be of type="fo2pdf". For logicsheet management, I presume adding it to the directory where other taglibs reside should be enough (not sure on that one). Hope it helps. (Hope I did not write too many wrong stuff) --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>