Installation Details |
-
Copy mylogic.xsl and db.xsl to <cocoon>/WEB-INF/classes/spain/logicsheet directory.
-
Add these lines to cocoon.xconf (see provided cocoon.xconf, line 146):
<!-- Simple logicsheet demonstration --> <builtin-logicsheet> <parameter name="prefix" value="mylogic"/> <parameter name="uri" value="http://hostname/mylogic/1.0"/> <parameter name="href" value="resource://spain/logicsheet/mylogic.xsl"/> </builtin-logicsheet> <!-- Nested logicsheet demonstration --> <builtin-logicsheet> <parameter name="prefix" value="db"/> <parameter name="uri" value="http://hostname/db/1.0"/> <parameter name="href" value="resource://spain/logicsheet/db.xsl"/> </builtin-logicsheet>or simply replace the original cocoon.xconf by cocoon.xconf from this example.
Now you have installed and configured logicsheets. Now we can install samples.
-
Create a directory in the cocoon web app root like this: <cocoon>/spain.
-
Copy simple.xsp, db.xsp, spain.xsl files to <cocoon>/spain directory.
-
Modify your sitemap, add these lines to the <map:pipelines> section:
<!-- Special pipeline for Spain samples --> <map:pipeline> <map:match pattern="spain/*.xsp"> <map:generate type="serverpages" src="spain/{1}.xsp"/> <map:transform src="spain/spain.xsl"/> <map:serialize /> </map:match> </map:pipeline>or replace the original sitemap.xmap with the provided one from this example Note, that it is not required to have a special pipeline, you can simply add the <map:match> to any existing non-internal pipeline.
-
Shutdown your servlet engine.
-
Clear Cocoon working directory (for Tomcat it's <TOMCAT_HOME>/work/<cocoon>).
-
Startup servlet engine.
-
Type:
http://localhost:8080/cocoon/spain/simple.xsp
then
http://localhost:8080/cocoon/spain/db.xsp
-
Enjoy ;)




