Articles
More
Links
For example you request the page csscolumnsite/faq.html.
The sitemap matches the pattern "*.html",
invoking the resource show-page. The resource name
show-page aggregates from its section parts the page. Each
part strips the root element of the xml document file, and use the
section name as its new part root element.
Finally the stylesheet stylesheets/sit2html.xsl replaces
each part root name by the a div id="section-name"
elements.
The resource show-page uses an internal pipeline for
each section. Each section uses the resource load-page for
loading the required xml document.
Cocoon provides a build/cocoon/webapp directory. This site is put
into the directory csscolumnsite under the webapp
directory.
Thus you can access the index page of this site by http://localhost:8888/cocoon/csscolumnsite/index.html if you launched Cocoon's jetty instance.
Generating the static version of this site is done by using following ant task
<path id="webapp.classpath">
<!-- add your cocoon-jars, classes etc. here
->
</path>
<target name="csscolumsite"
description="* build static csscolumnsite">
<taskdef name="cocoon"
classname="org.apache.cocoon.ant.CocoonTask"
classpathref="webapp.classpath"/>
<property name="build.dir"
value="value="${cocoon.dir}/build"/>
<property name="contextDir"
value="${build.dir}/cocoon/webapp"/>
<property name="workDir"
value="${build.dir}/csscolumnsite-work"/>
<property name="destDir"
value="${build.dir}/csscolumnsite"/>
<property name="configFile"
value="${build.dir}/documentation/cocoon.xconf"/>
<cocoon
contextDir="${contextDir}"
configFile="${configFile}"
workDir="${workDir}"
destDir="${destDir}"
targets="csscolumnsite/index.html"
logLevel="WARN"
/>
</target>
The generated html documents are generated into the directory
build/csscolumnsite. You can upload this directory, and its
subdirectories to the destination webserver.
You want to add an mid-col-2 xml document, names
new-1.xml.
Create a new xml file new-1.xml in the section directory
mid-col-2. Use document element <root>
as document root element. Use xhtml elements inside the root elements,
save the xml document file.
More over you may want add a link to this new document by creating a
link entry in the default mid-col-1 xml document, ie
mid-col-1/index.xml.
If you want to have a special mid-col-1 document for your newly
created document, create a new file mid-col-1/new-1.xml xml
document, containing the content for the mid-col-1 section.
PDF
csscolumnsite
Hints
» Use Search to search all documents.
» Use Recreate Index to create the inital index.
This may be neccessary once at startup.
» Search and Recreate Index are available
at HTML Cocoon online deployment, only.
» Search and Recreate Index are not available
on WML online, WML offline, and HTML offline deployments.