{"data":{"site":{"siteMetadata":{"title":"Andrew McDonough","author":"Andrew McDonough","disqusShortname":"andrewmcdonough","siteUrl":"https://www.andrewmcdonough.com"}},"markdownRemark":{"id":"1a30472c-415d-5f5d-b6a2-eff5af7b7670","excerpt":"Cocoon Cocoon is an  XML ] publishing framework developed on top of the [ Avalon  Server Framework. Separation of Concerns - Making user people can interact and…","html":"<h1>Cocoon</h1>\n<p>Cocoon is an [XML]] publishing framework developed on top of the [<a href=\"/wiki/xml%5D%5D_publishing_framework_developed_on_top_of_the_%5B%5Bavalon\">Avalon</a> Server Framework.</p>\n<p>Separation of Concerns - Making user people can interact and collaborate on a project without getting in each others way.</p>\n<h2>Installing Cocoon on Tomcat</h2>\n<ul>\n<li>Download the cocoon tar</li>\n<li>Extract it</li>\n<li>To build the war file run\nbuild war</li>\n<li>The war file should be found in /cocoon/build/cocoon/build.war</li>\n<li>Copy build.war to the tomcat webapps directory</li>\n</ul>\n<p>Cocoon Forms (former Woody) framework</p>\n<p>Copy cocoon.properties from cocoon’s root directory to $CATALINA_HOME/conf/</p>\n<ul>\n<li>sitemap.xmap - The sitemap file (usually located in $CATALINA_HOME/webapps/cocoon</li>\n<li>cocoon.xconf -</li>\n<li>cocoon.roles - mapping file - mappings for implementations to names - if the default implementation is to be overrides</li>\n</ul>\n<h2>sitemap.xmap</h2>\n  <?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<p>  &#x3C;map:sitemap xmlns:map=”<a href=\"http://apache.org/cocoon/sitemap/1.0%22%3E\">http://apache.org/cocoon/sitemap/1.0”></a>\n&#x3C;map:pipelines>\n&#x3C;map:pipeline>\n&#x3C;map:match pattern=“*.html”>\n&#x3C;map:generate src=“{1}.xml”/><br>\n<!-- Note that {1} is substituted by the pattern matched by the * wildcard -->\n&#x3C;map:transform src=”<filename>.xsl”/>\n&#x3C;map:serialize type=“html”/>\n&#x3C;/map:match>\n<!-- more pattern matching -->\n&#x3C;/map:pipeline>\n&#x3C;/map:pipelines>\n&#x3C;/map:sitemap></p>\n<p>The sitemap maps URI space to resources.  It consist of components and pipelines.\nPipelines are made out of components.\nAll pipelines consist of at least two components; a generaor which produces the content and a serializer which delivers the content.\nA generator generates SAX events and a serializer turns these events into a byte stream.\nEach generator has a unique name and is mapped to a java class\nThe logger attribute defines where messages produced by a component should go</p>\n<h2>cocoon.xconf</h2>\n<p>Contains settings for all cocoon applications.</p>\n<p>XSPs - eXtensivel Server Pages\nThe Cocoon equivalent of a JSP - they contain both content and login and can import functionality via logicsheets cf. taglibs.</p>\n<h2>Synchronous and Asynchronous loading</h2>\n<ul>\n<li>When synchronous loading is used, the servlet waits until the new version of the page is generated.</li>\n<li>When asynchronous loading is used new request use the old sitemap until compilation of the new one is complete.</li>\n</ul>\n<p>The type of loading is found in cocoon.xconf under the reload-method property.</p>\n<h3>How to read the cache</h3>\n<p>  &#x3C;map:match pattern=”<em>/</em>/”>\n&#x3C;map:select type=“resource-exists”>\n&#x3C;map:when test=“cache/{1}/{2}/index.html”>\n&#x3C;map:read mime-type=“test/html” src=“cache/{1}/{2}/index.html”/>\n&#x3C;/map:when>      \t<br>\n&#x3C;map:otherwise>\n&#x3C;map:call function=“navcontent”>\n&#x3C;map:parameter name=“siteid” value=“{1}”/>\n&#x3C;map:parameter name=“navid” value=“{2}”/>\n&#x3C;map:parameter name=“contentid” value=“index”/><br>\n&#x3C;/map:call>\n&#x3C;/map:otherwise>\n&#x3C;/map:select>\n&#x3C;/map:match>   </p>\n<h2>JX Templates</h2>\n<p><a href=\"http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html\">http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html</a></p>\n<p>We use <a href=\"/wiki/http://jakarta.apache.org/commons/jexl/%7Cjexl\">http://jakarta.apache.org/commons/jexl/|JEXL</a></p>\n<h2>Bibliography</h2>\n<ul>\n<li>\n<p><a href=\"/wiki/http://www.w3.org/tr/xslt%7Cwc3_standards\">http://www.w3.org/TR/xslt|WC3 Standards</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://localhost:8080/cocoon/docs/userdocs/concepts/index.html\">http://localhost:8080/cocoon/docs/userdocs/concepts/index.html</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://cocoon.apache.org/2.1/howto/howto-html-pdf-publishing.html\">http://cocoon.apache.org/2.1/howto/howto-html-pdf-publishing.html</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://wiki.apache.org/cocoon/distributingcocoonapplications\">http://wiki.apache.org/cocoon/DistributingCocoonApplications</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://cocoon.apache.org/2.1/tutorial/#third-party+tutorials\">http://cocoon.apache.org/2.1/tutorial/#Third-Party+Tutorials</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://cocoon.apache.org/2.1/tutorial/tutorial-develop-webapp.html\">http://cocoon.apache.org/2.1/tutorial/tutorial-develop-webapp.html</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon.html\">http://www.javaworld.com/javaworld/jw-09-2002/jw-0920-cocoon.html</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://new.cocoondev.org/main/index.html\">http://new.cocoondev.org/main/index.html</a></p>\n</li>\n<li>\n<p><a href=\"/wiki/http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html\">http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html</a></p>\n</li>\n</ul>","frontmatter":{"title":"","date":null,"disqusIdentifier":null,"disqusUrl":null}}},"pageContext":{"slug":"/wiki/cocoon/","previous":{"fields":{"slug":"/wiki/continuous_integration/"},"frontmatter":{"title":"","disqusIdentifier":null,"disqusUrl":null}},"next":{"fields":{"slug":"/wiki/certification/"},"frontmatter":{"title":"","disqusIdentifier":null,"disqusUrl":null}}}}