Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaReplication , version: 1 on 
Mon Jun 23 15:43:23 2003 by GregorRothfuss

New page created:
+ Secure Copy</title>
+                       <p>
+ The shell script uses secure copy for replicating the files from the 
authoring to the live server.
+ In order that the live server is trusting the authoring server one has to 
generate public keys.
+ Note that we assume the use of SSH 2.
+ </p>
+                       <section><title>Key Generation</title>
+                                       <ol>
+                                               <li>ssh-keygen -t dsa (Don't 
enter a passphrase, just hit enter. The file ~/.ssh/id_dsa.pub should be 
generated)</li>
+                                               <li>scp ~/.ssh/id_dsa.pub 
[EMAIL PROTECTED]:.ssh/authorized_keys (if authorized_keys does already exist 
on the remote server, then only add the key from id_dsa.pub)</li>
+                                       </ol>
+                       </section>
+               </section>
+               <section><title>Shell Script</title>
+                       <p>
+ Use the shell script <code>lenya/bin/replicate.sh</code> to copy the exported 
static files to the remote host.
+ </p>
+               </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaCreateResource , version: 1 
on Mon Jun 23 15:35:02 2003 by GregorRothfuss

New page created:
+ There are many different ways to create respectively import content into 
+ a Content Management System. You can upload an image, you can create a 
document
+ based on some form input or you can create a document by copying a sample 
document.
+ The following use cases shall illustrate some possible situations in more 
detail.
+ The goal is to develop a generic API for resource creation.
+ </p>
+     </section>
+     <section><title>Use Cases</title>
+       <section><title>Create Article (New Lenya Times)</title>
+         <ol>
+           <li>Go to the section page (e.g. International Section)</li>
+           <li>Click in the File Menu on "New Article"</li>
+           <li>Confirm by clicking ok on the "Create new article" screen</li>
+           <li>Sample article with all required elements will be copied onto 
+ a new article, where identifier has been created automatically based on the 
current date</li>
+           <li>Author/Editor will be redirected to newly created Article</li>
+           <li>The system inserts in the background the newly created article 
at 
+ the top of the refered section page</li>
+         </ol>
+       </section>
+       <section><title>Create Article (unipublic)</title>
+         <ol>
+           <li>Go to the section page (e.g. Gesundheit)</li>
+           <li>Click in the File Menu on "New Article"</li>
+           <li>On the "Create new article" screen enter an identifier (based 
on Filemaker ID)</li>
+           <li>Sample article with all required elements will be copied onto a 
new article with the identifier entered by the editor</li>
+           <li>The system inserts the newly created article at the top of the 
refered section page</li>
+           <li>Author/Editor will be redirected back to the refered section 
page</li>
+         </ol>
+       </section>
+       <section><title>Upload Image (unipublic)</title>
+         <ol>
+           <li>Go to the article page</li>
+           <li>Click on a "new image" icon for instance between two 
paragraphs</li>
+           <li>On the "Upload new image" screen click on "browse" in order to 
select an
+ image from your local harddisk. Enter a filename as name for the image on the 
server. Click "upload image".</li>
+           <li>The system stores the image "beside" the refered article and 
creates a meta file (XML) for the
+ image with fields such as "Creation Date", User", "Filename", "Mime-Type", 
etc.</li>
+           <li>The system inserts an XInclude into the article (for instance 
between two paragraphs) referencing the meta file</li>
+           <li>The user will be redirected to the refered article</li>
+         </ol>
+       </section>
+       <section><title>Submit Story (Lenya News and Comments)</title>
+         <ol>
+           <li>Click on "Submit Story" in the main navigation on the left hand 
side. You
+ will be redirected to a form.</li>
+           <li>Complete the form (e.g. title, lead, text, category, etc.).</li>
+           <li>Submit the form and you will be redirected to a preview</li>
+           <li>Confirm the Preview or edit the form once again.</li>
+           <li>After confirming the preview, the User/Author will be 
redirected to a "Thank you" screen.</li>
+           <li>The systems adds the new story to the list of submitted stories 
(submissions list) and
+ notifies the appropriate editors via email.</li>
+         </ol>
+       </section>
+     </section>
+     <section><title>Related Information</title>
+         <p>
+       <fork 
href="http://jakarta.apache.org/slide/javadoc/org/apache/slide/content/ContentImpl.html";>ContentImpl:
 Implementation of the Slide content interface</fork><br/>
+       <fork 
href="http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/CreateEmptyFile";>Zope:
 CreateEmptyFile</fork><br/>
+       <fork 
href="http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/CreateFileFromFormInput";>Zope:
 CreateFileFromFormInput</fork><br/>
+       </p>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaProxyGenerator , version: 1 
on Mon Jun 23 15:43:02 2003 by GregorRothfuss

New page created:
+ WebServiceProxyGenerator</title>
+ <p>
+ Ivelin Ivanov wrote the WebServiceProxyGenerator, which can be tested as a 
sample of Cocoon (2.1-dev):
+ http://localhost:8080/cocoon/samples/webserviceproxy/
+ </p>
+ 
+ <p>
+ More information can be found within the
+ <link 
href="http://marc.theaimsgroup.com/?l=xml-cocoon-dev&amp;w=2&amp;r=1&amp;s=WebServiceProxy&amp;q=b";>mailing
 list archive</link>.
+ </p>
+ 
+    <section><title>Sitemap: Component</title> 
+ <source><![CDATA[
+ 
+ <map:components>
+   <map:generators default="file">
+     <map:generator name="wsproxy" 
src="org.apache.cocoon.generation.WebServiceProxyGenerator" 
logger="webapp.wsproxy"/>
+   </map:generators>
+ </map:components>
+ 
+ ]]></source>
+    </section>
+ 
+    <section><title>Sitemap: Pipeline</title>
+ <source><![CDATA[
+ 
+ <map:pipeline>
+   <map:match pattern="*">
+     <map:generate type="wsproxy" 
src="http://{header:host}/cocoon/samples/xmlform/wizard?cocoon-view=xml"; 
label="xml"/>
+     <map:transform src="stylesheets/newWizard2html.xsl" />
+     <map:transform 
src="context://samples/stylesheets/xmlform/xmlform2html.xsl"/>
+     <map:serialize type="html"/>
+   </map:match>
+ </map:pipeline>
+ 
+ ]]></source>
+    </section>
+    </section>
+ 
+    <section><title>Lenya ProxyGenerator</title>
+ <p>
+ Before we were aware of Ivelin's WebServiceProxyGenerator we started to write 
our own. 
+ As soon as we realized that Ivelin's ProxyGenerator already existed within 
Cocoon, we tried
+ to use his Generator.
+ Unfortunately we are experiencing some problems with regard to session 
handling with Ivelin's WebServiceProxyGenerator.
+ The Lenya ProxyGenerator seems to be fine, at least for the purpose we need 
it.
+ The goal is to  locate the origin of the problems and hopefully merge our 
stuff with Ivelin's work.
+ </p>
+ 
+ <p>
+ Existing cookies are being forward. New cookies are not being forwarded.
+ </p>
+ 
+    <section><title>Sitemap: Component</title> 
+ <source><![CDATA[
+ 
+ <map:components>
+   <map:generators default="file" />
+ </map:components>
+ 
+ ]]></source>
+    </section>
+ 
+    <section><title>Sitemap: Pipeline</title>
+ <source><![CDATA[
+ 
+ ]]></source>
+    </section>
+    </section>
+ 
+     <section><title>Related Resources</title>
+       <p>
+         <link 
href="http://nagoya.apache.org/gump/javadoc/jakarta-commons/httpclient/dist/docs/api/index.html";>HttpClient
 API</link>
+       </p>
+       <p>
+         <link href="http://wp.netscape.com/newsref/std/cookie_spec.html";>Http 
Cookies Spec</link>
+       </p>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaRoles , version: 1 on Mon 
Jun 23 15:33:26 2003 by GregorRothfuss

New page created:
+ Roles of the Lenya Users 
+ 
+ 
+   All users of the Lenya-CMS have roles assigned to their usernames. These 
roles 
+   are the basis of the authorization scheme used throughout the application. 
The roles
+   and their respective authorizations are totally customizable through an
+   administration panel.
+ 
+ 
+   All roles belong to one of these main groups:
+ * <jump href="bas-roles.html#roles_admin">Administrators</jump>
+ *  <jump href="bas-roles.html#roles_author">Authors</jump>
+ *  <jump href="bas-roles.html#roles_designer">Designers</jump>
+ *  <jump href="bas-roles.html#roles_publisher">Publishers</jump>
+ 
+ 
+ <anchor id="roles_admin"/>
+ <section><title>Administrators</title>
+ <p>
+   Administrators are responsible for:</p>
+   <ul>
+     <li>Maintaining users and their profiles (e.g. assigned roles)</li>
+     <li>Maintaining the site/publication description</li>
+     <li>Maintaining page descriptions</li>
+     <li>Configuring the Lenya-CMS:</li>
+     <ul>
+       <li>Assigning editors to edit tasks</li>
+       <li>...</li>
+     </ul>
+   </ul>
+ <p>
+   For most/all of these tasks, specific configuration pages are provided
+   whithin the Lenya-CMS's <em>Administration Block</em> to shield the 
+   administrator from the internals of xml/xsl technologies and the
+   Cocoon environment.
+ </p>
+ </section>
+ 
+ <anchor id="roles_author"/>
+ <section><title>Authors</title>
+ <p>
+   Authors are the users responsible for content creation and management, they 
use
+   the specific editors to maintain the content in a controlled and consistant 
way.
+   Typically, authors are never confronted with design choices and/or xml/xsl 
documents, 
+   they only work whithin the Lenya-CMS environment, i.e. a www-browser. The 
content
+   is first placed in a staging context, waiting for a <link 
href="#roles_publisher">
+   publisher</link> to publish it so that it can be viewed by external viewers 
of
+   the publication.
+ </p>
+ </section>
+ <anchor id="roles_designer"/>
+ <section><title>Designers</title>
+ <p>
+   Designers are users responsible for maintaining the layout and style of the
+   publication. Typically, they work directly with the xsl and css files
+   used to transform the publication for presentation (e.g. in a browser), as
+   well as the required graphic files. All these files are located in a 
separate
+   branch of the application tree for convenience (see also 
+   <link href="#directories">Directory structure</link> below). To simplify 
the 
+   designer's work, a <em>"publication explorer"</em> could be provided, that 
helps
+   to navigate the publishing tree (by reading sitedef.xml) and to identify 
the content
+   files and their structure (by reading the page descriptor files), and that 
+   can be linked to any xml/xsl-editor.
+ </p>
+ </section>
+ 
+ <anchor id="roles_publisher"/>
+ <section><title>Publishers</title>
+ <p>
+   Publishers are users that have permission to add staged content to the live
+   publication. This role group is primarily introduced for workflow management
+   purposes. In practice, publisher roles will be combined with author roles 
to 
+   model the workflow of the content management environment, allowing for 
reviewing
+   and editing activities.
+ </p>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaImageUpload , version: 1 on 
Mon Jun 23 15:38:12 2003 by GregorRothfuss

New page created:
+ Meta Data</title> 
+     <p>
+ The HTTP Upload Image Creator is a concrete implementation of the 
ResourceCreator pattern.
+     </p>
+ 
+    <section><title>Example</title> 
+            <source><![CDATA[
+ 
+ 
+ <?xml version="1.0" encoding="utf-8"?>
+ 
+ <XPSMediaObject id="1029146182207" type="Image" 
xmlns:xlink="http://www.w3.org/xlink";>
+ <meta>
+   <name>Jeep-im-Wasser.jpg</name>
+ </meta>
+ 
+ <instance 
filename="/home/newzz/src/newzz/build/nzz/data/xml/online/daily/nzzoml/images/data/1029146182207.jpg"
 name="1029146182207.jpg" type="File">
+   <property name="content-type" value="image/pjpeg"/>
+   <property name="imageheight" value="195"/>
+   <property name="imagewidth" value="195"/>
+ </instance>
+ </XPSMediaObject>
+ 
+ 
+            ]]></source>
+       <p>
+         According to Dublin Core (http://dublincore.org/documents/dces/)</p>
+         <source><![CDATA[
+           
+ <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE document PUBLIC 
"-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
+ 
+   <dc:metadata> 
+     
+     <Title></Title>
+ <!--   Definition:  A name given to the resource. -->
+ <!--   Comment:     Typically, a Title will be a name by which the resource 
is -->
+ <!--                formally known. -->
+   
+     <Creator></Creator>
+ <!--   Definition:  An entity primarily responsible for making the content of 
-->
+ <!--                the resource. -->
+ <!--   Comment:     Examples of a Creator include a person, an organisation, 
-->
+ <!--                or a service. -->
+ <!--                Typically, the name of a Creator should be used to -->
+ <!--                indicate the entity. -->
+ 
+     <Subject></Subject>
+ <!--   Definition:  The topic of the content of the resource. -->
+ <!--   Comment:     Typically, a Subject will be expressed as keywords, -->
+ <!--                key phrases or classification codes that describe a topic 
-->
+ <!--                of the resource. -->
+ <!--                Recommended best practice is to select a value from a -->
+ <!--                controlled vocabulary or formal classification scheme. -->
+ 
+     <Description></Description>
+ <!--   Definition:  An account of the content of the resource. -->
+ <!--   Comment:     Description may include but is not limited to: an 
abstract, -->
+ <!--                table of contents, reference to a graphical 
representation -->
+ <!--                of content or a free-text account of the content. -->
+ 
+     <Publisher></Publisher>
+ <!--   Definition:  An entity responsible for making the resource available 
-->
+ <!--   Comment:     Examples of a Publisher include a person, an 
organisation, -->
+ <!--                or a service. -->
+ <!--                Typically, the name of a Publisher should be used to -->
+ <!--                indicate the entity. -->
+ 
+     <Contributor></Contributor>
+ <!--   Definition:  An entity responsible for making contributions to the -->
+ <!--                content of the resource. -->
+ <!--   Comment:     Examples of a Contributor include a person, an 
organisation, -->
+ <!--                or a service. -->
+ <!--                Typically, the name of a Contributor should be used to -->
+ <!--                indicate the entity. -->
+ 
+     <Date></Date>
+ <!--   Definition:  A date associated with an event in the life cycle of the 
-->
+ <!--                resource. -->
+ <!--   Comment:     Typically, Date will be associated with the creation or 
-->
+ <!--                availability of the resource.  Recommended best practice 
-->
+ <!--                for encoding the date value is defined in a profile of -->
+ <!--                ISO 8601 [W3CDTF] and follows the YYYY-MM-DD format. -->
+ 
+     <Type></Type>
+ <!--   Definition:  The nature or genre of the content of the resource. -->
+ <!--   Comment:     Type includes terms describing general categories, 
functions, -->
+ <!--                genres, or aggregation levels for content. Recommended 
best -->
+ <!--                practice is to select a value from a controlled 
vocabulary -->
+ <!--                (for example, the working draft list of Dublin Core Types 
 -->
+ <!--                [DCT1]). To describe the physical or digital 
manifestation -->
+ <!--                of the resource, use the FORMAT element. -->
+ 
+     <Format></Format>
+ <!--   Definition:  The physical or digital manifestation of the resource. -->
+ <!--   Comment:     Typically, Format may include the media-type or 
dimensions of -->
+ <!--                the resource. Format may be used to determine the 
software,  -->
+ <!--                hardware or other equipment needed to display or operate 
the  -->
+ <!--                resource. Examples of dimensions include size and 
duration. -->
+ <!--                Recommended best practice is to select a value from a -->
+ <!--                controlled vocabulary (for example, the list of Internet 
Media -->
+ <!--                Types [MIME] defining computer media formats). -->
+ 
+     <Identifier></Identifier>
+ <!--   Definition:  An unambiguous reference to the resource within a given 
context. -->
+ <!--   Comment:     Recommended best practice is to identify the resource by 
means -->
+ <!--                of a string or number conforming to a formal 
identification -->
+ <!--                system.  -->
+ <!--                Example formal identification systems include the Uniform 
-->
+ <!--                Resource Identifier (URI) (including the Uniform Resource 
-->
+ <!--                Locator (URL)), the Digital Object Identifier (DOI) and 
the -->
+ <!--                International Standard Book Number (ISBN). -->
+ 
+     <Source></Source>
+ <!--   Definition:  A Reference to a resource from which the present resource 
-->
+ <!--                is derived. -->
+ <!--   Comment:     The present resource may be derived from the Source 
resource -->
+ <!--                in whole or in part.  Recommended best practice is to 
reference  -->
+ <!--                the resource by means of a string or number conforming to 
a  -->
+ <!--                formal identification system. -->
+ 
+     <Language></Language>
+ <!--   Definition:  A language of the intellectual content of the resource. 
-->
+ <!--   Comment:     Recommended best practice for the values of the Language 
-->
+ <!--                element is defined by RFC 1766 [RFC1766] which includes 
-->
+ <!--                a two-letter Language Code (taken from the ISO 639 -->
+ <!--                standard [ISO639]), followed optionally, by a two-letter 
-->
+ <!--                Country Code (taken from the ISO 3166 standard 
[ISO3166]).  -->
+ <!--                For example, 'en' for English, 'fr' for French, or -->
+ <!--                'en-uk' for English used in the United Kingdom. -->
+ 
+     <Relation></Relation>
+ <!--   Definition:  A reference to a related resource. -->
+ <!--   Comment:     Recommended best practice is to reference the resource by 
means -->
+ <!--                of a string or number conforming to a formal 
identification -->
+ <!--                system. -->
+ 
+     <Coverage></Coverage>
+ <!--   Definition:  The extent or scope of the content of the resource. -->
+ <!--   Comment:     Coverage will typically include spatial location (a place 
name -->
+ <!--                or geographic coordinates), temporal period (a period 
label, -->
+ <!--                date, or date range) or jurisdiction (such as a named -->
+ <!--                administrative entity). -->
+ <!--                Recommended best practice is to select a value from a -->
+ <!--                controlled vocabulary (for example, the Thesaurus of 
Geographic -->
+ <!--                Names [TGN]) and that, where appropriate, named places or 
time -->
+ <!--                periods be used in preference to numeric identifiers such 
as -->
+ <!--                sets of coordinates or date ranges. -->
+ 
+     <Rights></Rights>
+ <!--   Definition: Information about rights held in and over the resource. -->
+ <!--   Comment:    Typically, a Rights element will contain a rights -->
+ <!--               management statement for the resource, or reference -->
+ <!--               a service providing such information. Rights information 
-->
+ <!--               often encompasses Intellectual Property Rights (IPR), -->
+ <!--               Copyright, and various Property Rights. -->
+ <!--               If the Rights element is absent, no assumptions can 
be]]><![CDATA[ made -->
+ <!--               about the status of these and other rights with respect to 
-->
+ <!--               the resource. -->
+ 
+   </dc:metadata>
+ </metadata>
+           
+         ]]></source>
+       </section>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaBitfluxEditor , version: 1 
on Mon Jun 23 15:34:21 2003 by GregorRothfuss

New page created:
+               <section><title>How to make a document editable with Bitflux 
Editor</title>
+                       <p>The following files are needed by bitflux. They are 
loaded when bitflux starts up.</p>
+                       <ul>
+                               <li>XML: data</li>
+                               <li>XSLT: presentation</li>
+                               <li>XSD: schema</li>
+                               <li>CSS: presentation</li>
+                       </ul>
+                       <anchor id="one"/>
+                       <section><title>1. Adapting the sitemap 
(bitflux.xmap)</title>
+                               <p>First thing is to add matchers for all files 
that are loaded by Bitflux to the corresponding sitemap (e.g. bitflux.xmap).</p>
+                               <source><![CDATA[
+ <!-- Frontpage: Webperls -->
+ <map:pipeline>
+       <!-- This is the xml that will be edited with bitflux -->
+         <map:match pattern="webperls.xml">
+                 <map:generate src="content/authoring/frontpage/webperls.xml"/>
+                 <map:serialize type="xml"/>
+         </map:match>
+         <map:match pattern="stylesheets/webperls.xsl">
+                 <map:generate src="cocoon://unipublic/authoring/index.xhtml"/>
+                 <map:transform 
src="xslt/front//authoring/webperls-bitflux.xsl"/>
+                 <map:serialize type="xml"/>
+         </map:match>
+         <map:match pattern="schemas/webperls.xsd">
+                 <map:read src="config/doctypes/schemas/webperls-bitflux.xsd" 
mime-type="text/xml"/>
+         </map:match>
+         <map:match pattern="css/webperls.css">
+                 <map:read src="resources/css/front-bitflux.css" 
mime-type="text/css"/>
+         </map:match>
+ </map:pipeline>
+  ]]></source>
+                               <p>You also have to add a section to 
bitflux.xmap that matches the post request that is sent to the server by 
bitflux for saving the document. It basically indicates where the xml file is 
saved.</p>
+                               <source><![CDATA[
+ <!-- Post -->
+ <map:pipeline>
+       <!-- Save Frontpage -->
+ <map:match pattern="save/*">
+       <map:act type="xopushandler">
+               <!-- Location where the xml file that is sent by bitflux has to 
be saved -->
+               <map:parameter name="save-filename" value="frontpage/{1}"/>
+               <!-- The server will tell the editor that the file was saved 
successfully. 
+                       The editor has to do the redirection. 
+                      This xml is sent to bitflux after saving -->
+               <map:generate src="../../content/bitflux/response.xml"/>
+               <map:serialize type="xml"/>
+       </map:act>
+       <map:generate src="../../content/xopus/error.xml"/>
+       <map:serialize type="xml"/>
+ </map:match>
+ <!-- Error handling -->
+ <map:handle-errors>
+       <map:transform src="context://stylesheets/system/error2html.xsl"/>
+       <map:serialize status-code="500"/>
+ </map:handle-errors>
+ </map:pipeline>
+ <!-- /POST -->
+ ]]></source>
+                       </section>
+                       <anchor id="two"/>
+                       <section><title>2. Creating the XSLT</title>
+                               <p>The XSLT that is used by bitflux needs to be 
in a certain form in order to specify what can be edited through bitflux. So 
you have to provide a bitflux-specific XSLT. The easiest way to achieve this is 
to build the XSLT dynamically.    </p>
+                               <source><![CDATA[
+ <map:match pattern="stylesheets/webperls.xsl">
+       <map:generate src="cocoon://unipublic/authoring/index.xhtml"/>
+       <map:transform src="xslt/front//authoring/webperls-bitflux.xsl"/>
+       <map:serialize type="xml"/>
+ </map:match>
+ ]]></source>
+                               <p>The generator get the xhtml of the entire 
page through the cocoon protocol.</p>
+                               <p>The transform stylesheet converts the xhtml 
to a stylesheet (i.e. adds the xsl:stylesheet element etc.) and replaces the 
sections that should be editable with the bitflux specific code:</p>
+                               <source><![CDATA[
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+                               xmlns:xslout="Can be anything, doesn't matter">
+ <xsl:output type="xml"/>
+ <xsl:namespace-alias stylesheet-prefix="xslout" result-prefix="xsl"/>
+ 
+ <!-- Copies everything else to the result tree  -->
+ <xsl:template match="@* | node()">
+   <xsl:copy>
+     <xsl:apply-templates select="@* | node()"/>
+   </xsl:copy>
+ </xsl:template>
+ 
+ <!-- Replaces the html code of the editable section by the bitflux specific 
code -->
+ <xsl:template match="[EMAIL PROTECTED]'true']">
+       <webperls contentEditable="true">
+                 <xslout:for-each select="webperls">
+                       <xslout:apply-templates/>
+                 </xslout:for-each>
+       </webperls>
+ </xsl:template>
+ 
+ <!-- Adds the stylesheet specific elements -->
+ <xsl:template match="/">
+   <xslout:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">
+     <xslout:output type="xml"/>
+     <xslout:template match="/">
+       <xsl:apply-templates/>
+     </xslout:template>
+ 
+       <!-- Template used by Bitfluxeditor to make things editable -->
+         <xslout:template match="*">
+                 <xslout:copy>
+                         <xslout:for-each select="@*">
+                                 <xslout:copy/>
+                         </xslout:for-each>
+                         <xslout:apply-templates select="node()"/>
+                 </xslout:copy>
+         </xslout:template>
+ 
+   </xslout:stylesheet>
+ </xsl:template>
+ </xsl:stylesheet>
+ ]]></source>
+                               <p>In order to indicate what part should be 
editable you can add an attribute to the respective xhtml element (in this 
example: bxe-editable="true"). The above stylesheet then replaces this element 
with the xml element that can be edited at that position.</p>
+                               <p>The attribute "bxe-editable" has to be added 
in the XSLT that renders the page. This could look something like that:</p>
+                               <source><![CDATA[
+ <xsl:template match="webperls">
+       <table border="0" cellpadding="2" cellspacing="0" bgcolor="#CCCCFF">
+               <span bxe-editable="webperlen">
+               <snip>Here goes the xslt/xhtml code that displays this part of 
the page.</snip>
+               </span>
+       </table>
+ </xsl:template>
+ ]]></source>
+                       </section>
+                       <anchor id="three"/>
+                       <section><title>3. Creating the XSD</title>
+                               <p>The XSD is bitflux-specific and quite simple 
(e.g. minOccurs and maxOccurs are not supported). It tells the editor where 
which elements can be inserted and deleted. Have a look at the examples! A 
simple element definition could look like this:</p>
+                               <source><![CDATA[
+ <xs:element name="title" type="xs:string">
+       <xs:annotation>
+               <xs:documentation xml:lang="en">Title</xs:documentation>
+               <xs:appinfo>
+                       <bxe:name>Title</bxe:name>
+                       <bxe:noaddparas>1</bxe:noaddparas>
+                       <bxe:requiredattributes>href</bxe:requiredattributes>
+                       <!-- The CDATA-code is inserted when the users presses 
the "return" key -->
+                       <bxe:returnelement><![CDATA[<Byline>Byline</Byline>] 
]></bxe:returnelement> 
+               </xs:appinfo>
+       </xs:annotation>
+ </xs:element>
+ ]]></source>
+                               <p>A complex element definiton could look like 
this:</p>
+                               <source><![CDATA[
+ <xs:element name="webperl">
+       <xs:annotation>
+               <xs:documentation xml:lang="en">Webperl</xs:documentation>
+               <xs:appinfo>
+                       <bxe:name>Webperl</bxe:name>
+                       <bxe:returnelement>none</bxe:returnelement>
+                       <!-- This element can be inserted after the element 
"webperl" -->
+                       <bxe:insertafter>
+                               <bxe:element>webperl</bxe:element>
+                       </bxe:insertafter>
+                       <!-- The CDATA-code is inserted as well when this 
element is added -->
+                       <bxe:addalso>
+                               <![CDATA[<title 
href="http://www.unizh.ch";>Title</title>] ]>
+                       </bxe:addalso>
+               </xs:appinfo>
+       </xs:annotation>
+       <xs:complexType>
+               <xs:choice minOccurs="0" maxOccurs="unbounded">
+                       <xs:element ref="title"/>
+                       <xs:element ref="byline"/>
+               </xs:choice>
+       </xs:complexType>
+ </xs:element>
+ ]]></source>
+                               <p>The xml that is represented by the sample 
xsd above look like this:</p>
+                               <source><![CDATA[
+ <webperls>
+       <webperl>
+               <title>Some Title</title>
+               <byline>Some Byline</byline>
+       </webperl>
+       <webperl>
+               <title>Some Title</title>
+               <byline>Some Byline</byline>
+       </webperl>
+ </webperls>
+ ]]></source>
+                               <p>Because neither the bitflux-xsd nor the css 
is "context-sensitive" (head/title, document/title, block/title are treated all 
the same) it is strongly recommended to use unique element names (e.g. 
"headline", "title", "subtitle", "block_title"). It is also advisable to use 
only lower-case element names due to a strange behavior of Mozilla with respect 
to cases.</p>
+                       </section>
+                       <anchor id="four"/>
+                       <section><title>4. Creating the CSS</title>
+                               <p>In the CSS you define how the xml elements 
that are editable are displayed in the editor: You assign a style to every xml 
element. That's because it is the xml itself that is displayed and edited in 
the browser (and not html), and the styles define the look of the element.</p>
+                               <source><![CDATA[
+ title, byline {
+       font-size: 11px;
+       font-family: Geneva, Verdana, Helvetica, Arial, Swiss; 
+ }
+ title, byline {
+       display: block;
+       margin: 1.33em 0;
+ }
+ ]]></source>
+                       </section>
+                       <anchor id="five"/>
+                       <section><title>5. Adding an entry to the menu</title>
+                               <p>Now you only have to add an entry to the 
menu bar an you are done! This is done in the corresponding xsp file that 
generates the menu of the page: e.g. 
src/webapp/lenya/pubs/unipublic/config/menus/front.xsp</p>
+                               <source><![CDATA[
+ <item>
+         <xsp:attribute name="href">
+                 <xsp:expr>
+                 
"/lenya/bitflux/in]]><![CDATA[dex.html?url-xml="+bitflux_prefix+"/webperls.xml
+                 &amp;url-xslt="+bitflux_prefix+"/stylesheets/webperls.xsl
+                 &amp;url-xsd="+bitflux_prefix+"/schemas/webperls.xsd
+                 &amp;url-css="+bitflux_prefix+"/css/webperls.css
+                 &amp;url-post="+bitflux_prefix+"/save/webperls.xml
+                 
&amp;url-back="+xsp_lenya_context_prefix+"/authoring/index.html"
+                 </xsp:expr>
+         </xsp:attribute>
+         Edit&#160;Webperls
+ </item>
+ ]]></source>
+                               <p>The "url-back" parameter indicates the URL 
that is loaded after the user leaves the bitflux editor (by pressing "save and 
exit").</p>
+                       </section>
+               </section>
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ Bitflux Editor has been developed originally by Christian Stocker and Roger 
Fischer
+ from <link href="http://www.bitflux.ch";>Bitflux GmbH</link>.
+ The project is hosted at <link 
href="http://www.bitfluxeditor.org";>http://www.bitfluxeditor.org</link>.
+ </p>
+               </section>
+               <section><title>Download via CVS</title>
+                       <p>Bitflux Editor is included in the Lenya cvs. So you 
don't need to download it separately. If you want to be sure to use the latest 
version, you can get it from the Bitflux cvs:</p>
+                       <source><![CDATA[
+ cvs -d :pserver:[EMAIL PROTECTED]:/var/lib/cvs/editor login
+ Return
+ cvs -d :pserver:[EMAIL PROTECTED]:/var/lib/cvs/editor co example
+     ]]></source>
+               </section>
+               <section><title>Browser Requirements</title>
+                       <section><title>Mozilla</title>
+                               <p>
+ You need at least Mozilla 1.0. If your Build ID is too old, then hope still 
exist
+ by editing the javascript bxe/js/bitfluxeditor.js (navigator.productSub &lt;= 
20020523, BX_mozilla_version).
+ </p>
+                       </section>
+               </section>
+               <section><title>Open/Edit and Save</title>
+                       <section><title>Getting Data from Server</title>
+                               <source><![CDATA[
+ http://hostname:port/lenya/bitflux/index.html
+ ?url-xml=/lenya/unipublic/bitflux/magazin/gesundheit/2002/0508
+ &url-xslt=/lenya/unipublic/bitflux/stylesheets/article.xsl
+ &url-xsd=/lenya/unipublic/bitflux/doctypes/schemas/article.xsd
+ &url-css=/lenya/unipublic/bitflux/css/article.css     
+ &url-post=/lenya/unipublic/bitflux/save/magazin/gesundheit/2002/0508
+         ]]></source>
+                               <p>
+ The parameters can be configured within the file inc/config.xml
+ </p>
+                               <source><![CDATA[
+ <imput>
+ <file name="BX_xmlfile" method="http" isParam="true">url-xml</file>
+ <file name="BX_xslfile" isParam="true">url-xslt</file>
+ <file name="BX_schemafile" isParam="true">url-xsd</file>
+ </input>
+ 
+ <css><file isParam="true">url-css</file></css>
+ 
+ <output><file name="BX_posturl" method="lenya" 
isParam="true">url-post</file></output>
+         ]]></source>
+                               <p>
+ Beware that the MIME-TYPE for the schema file (xsd) is set properly by the 
server to text/xml.
+ Lenya does that for you already, but in case you serve it via Apache you have 
to update Apache's config.
+ </p>
+                       </section>
+                       <section><title>Posting Data to Server</title>
+                               <p>
+ To save the document the BitfluxAction is used. It is nearly the same as the
+ XopusAction. The only difference is that the filename for saving is passed to
+ the action as parameter. Although you could actually set the filename within
+ the javascript bxe/js/lenya.js (BX_DocumentID) and then use the XopusAction.
+ </p>
+                       </section>
+               </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaFilesystemPublisher , 
version: 1 on Mon Jun 23 15:36:41 2003 by GregorRothfuss

New page created:
+ Filesystem Publisher</title> 
+ 
+               <section><title>Introduction</title> 
+               <p>
+               You can use this publisher when you run everything on one
+               machine. Everything means the administrator's view, the 
editor's view
+               and the reader's view. In a more "productive" environment it is 
recommended
+               to run the administrator's and editor's view on one machine 
(intranet) and
+               the reader's view on another machine (DMZ). In this case you 
have to use a
+               more advanced publisher, which is able to replicate the data by 
scp, rysnc (ssh)
+               or for instance http-upload.
+               </p>
+               </section>
+ 
+               <section><title>Customizing the Menu</title>
+               <p>
+               Normally the "Menus" can be found at config/menus
+               </p>
+               </section>
+               <section><title>Sitemap</title> 
+               <ol>
+                       <li>reference to the action:
+               <code><![CDATA[
+               
+ <map:actions>
+   <map:action name="publisher" 
src="org.apache.lenya.cms.cocoon.acting.PublisherAction">
+     <authoring href="content/authoring/"/>
+     <live href="content/live/"/>
+     <tree-authoring href="content/authoring/tree.xml"/>
+     <tree-live href="content/live/tree.xml"/>
+   </map:action>
+ </map:actions>
+               
+               ]]></code>
+                       </li> 
+                       <li>"Publish-Screen": generation of a publish-screen 
with a servepage, docs/lenya/publish/publish-screen.xsp and the stylesheet 
stylesheets/lenya/publish/main.xsl :
+               <code><![CDATA[
+               
+      <map:match pattern="authoring/lenya/publishScreen*">
+        <map:generate type="serverpages" 
src="../../content/publishing/publish-screen.xsp"/>
+        <map:transform src="../../xslt/publishing/main.xsl"/>
+        <map:serialize type="html"/>
+      </map:match>
+               
+               ]]></code>
+                       </li>
+                       <li>call of the publish action
+               <code><![CDATA[
+               
+      </map:match>
+      <map:match pattern="authoring/lenya/publish*">
+        <map:act type="publisher">
+          <map:redirect-to uri="{parent_uri}" session="true"/>
+        </map:act>
+        <map:redirect-to uri="publishScreen?status=failed" session="true"/>
+      </map:match>
+               
+               ]]></code>
+                       </li>
+               </ol> 
+               </section>
+    
+               <section><title>Customizing the Publish Screen</title>
+               <p>
+               Copy the generic XSLT: ../../xslt/publishing/main.xsl " 
+               into the publication's stylesheet directory 
"lenya/xslt/publishing/....xsl ". 
+               Don't forget to change the sitemap appropriately. 
+               </p>
+               </section>
+ 
+               <section><title>Configuration</title> 
+               <p>
+               The filesystem publisher has to know the filesystem path of the 
authoring area and
+               the live area. These two paths are set within the sitemap:
+               </p>
+               <source><![CDATA[
+               
+ <map:actions>
+   <map:action name="" src="">
+     <authoring href="content/authoring/"/>
+     <live href="content/live/"/>
+     <tree-authoring href="content/authoring/tree.xml"/>
+     <tree-live href="content/live/tree.xml"/>
+   </map:action>
+ </map:actions>
+               
+               ]]></source>
+               <p>
+               NOTE: "authoring" and "live" are required parameters, 
"tree-authoring" and "tree-live" are not required parameters.
+               </p>
+               </section>
+ 
+               <section><title>Publisher-Action</title>
+               <p>
+                       Finally the Java Class  
org.apache.lenya.cms.cocoon.acting.PublisherAction has to be extended.
+               </p>
+               </section>
+       </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaWorkingWithXML , version: 1 
on Mon Jun 23 15:45:16 2003 by GregorRothfuss

New page created:
+ Working with XML Documents</title> 
+ 
+ <p>
+ The XML utility classes are:
+ </p>
+ <source><![CDATA[
+ 
+ import org.apache.lenya.xml.DocumentHelper;
+ import org.apache.lenya.xml.NamespaceHelper;
+ 
+ ]]></source>
+ <section><title>Creating a Document</title>
+ <p>
+ Use the following code to create a document with a given
+ document element. A xmlns:svg="http://www.w3.org/2000/svg"; attribute
+ is added to the document element.
+ </p>
+ <source><![CDATA[
+ 
+ Document document = DocumentHelper.createDocument(
+     "http://www.w3.org/2000/svg";,
+     "svg:svg",
+     null);     // no document type
+ 
+ ]]></source>
+ </section>
+ 
+ 
+ <section><title>Reading a document from a file</title>
+ <source><![CDATA[
+ 
+ File file = ...;
+ Document document = DocumentHelper.readDocument(file);
+ 
+ ]]></source>
+ </section>
+ 
+ <section><title>Writing a document from a file</title>
+ <p>
+ Use the following code to write a document to a
+ file. The INDENT output property of the transformer is
+ set to "yes".
+ </p>
+ <source><![CDATA[
+ 
+ Document document = ...;
+ File file = ...;
+ DocumentHelper.writeDocument(document, file);
+ 
+ ]]></source>
+ </section>
+ 
+ </section>
+ 
+ <section><title>Working with Namespaces</title>
+ 
+ <section><title>Creating a NamespaceHelper</title>
+ <p>
+ Create a namespace helper with a new document:
+ </p>
+ <source><![CDATA[
+ 
+ NamespaceHelper helper = new NamespaceHelper(
+     "http://www.w3.org/2000/svg";,    // namespace URI
+     "svg",                           // prefix
+     "svg");                          // local name of document element
+ 
+ ]]></source>
+ 
+ <p>
+ Create a namespace helper for an existing document:
+ </p>
+ <source><![CDATA[
+ 
+ Document document = ...;
+ NamespaceHelper helper = new NamespaceHelper(
+     "http://www.w3.org/2000/svg";,    // namespace URI
+     "svg",                           // prefix
+     document);                       // document
+ 
+ ]]></source>
+ </section>
+ 
+ <section><title>Creating Elements</title>
+ 
+ <p>
+ Create an empty element:
+ </p>
+ <source><![CDATA[
+ 
+ // create <svg:ellipse> element
+ Element element = helper.createElement("ellipse");
+ 
+ ]]></source>
+ <p>
+ Create an element containing a text node:
+ </p>
+ <source><![CDATA[
+ 
+ // create <svg:text>Hello World!</svg:text> element
+ Element element = helper.createElement("text", "Hello World!");
+ 
+ ]]></source>
+ </section>
+ 
+ </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaAuthorization , version: 1 
on Mon Jun 23 15:29:51 2003 by GregorRothfuss

New page created:
+ <title>Authorization and Authentication</title> 
+    <section>
+ <title>Introduction</title> 
+     <p>
+ You can use this publisher when you run everything on one
+ machine. Everything means the administrator's view, the editor's view
+ and the reader's view. In a more "productive" environment it is recommended
+ to run the administrator's and editor's view on one machine (intranet) and
+ the reader's view on another machine (DMZ). In this case you have to use a
+ more advanced publisher, which is able to replicate the data by scp, rysnc 
(ssh)
+ or for instance http-upload.
+     </p>
+    </section>
+ 
+    <section><title>Configuration</title> 
+      <p>
+ The filesystem publisher has to know the filesystem path of the authoring 
area and
+ the live area. These two paths are set within the sitemap:
+      </p>
+      <source><![CDATA[
+ 
+ <map:actions>
+   <map:action name="" src="">
+     <authoring href="content/authoring/"/>
+     <live href="content/live/"/>
+     <tree-authoring href="content/authoring/tree.xml"/>
+     <tree-live href="content/live/tree.xml"/>
+   </map:action>
+ </map:actions>
+ 
+      ]]></source>
+    <p>
+ NOTE: "authoring" and "live" are required parameters, "tree-authoring" and 
"tree-live" are not required parameters.
+    </p>
+    </section>
+ 
+    <section><title>Required Files</title> 
+ <ol>
+   <li>lenya/content/publish-screen.xsp</li>
+   <li>lenya/xslt/Publish/main.xsl</li>
+ </ol>
+    </section>
+ 
+ 
+    </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaHTMLFormEditor , version: 1 
on Mon Jun 23 15:37:34 2003 by GregorRothfuss

New page created:
+ Lenya's HTML Form Editor</title>
+ 
+     <p>The Lenya HTML Form Editor allows to edit the content of XML files
+     within the Web browser. It's only assumption is, that the browser
+     understands HTML forms and &lt;input&gt; and &lt;textarea&gt;
+     tags. Therefore it should be usable under any browser.</p> 
+ 
+     <p>The type of editor field to be used, as well as any options concerning
+     the width and heigth, are declared in a descriptor file, accompanying the
+     XML file to be edited. This descriptior file allows to declare the minimum
+     and maximum number of XML-tags of the same name within the hierarchy.
+     </p>
+ 
+ 
+ 
+ <section><title>Example</title>
+     <p>For example we have a "member" document "elvis.xml" of the form</p>
+ <source><![CDATA[
+ 
+ <?xml version="1.0" encoding="iso-8859-1"?>
+ <member> 
+   <person>
+     <name>Presley</name>
+     <prename>Elvis</prename>
+     <birthday>
+       <year></year>
+       <month></month>
+       <day></day>
+     </birthday>
+   </person>
+   <curriculum>Breaking hearts, is often lonely and looks for 
love.</curriculum>
+   <contact>
+     <address>
+       <street>Heartbreak Hotel</street>
+       <town>Graceland</town>
+     </address>
+     <emails>
+       <email>[EMAIL PROTECTED]</email>
+       <email>[EMAIL PROTECTED]</email>
+       <email>[EMAIL PROTECTED]</email>
+     </emails>
+   </contact>
+ </member>
+ 
+ ]]></source>
+ 
+     <p>The corresponding <strong>edit descriptor</strong> has the form</p>
+ 
+ <source><![CDATA[
+ 
+ <?xml version="1.0" encoding="iso-8859-1"?>
+ <member> 
+   <person>
+     <name editType="form" size="30"  name="Name"/>
+     <prename editType="form" size="30" maxOccurs="5" name="Prename"/>
+     <birthday>
+       <year editType="form"/>
+       <month editType="form"/>
+       <day editType="form"/>
+     </birthday>
+   </person>
+   <curriculum editType="text" width="50" height="7">
+   <contact>
+     <address>
+       <street editType="form"/>
+       <town editType="form"/>
+     </address>
+     <emails >
+       <email editType="form" minOccurs="0" maxOccurs="unbounded"/>
+     </emails>
+   </contact>
+ </member>
+ 
+ ]]></source>
+     <p>Comparing both files, we see that the edit descriptor is simply the
+     "member" XML file with empty tags. The attributes declare how to XML-tags
+     are to be edited, namely:</p>
+ 
+     <table>
+       <tr>
+         <th>attribute</th>
+         <th>possible values</th>
+         <th>notes</th>
+       </tr>
+       <tr>        
+         <td>editType</td>
+         <td>"text", "form", "show"</td>
+         <td>default: nothing is shown</td>
+       </tr>
+       <tr>        
+         <td>minOccurs</td>
+         <td>"0","1","2","3",...</td>
+         <td>default if not given: 1</td>
+       </tr>
+       <tr>        
+         <td>maxOccurs</td>
+         <td>"1","2","3",..., "unbounded"</td>
+         <td>default if not given: 1</td>
+       </tr>
+       <tr>        
+         <td>name</td>
+         <td>"any name you like"</td>
+         <td>will be displayed instead of tag name</td>
+       </tr>
+     </table>
+ 
+     <p>All other attributes are provided unchanged to the input field. One
+     could say, that the edit-descriptor is some sort of XML-Schema or DTD. It
+     should be straightforward to use a XML-Schema for the same purpose, if
+     the appropriate editing keywords are added. </p>
+     
+ </section>
+ 
+ 
+ 
+ <section><title>Inserting XHTML content</title>
+     <p>Some input fields, namely those of type="text", allow the user to 
embed XHTML tags in their
+     content, allowing them to influence the representation of the text 
somewhat, and to provide
+     links to the page, in a relatively free style.</p>
+     <p>This feature creates also the possibility of the user writing 
incorrect (non-XML) content, and
+     thus endangering the stability of the application. To guard against this 
danger, the content of all
+     input fields is checked for well-formedness, and an error message is 
displayed if there is 
+     incorrect markup embedded, while the content is not allowed to be 
saved.</p>
+     <p>The check for well-formedness is executed from whithin 
EditorMainAction.java, before the file gets 
+     saved, and checks the whole xml content of the file to be saved. This is 
probably overkill, and in 
+     a future iteration of the development, could be reduced to check only the 
fields that allow 
+     XHTML content. This could be done by ways of providing a method for 
checking the xml in a utility class,
+     and calling it only when it is needed.</p>
+     <p>Also, the check for well-formedness is implemented by means of the 
Cocoon API, and uses the parser
+     that is defined as the parser for Cocoon, which makes it easy to change 
it (in the cocoon.xconf). However,
+     the Cocoon API does not provide means to get very specific messages as to 
what the error is, and where it 
+     is located in the source document, as it throws a 
org.xml.sax.SAXException, instead of a 
+     org.xml.sax.SAXParseException, which would provide more information. This 
might change in the future,
+     but until then, only a generic error message can be displayed to the 
user, which is, at the moment, hardcoded
+     in the stylesheet body.xsl, and is displayed on top of the edit page. 
This problem could be somewhat
+     defused by parsing element-wise, as decribed in the previous paragraph, 
and providing the error message
+     located together with the element causing the problem.</p>
+ </section>
+ 
+ 
+ 
+ <section><title>How it works</title>
+   <p>  The editor relies on a series of pipes and actions defined in the
+    <code>html-form-editor.xmap</code> sitemap.</p>
+ </section>
+ <section><title>Required Files</title>
+ <ol>
+   <li>Open Document
+     <ol>
+       <li>stylesheets/lenya/edit/htmlform/numberTags.xsl (Sitemap)</li>
+       <li>stylesheets/lenya/edit/htmlform/makeEditML.xsl (Sitemap)</li>
+       <li>stylesheets/lenya/edit/htmlform/performRequest.xsl (EditorAction 
and Sitemap)</li>
+       <li>stylesheets/lenya/edit/htmlform/translateRequest.xsl (EditorAction 
and Sitemap)</li>
+       
<li>stylesheets/lenya/edit/editdescriptor/"RootElementName"-descriptor.xml 
(EditorAction and XSLT)</li>
+       <li>stylesheets/lenya/Edit/root.xsl (xsl:include)</li>
+       <li>stylesheets/lenya/Edit/body.xsl (xsl:include)</li>
+       <li>xslt/"DoctypeName"/Edit/main.xsl (Sitemap)</li>
+     </ol>
+   </li>
+   <li>Edit Document
+     <ol>
+       <li/>
+     </ol>
+   </li>
+   <li>Save Document
+     <ol>
+       <li/>
+     </ol>
+   </li>
+ </ol>
+ </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaArchitecture , version: 1 on 
Mon Jun 23 15:30:22 2003 by GregorRothfuss

New page created:
+ The Big Picture</title>
+ <section><title>Overview</title>
+ <p>
+ The roles of each component (Cocoon, Slide, Lenya) are described below the 
overview.
+ </p>
+ 
+ <p>
+ NOTE: Slide is not used so far, but is intended to be used.
+ </p>
+         <source><![CDATA[
+           
+ 
+ 
+ +-----------------------------------------+
+ |            CLIENT                       |
+ |       (HTTP, WebDAV, Other)             |
+ +-----------------------------------------+
+      /|\                   /|\
+       |                     |
+      \|/                    |
+ +---------+---+             |
+ | COCOON  |   |             |
+ |   +-----+   |             |
+ |   |  LENYA  |             |
+ +---+---------+             |
+  /|\     /|\                |
+   |       |                 |
+   |      \|/               \|/
+   |   +-----------------+--------------+----+
+   |   |  SLIDE          |WebDAV Servlet|    |
+   |   |  (CM API)       +--------------+    |
+   |   +-------------------------------------+
+   |                    /|\
+   |                     |
+  \|/                   \|/
+ +-------------------------------------------+
+ |            DATA STORES                    |
+ |                                           |
+ |  +----------+  +----+  +------+  +-----+  |
+ |  |Filesystem|  |JDBC|  |XML:DB|  |Other|  |
+ |  +----------+  +----+  +------+  +-----+  |
+ +-------------------------------------------+
+ 
+ 
+         
+         ]]></source>
+ </section>
+ 
+ <section><title>What is the role of Cocoon</title>
+ <p>
+ At the moment Cocoon is used as XML Publishing Framework. Cocoon's "pipeline 
processor"
+ controls the interaction between XML and XSLT and provides a mechanismn to 
map requests to pipelines.
+ More information can be found at the Cocoon <link 
href="http://xml.apache.org/cocoon/";>website</link>.
+ </p>
+ </section>
+ 
+ <section><title>What is the role of Slide</title>
+ <p>
+ Slide provides a Content Management Framework based on a Java API, which
+ is similar to <link href="http://www.jcp.org/jsr/detail/170.jsp";>JSR 
170</link>.
+ It can be used as a Data Abstraction Layer accessing various types of content 
repositories.
+ Slide has implemented a WebDAV servlet which iteracts with Slide's CM API.
+ More information can be found at the Slide <link 
href="http://jakarta.apache.org/slide/";>website</link>.
+ </p>
+ </section>
+ 
+ <section><title>What is the role of Lenya</title>
+ <p>
+ Lenya had it's own "Pipeline and XInclude Processor" when it was started in 
autumn 1999.
+ In the meantime Cocoon and Slide have emerged and developed into powerful 
frameworks.
+ Lenya started to integrate Cocoon's pipeline processor at the end of 2001.
+ In order to base Lenya on a generic Content Management API we are currently 
discussing
+ how to integrate Slide.
+ Beside the features of Cocoon and Slide,
+ there are still many features needed to provide a usable Content Management 
System.
+ Lenya is providing the following additional features:
+ </p>
+ <ol>
+ <li>Authoring/Staging user interfaces for authors and editors</li>
+ <li>Administrator interface (User/Group/Policies management, Monitoring, 
etc.)</li>
+ <li>Resource/Content Creator implementations</li>
+ <li>Editor interfaces for not WebDAV enabled editors such Xopus and 
Bitflux</li>
+ <li>Rudimentary HTML Form Editor as fallback</li>
+ <li>Scheduler</li>
+ <li>Workflow Manager</li>
+ <li>Framework for Publications</li>
+ <li>Dependency Manager</li>
+ <li>Notifier/Dispatcher/Subscriber pattern (Event Monitoring, JMS!)</li>
+ <li>Publisher/Replicator</li>
+ <li>Access Controlling (Lenya and Cocoon and Slide have each it's own Access 
Controller!)</li>
+ <li>etc.</li>
+ </ol>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaFileUpload , version: 1 on 
Mon Jun 23 15:35:44 2003 by GregorRothfuss

New page created:
+     <section><title>File Upload</title>
+       <section><title>What is it?</title>
+       <p>The file upload in lenya allows the user to upload arbitrary
+         files to the web server. It is implemented as a cocoon
+         action.</p>
+       </section>
+     <section><title>How does it work</title>
+       <p>The basic idea of how it works is as follows:</p>
+       <ol>
+       <li>You have a link in your existing document which invokes
+       the upload form and passes it the xpath of itself.</li>
+       <li>Once you're in the upload form you enter the file name of
+       the file that you want to upload along with some additional
+       (dublin core) information such as description, keywords,
+       title, creator, etc. </li>
+       <li>The submit button of the form then does a post which is
+       handled in a cocoon action.
+         <ol>
+           <li>The action copies the file into an appropriate
+           directory,</li>
+           <li>creates a meta xml file that contains all the dublin
+           core metae information for the uploaded file</li>
+           <li>and inserts a &lt;media&gt; element at the xpath where the
+           originating link was in the requesting document.</li> 
+         </ol>
+       </li>
+       <li>After the action the sitemap does a redirect to the
+       original document where the image is now inserted (with
+       appropriate caption, alt tag, etc.).</li> 
+       </ol>
+     </section>
+     <section><title>How to use it in my publication?</title>
+       <p>In order to use the file upload action for your own
+       publication you have to do the following:</p>
+       <ol>
+       <li>Add an action and a matcher to your sitemap</li> 
+       <li>Create a form that generates a post request. For that it
+       recomended that you use and possibly adapt
+       <code>upload-image.xsl</code> and
+       <code>upload-image.xsp</code></li>
+       </ol>
+       <section><title>Sitemap</title>
+       <p>You need to configure the action in your sitemap and you
+       need to add a pipeline which invokes the action.</p>
+ 
+       <section><title>actions</title>
+         <source><![CDATA[
+           
+ <map:actions>
+ 
+ [...]
+   <map:action logger="action.upload" name="file-upload"
+     src="org.apache.lenya.cms.cocoon.acting.ArticleImageUploadCreatorAction">
+     <images-dir href="resources/images" />
+     <meta-dir href="docs/metaDir" />
+     <insert-image-before value="false" />
+   </map:action>
+ </map:actions>
+ 
+         ]]></source>
+       </section>
+       <section><title>pipeline</title>
+         <source><![CDATA[
+           
+ <map:match pattern="upload">
+   <map:act type="file-upload">
+     <!-- if the action suceeds it returns the referer and we
+     simply redirect to it. --> 
+     <map:redirect-to uri="{$referer}"/>
+   </map:act>
+   <!-- otherwise the action could not validate some of the
+   input and we present the upload form again -->
+   <map:generate type="serverpages" src="../../content/upload-image.xsp"/>
+   <map:transform src="../../xslt/upload-image.xsl"/>
+   <map:serialize type="html"/>
+ </map:match>
+ 
+         ]]></source>
+       </section>
+       </section>
+ 
+       <section><title>request form</title>
+       <p>The request is generated in the html form which is
+       generated using upload-image.xsl and upload-image.xsp. Adapt
+       those if you have different requirements. Make sure you comply
+       with the interfaces outlined below.</p>
+ 
+       <section><title>Upload form</title>
+         <p>The outline form provides the user with the ability to
+         enter a filename and additional information (according to
+         dublin core) pertaining to this file. </p>
+       </section>
+ 
+       </section>
+       <section><title>Interfaces</title>
+         <p>The file upload has two interfaces. The configuration
+         interface via the action parameters and the http post
+         parameters which are passed to the action.</p>
+       <section><title>Sitemap config parameters</title>
+         <dl>
+           <dt>images-dir</dt>
+           <dd>
+             <![CDATA[<images-dir href="resources/images" />]]>
+             store the upload images at this path (relative to the
+             publication).
+           </dd>
+           <dt>images-dir</dt>
+           <dd><![CDATA[<meta-dir href="docs/metaDir" />]]>
+ store the xml files containing the meta information
+             (dublin core) for the uploaded file at this
+             path(relative to the publication).
+           </dd>
+           <dt>insert-image-before</dt>
+           <dd><![CDATA[<insert-image-before value="false" />]]>
+ Insert the media tag before the xpath if true
+             (default). Insert after otherwise.
+             </dd>
+         </dl>
+       </section>
+ 
+       <section><title>Http Request parameters</title>
+         <p>The following http request parameters are expected from
+         the action. All parameters are of type <code>text</code>
+         except for the parameter uploadFile which is obvioulsly of
+         type <code>file</code>.</p>  
+         
+         <p>Mandatory parameters:</p>
+         <dl>
+           <dt>uploadFile</dt>
+           <dd>The file to upload.</dd>
+           <dt>xpath</dt>
+           <dd>The location at which the image is to be inserted
+           in the document that requested the image upload.</dd>
+           <dt>documentid</dt>
+           <dd>The document id of the document that requested the
+           image upload. This is used to find the xml document where
+           the media tag has to be inserted at the lopcation given by
+           the <code>xpath</code>.</dd>
+           <dt>referer</dt>
+           <dd>The url of the document that requested the image
+           upload. This is used to redirect back to it once the image
+           upload is done.</dd>
+         </dl>
+       <p>Optional parameters:</p>
+         <dl>
+           <dt>insertBefore</dt>
+           <dd>Values <code>true</code> or <code>false</code>. Defines if the 
media element is inserted before or after the given xpath. Overwrites the 
sitemap configuration parameter <code>insert-image-before</code> if 
present.</dd>
+         </dl>
+         <p>Dublin Core meta data parameters (optional): <br/>
+         All these parameters are stored
+         as meta informarion in the meta data file. See the Dublin
+         Core for an explanation of these parameters.</p> 
+         <dl>
+           <dt>title</dt>
+           <dd>Currently also used as alt tag for the image</dd>
+           <dt>creator</dt>
+           <dd>Currently also used as authorline tag for the image</dd>
+           <dt>subject</dt>
+           <dd/>
+           <dt>description</dt>
+           <dd>Currently also used as media-caption tag for the image</dd>
+           <dt>publisher</dt>
+           <dd/>
+           <dt>contributor</dt>
+           <dd/>
+           <dt>date</dt>
+           <dd/>
+           <dt>type</dt>
+           <dd/>
+           <dt>format</dt>
+           <dd/>
+           <dt>identifier</dt>
+           <dd/>
+           <dt>source</dt>
+           <dd/>
+           <dt>language</dt>
+           <dd/>
+           <dt>relation</dt>
+           <dd/>
+           <dt>coverage</dt>
+           <dd/>
+           <dt>rights</dt>
+           <dd>Currently also used as copyright tag for the image</dd>
+         </dl>
+       </section>
+       </section>
+     </section>
+     <section><title>How to customize</title>
+       <p>The easiest way to customize the file upload is probably
+       using the action parameters in the sitemap. The other more
+       powerful possibility is of course subclassing.</p> 
+       <section><title>action parameters</title>
+       <p>Use the action parameters to change where you want to store
+       the images or the meta data files.</p>
+       </section>
+       <section><title>subclassing</title>
+       <p>You might want to subclass the
+       <code>ArticleImageUploadCreatorAction</code> e.g. to add a
+       different media tag or to have the images stored in a
+       different path.</p>
+       </section>
+     </section>
+     <section><title>Limitations/Bugs</title>
+ 
+       <dl>
+       <dt>Mime Type</dt>
+         <dd>The mime type of the uploaded file is not recognized
+         properly.</dd> 
+ 
+       <dt>Validation</dt>
+       <dd>(*cough*) There is practically no validation of the
+       request parameters. This is a potential security problem.</dd>
+ 
+       <dt>lenya integration</dt>
+       <dd>Uploading an image and inserting it in a document is
+       editing this document. It should therefore be integrated with
+       the revision controler.</dd>
+ 
+       <dt>not very generic</dt>
+       <dd>The insertMediaTag method is very specific for the
+       unipublic publication. It should be made more generic.</dd>
+       </dl>
+     </section>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaOpenOffice , version: 1 on 
Mon Jun 23 15:42:01 2003 by GregorRothfuss

New page created:
+ This document describes the integration of Openoffice with Lenya
+       CMS. The integration is guided by the following goals:</p>
+ 
+       <ul>
+       <li>Use OpenOffice as a content editor for static web
+       pages</li>
+ 
+       <li>Migrate OpenOffice document to a custom xml format</li>
+       </ul>
+     </section>
+ 
+     <section>
+       <title>Prerequisites</title>
+ 
+       <p>In order to seamlessly integrate Openoffice into the
+ publication process of Lenya/Cocoon the following prerequisites need
+ to be met:</p>
+ 
+       <section>
+       <title>OpenOffice DTD</title>
+ 
+       <p>The DTDs for the OpenOffice documents has to be available
+ on the system.</p>
+ 
+       <p>It's best to get them directly from your OpenOffice
+ installation. They are located in the share directory of your
+ installation. Copy the dtd's into your Lenya installation, e.g. as
+ follows:</p>
+ 
+       <source>cp ~/Office/share/dtd/* 
~/build/jakarta-tomcat-4.1.18-LE-jdk14/webapps/lenya/lenya/resources/dtd/openoffice/</source>
+       
+       <fixme author="ce">The DTDs should probably go into
+       /usr/share/sgml/openoffice/*</fixme>
+ 
+       <note>There's a bug in the xml parser. As a workaround we uncomment
+         all the <code>draw:text-box</code> stuff.</note>
+       </section>
+ 
+       <section>
+       <title>XML Catalog</title>
+ 
+       <p>In order for Lenya/Cocoon to find the DTDs you need to setup an XML
+ catalog as follows:</p>
+ 
+       <source>
+ xmlcatalog --noout --create openoffice.cat
+ xmlcatalog --noout --add "public" \
+   "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" 
+   
"file:///home/slide/build/jakarta-tomcat-4.1.18-LE-jdk14/webapps/lenya/lenya/resources/dtd/openoffice/officedocument/1_0/office.dtd"
 \
+   openoffice.cat
+       </source>
+ 
+       <p>Alternatively you can simply use the attached catalog.</p>
+ 
+       <p>Store this newly created catalog and edit CatalogManager.properties 
to
+ make sure Cocoon finds this catalog and hence the OpenOffice DTDs.</p>
+ 
+       <p>Add the location of the OpenOffice catalog to Cocoon's
+ CatalogManager.properties (which can be found in
+ 
<code>~/build/jakarta-tomcat-4.1.18-LE-jdk14/webapps/lenya/WEB-INF/classes/CatalogManager.properties</code>)
+ by adding the following lines to this file:</p>
+ 
+       <source>
+ #catalogs=/path/to/local/catalog
+ 
catalogs=/home/slide/build/jakarta-tomcat-4.1.18-LE-jdk14/webapps/lenya/lenya/resources/dtd/openoffice/catalog.xml
+       </source>
+ 
+       </section>
+ 
+       <section>
+       <title>OpenOffice2HTML XSTL</title>
+ 
+       <p>In order to render the OpenOffice xml as html we need XSLT 
stylesheets
+ to provide the necessary transformations.</p>
+ 
+       <p>A very good XSLT which is fairly complete can be fetched
+         from zope.org (<link
+         
href="http://www.zope.org/Members/philikon/ZooDocument";>http://www.zope.org/Members/philikon/ZooDocument</link>).</p>
+ 
+       </section>
+ 
+       <section>
+       <title>Slide</title>
+ 
+       <p>Slide is an Apache project which offers amongst other things a a
+ WebDAV access module (implemented as a servlet). This will allow us to
+ deploy the OpenOffice documents directly via WebDAV.</p>
+ 
+       <p>For a very basic installation the following changes need to be 
applied
+ to a file named Domain.xml in the Slide webapp directory:</p>
+ 
+       <ul>
+         <li>Change permissions</li>
+         <li>ContentStore: set to parent dir of OpenOffice dir</li>
+         <li>Replace folder "files" by OpenOffice dir name</li>
+       </ul>
+ 
+       <p>The following patch will apply all changes you need:</p>
+       <source>
+ diff -u Domain.xml.orig Domain.xml
+ --- Domain.xml.orig   Thu Nov  1 15:47:52 2001
+ +++ Domain.xml                Thu Mar 20 16:44:09 2003
+ @@ -44,7 +44,7 @@
+            &lt;reference store="nodestore" /&gt;
+          &lt;/revisiondescriptorstore&gt;
+          &lt;contentstore 
classname="slidestore.reference.FileContentStore"&gt;
+ -          &lt;parameter name="rootpath"&gt;contentstore&lt;/parameter&gt;
+ +          &lt;parameter 
name="rootpath"&gt;/home/slide/build/jakarta-tomcat-4.1.18-LE-jdk14/webapps/lenya/lenya/pubs/computerworld/content/authoring&lt;/parameter&gt;
+            &lt;parameter name="version"&gt;false&lt;/parameter&gt;
+            &lt;parameter name="resetBeforeStarting"&gt;true&lt;/parameter&gt;
+          &lt;/contentstore&gt;
+ @@ -136,7 +136,7 @@
+        &lt;!-- Paths configuration --&gt;
+        &lt;userspath&gt;/users&lt;/userspath&gt;
+        &lt;guestpath&gt;guest&lt;/guestpath&gt;
+ -      &lt;filespath&gt;/files&lt;/filespath&gt;
+ +      &lt;filespath&gt;/openoffice&lt;/filespath&gt;
+        &lt;parameter name="dav"&gt;true&lt;/parameter&gt;
+        &lt;parameter name="standalone"&gt;true&lt;/parameter&gt;
+  
+ @@ -245,13 +245,12 @@
+            
+          &lt;/objectnode&gt;
+          
+ -        &lt;objectnode classname="org.apache.slide.structure.SubjectNode" 
+ -         uri="/files"&gt;
+ +        &lt;objectnode classname="org.apache.slide.structure.SubjectNode" 
uri="/openoffice"&gt;
+  
+            &lt;!-- ### Give read/write/manage permission to guest ### 
+                 Uncomment the following line to give permission to do
+                 all actions on /files to guest (unauthenticated users) --&gt;
+ -          &lt;!-- &lt;permission action="/actions" 
subject="/users/guest"/&gt; --&gt;
+ +          &lt;permission action="/actions" subject="/users/guest"/&gt;
+  
+            &lt;permission action="/actions/manage" subject="/users/john"/&gt;
+            &lt;permission action="/actions/write" 
subject="+/users/groupA"/&gt;
+       </source>
+       </section>
+ 
+     </section>
+ 
+     <section>
+       <title>Pipelines</title>
+ 
+       <p>In order for Lenya/Cocoon to be able to read the content of the
+ OpenOffice document, a set of pipelines need to be set up.</p>
+ 
+       <section>
+       <title>Read the zip/jar file</title>
+       
+       <p>To read the OpenOffice documents we need to setup a simple reader
+         which as follows:</p>
+       
+       <source>
+ &lt;map:match pattern="**.sxw"&gt;
+   &lt;map:read src="content/{1}.sxw"/&gt;
+ &lt;/map:match&gt;
+       </source>
+       </section>
+  
+       <section>
+       <title>Unpack zip file and transform the OO xml to xhtml</title>
+ 
+       <p>OpenOffice documents are actually a zip file containing xml files for
+ content and style plus other additional files such as jpg etc.</p>
+ 
+       <p>Zip is the same file format as jar. JDK supports jar unpacking
+ natively with the jar protocol. The pipeline to read a jar file looks
+ as follows:</p>
+ 
+       <source>
+ &lt;map:match pattern="**.oo"&gt;
+   &lt;map:generate 
src="jar:http://localhost:38080/lenya/computerworld/authoring/{1}.sxw!/content.xml"/&gt;
+   &lt;map:transform src="../../xslt/openoffice/ooo2html.xsl"/&gt;
+   &lt;map:serialize/&gt;
+ &lt;/map:match&gt;
+       </source>
+       </section>
+ 
+       <section>
+       <title>Aggregate with navigation</title>
+ 
+       <p>Additionaly we want to embed the OpenOffice document in the usual
+ navigation, header and footer. The following is fairly specific to the
+ Computerworld publication but can easily be adapted:</p>
+ 
+       <source>
+ &lt;map:match pattern="**.html"&gt;
+   &lt;map:aggregate element="lenya"&gt;
+     &lt;map:part src="cocoon:/menus/static/{1}.html"/&gt;
+     &lt;map:part element="cmsbody" src="content/authoring/wrapper.html"/&gt;
+     &lt;map:part src="cocoon:/{1}.oo" element="wrapper"/&gt;
+     &lt;map:part src="content/authoring/small-preview.xml"/&gt;
+     &lt;map:part src="content/authoring/sitetree.xml"/&gt;
+     &lt;map:part src="cocoon:/today"/&gt;
+   &lt;/map:aggregate&gt;
+ 
+   &lt;map:transform src="xslt/authoring/wrapper.xsl"&gt;
+     &lt;map:parameter name="id" value="/{1}"/&gt;
+     &lt;map:parameter name="authoring" value="true"/&gt;
+   &lt;/map:transform&gt;
+   &lt;map:transform src="xslt/authoring/images.xsl"/&gt;
+   &lt;map:serialize type="html"/&gt;
+ &lt;/map:match&gt;
+       </source>
+ 
+       </section>
+     </section>
+ 
+     <section>
+       <title>Problems</title>
+       <ul>
+       <li>Caching prevents an update OO file (zip file) from being
+       displayed.</li>
+ 
+       <li>If you restart tomcat (slide) you lose the NodeContentStore so that
+   WebDAV loses the nodes (documents and folders).</li>
+ 
+       <li>xml parser cannot handle openoffice dtd's due to a parser bug</li>
+       </ul>
+     </section>
+ 
+     <section>
+       <title>To do's</title>
+       <ul>
+       <li>Set permissions in tomcat/slide: authorization and autorisation</li>
+       <li>Complete and improve OpenOffice2Html xslt (images, tables, 
etc.)</li>
+       <li> Add pipelines for other files in zip like images</li>
+       <li> Integration slide and lenya</li>
+       </ul>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaScheduler , version: 1 on 
Mon Jun 23 15:44:24 2003 by GregorRothfuss

New page created:
+ The Scheduler</title> 
+       
+       <section><title>What is the Scheduler good for?</title> 
+       <p>
+         If you want to publish an article at some specific time,
+         then you can tell the scheduler to execute the publication
+         process at this specific time.
+       </p>
+       </section>
+       
+       <section><title>User Interface</title> 
+       <p>
+         To schedule a task for a specific page, click in the Menu
+         "File" on the item "Schedule".  Then you should see the
+         following screen:
+       </p>
+       
+       <figure src="images/scheduler-user-screen.gif" alt=""/>
+ 
+       </section>
+       
+       <section><title>Administrator Interface</title> 
+       <p>
+         If you want to see all scheduled tasks for a specific
+         publication, then you have to click on the tab
+         "Administrator" to the enter the Lenya Administrator.  There
+         you can click on "Scheduler" to see all currently scheduled
+         tasks.
+      </p>
+       
+       <figure src="images/scheduler-administrator-screen.gif" alt=""/>
+       
+       </section>
+       
+       <section><title>Existing Schedulers?</title> 
+       <ul>
+         <li><link href="http://www.part.net/quartz.html";>Quartz</link></li>
+         <li><link 
href="http://jcrontab.sourceforge.net/help.shtml";>Jcrontab</link></li>
+       </ul>
+       </section>
+       
+       <section><title>Scheduling Markup Language</title>
+       <p>
+         There are many ways to define a Scheduling Markup Language
+       </p>
+       <source><![CDATA[
+         
+ <sch:scheduler>
+ 
+ <sch:triggers>
+   <sch:trigger name="date" src="org.apache.lenya.cms.scheduler.DateTrigger"/>
+   <sch:trigger name="modified" 
src="org.apache.lenya.cms.scheduler.ContentModifiedTrigger"/>
+ </sch:triggers>
+ 
+ <sch:actions>
+   <sch:action name="publish" 
src="org.apache.lenya.cms.scheduler.PublishAction"/>
+   <sch:action name="email" src="org.apache.lenya.cms.scheduler.EMailAction"/>
+ </sch:actions>
+ 
+ <sch:publication name="nwt">
+ <sch:tasks>
+   <sch:task action-type="publish">
+     <sch:trigger type="date">
+       <sch:parameter name="year" value="2002"/>
+       <sch:parameter name="month" value="6"/>
+       <sch:parameter name="day" value="14"/>
+       <sch:parameter name="hour" value="13"/>
+       <sch:parameter name="minute" value="47"/>
+     </sch:trigger>
+     <sch:parameter name="docid" value="articles/2002/6/13/article97HKI79"/>
+   </sch:task>
+ </sch:tasks>
+ </sch:publication>
+ </sch:scheduler>
+ 
+       ]]></source>
+       </section>
+       
+       <section><title>Java API</title> 
+       <ul>
+         <li><link 
href="http://quartz.sourceforge.net/javadoc/index.html";>Quartz</link></li>
+         <li><link 
href="http://jcrontab.sourceforge.net/doc/index.html";>Jcrontab</link></li>
+       </ul>
+       </section>
+       
+       <section><title>Extra Library</title> 
+       <ul>
+         <li>lib/commons-dbcp.jar</li>
+       </ul>
+       </section>
+       
+       <section><title>Configuration: web.xml</title>
+       <p>
+         In order to initialize the serlet at startup, one has to modify
+         the file web.xml as follows:
+       </p>
+       <source><![CDATA[
+ 
+    <!-- Scheduler -->
+    <servlet>
+      <servlet-name>LoadServlet</servlet-name>
+      <servlet-class>org.quartz.web.LoadQuartzServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+    </servlet>
+ 
+    <servlet-mapping>
+      <servlet-name>LoadServlet</servlet-name>
+      <url-pattern>/load</url-pattern>
+    </servlet-mapping>
+    <!-- /Scheduler -->
+ 
+       ]]></source>
+       <p>
+         This allows you to call the servlet by either
+         http://localhost:8080/lenya/servlet/LoadServlet or
+         http://localhost:8080/lenya/load
+       </p>
+       </section>
+       <section><title>Status</title>
+       <p>
+         The following things need to be done: </p>
+         <ul>
+           <li><code>PublishJob</code> needs to be integrated with
+           the Lenya publishing framework.</li>
+           <li>The document id has to be passed to the servlet when
+           calling it from any document.</li>
+           <li>Move everything from scratchpad into proper
+           locations.</li>
+           <li>Make sure the state of the scheduler is saved when the
+           servlet engine goes down and is read in when it comes up.</li>
+         </ul>
+       </section>
+       <section><title>Design</title>
+       <p>
+         The design of the scheduler is pretty much given due to the
+         implementation of the quarz scheduler. See also the
+         following diagram:    </p>
+         <figure src="images/schedulerClassDiagram.png" alt="Class Diagram for 
Scheduler"/>
+ 
+       </section>
+     </section>
+ 
+     <section><title>Jobs</title> 
+       <section><title>HelloWorldJob</title>
+       <p>
+ ...
+       </p>
+       </section>
+     </section> 
+ 
+     <section><title>Triggers</title> 
+       <section><title>DateTrigger</title>
+       <p>
+ ...
+       </p>
+       </section>
+ 
+       <section><title>CronTrigger</title>
+       <p>
+ ...
+       </p>
+       </section>
+     </section> 
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaAccessController , version: 
1 on Mon Jun 23 15:28:49 2003 by GregorRothfuss

New page created:
+ <title>Authorization and Authentication</title> 
+    <section>
+ <title>Introduction</title> 
+     <p>
+ You can use this publisher when you run everything on one
+ machine. Everything means the administrator's view, the editor's view
+ and the reader's view. In a more "productive" environment it is recommended
+ to run the administrator's and editor's view on one machine (intranet) and
+ the reader's view on another machine (DMZ). In this case you have to use a
+ more advanced publisher, which is able to replicate the data by scp, rysnc 
(ssh)
+ or for instance http-upload.
+     </p>
+    </section>
+ 
+    <section><title>Configuration</title> 
+      <p>
+ The filesystem publisher has to know the filesystem path of the authoring 
area and
+ the live area. These two paths are set within the sitemap:
+      </p>
+      <source><![CDATA[
+ 
+ <map:actions>
+   <map:action name="" src="">
+     <authoring href="content/authoring/"/>
+     <live href="content/live/"/>
+     <tree-authoring href="content/authoring/tree.xml"/>
+     <tree-live href="content/live/tree.xml"/>
+   </map:action>
+ </map:actions>
+ 
+      ]]></source>
+    <p>
+ NOTE: "authoring" and "live" are required parameters, "tree-authoring" and 
"tree-live" are not required parameters.
+    </p>
+    </section>
+ 
+    <section><title>Required Files</title> 
+ <ol>
+   <li>lenya/content/publish-screen.xsp</li>
+   <li>lenya/xslt/Publish/main.xsl</li>
+ </ol>
+    </section>
+ 
+ 
+    </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaParentChildCreator , 
version: 1 on Mon Jun 23 15:42:41 2003 by GregorRothfuss

New page created:
+ Parent-Child Creator</title> 
+ 
+    <section><title>Introduction</title> 
+     <p>
+ The Parent-Child Creator is a concrete implementation of the ResourceCreator 
pattern.
+     </p>
+    </section>
+ 
+    <section><title>Customizing the Menu</title> 
+      <p>
+ Normally the "Menus" can be found at <em>config/menus</em>.
+      </p>  
+    </section>
+ 
+    <section><title>Sitemap</title> 
+      <ol>
+        <li>Definition of Action:
+            <code><![CDATA[
+ 
+ <map:action name="parent-child" 
src="org.apache.lenya.cms.cocoon.acting.ParentChildCreatorAction">
+   <tree-authoring href="content/authoring/tree.xml"/>
+   <docs href="content/authoring"/>
+   <doctypes href="config/doctypes/"/>
+ </map:action>
+ 
+            ]]></code>
+        </li> 
+        <li>"Create-Screen":
+            <code><![CDATA[
+ 
+ <map:pipeline>
+   <map:match pattern="lenya/ParentChildScreenNewArticle*">
+     <map:generate type="serverpages" 
src="../../content/authoring/parent-child.xsp"/>
+     <map:transform src="../../xslt/authoring/parent-child.xsl"/>
+     <map:serialize type="html"/>
+   </map:match>
+ </map:pipeline>
+ 
+            ]]></code>                                                         
                                                               
+        </li>
+        <li>"Create-Action":
+            <code><![CDATA[
+ 
+ <map:pipeline>
+   <map:match pattern="lenya/create*">
+     <map:act type="parent-child">
+       <map:redirect-to uri="{parent_uri}" session="true"/>
+     </map:act>
+     <map:redirect-to uri="ParentChildScreenNewArticle?status=failed" 
session="true"/>
+   </map:match>
+ </map:pipeline>
+ 
+            ]]></code>
+        </li>
+      </ol> 
+    </section>
+ 
+    <section><title>Customizing the Create Screen</title> 
+      <p>
+ Copy the generic XSLT "../../xslt/authoring/parent-child.xsl" into the 
publication's stylesheet directory 
"lenya/xslt/authoring/parent-child-new-article.xsl". Don't forget to change the 
sitemap appropriately. The following parameters have to exist: parentid 
(generated via XSP), childid (not-empty String, no whitespace), childname 
(non-empty String), childtype (leaf or branch), doctype (e.g. Article). Exp:
+      </p>  
+ <source><![CDATA[
+ <form>
+  <table>
+  <tr><td>parent:</td><td>Hidden</td></tr>
+  <tr><td>id:</td><td><input type="text" name="id"/></td></tr>
+  <tr><td>name:</td><td><input type="text" name="name"/></td></tr>
+  <tr><td>Child Type:</td><td><input type="radio" name="childtype" 
value="branch"/>Branch
+  <input type="radio" name="childtype" value="leaf"/>Leaf</td></tr>
+  <tr><td>doctype:</td>
+      <td>
+        <select name="doctype" size="2">
+          <option value="generic">Generic (XHTML)</option>
+          <option value="member">Member</option>
+        </select>
+      </td>
+  </tr>
+ </table>
+ </form>
+ ]]></source>
+ 
+ <figure src="images/parent-child-image.png" alt=""/>
+ 
+    </section>
+ 
+    <section><title>Configuration</title> 
+      <ol>
+        <li> doctypes.xconf
+          The different doctypes are configured in a file doctypes.xconf: 
LENYA_CMS/src/webapp/lenya/pubs/*publication*/config/doctypes/doctypes.xconf. 
Given are their children and their creator. 
+            <code><![CDATA[
+ 
+ <?xml version="1.0"?>
+ 
+ <doctypes>
+ <doc type="Section">
+   <children>
+     <doc type="Article"/>
+   </children>
+ </doc>
+ 
+ <doc type="Article">
+   <creator src="org.apache.lenya.cms.pubs.forum.NewArticleCreator"/>
+   <children>
+     <doc type="Comment"/>
+   </children>
+ </doc>
+ </doctypes>
+ 
+            ]]></code>
+        </li>
+      </ol>   
+    </section>
+ 
+    <section><title>Tree: tree.xml</title> 
+      <p>
+ The document tree.xml has to exist and the branches as well! Please see 
definition of Action.
+      </p>  
+            <source><![CDATA[
+ 
+ <?xml version="1.0"?>
+ 
+ <!-- CAUTION: this tree is handcrafted -->
+ <tree>
+   <branch relURI="" doctype="Front" menuName="Home">
+     <branch relURI="magazin" doctype="Channel" menuName="Magazin">
+       <branch relURI="gesundheit" doctype="Section" menuName="Gesundheit">
+         <branch relURI="2002" doctype="Year" menuName="2002"/>
+       </branch>
+     </branch>
+     <branch relURI="channel" doctype="Channel" menuName="Magazin">
+       <branch relURI="section" doctype="Section" menuName="Gesundheit">
+         <branch relURI="year" doctype="Year" menuName="2002"/>
+       </branch>
+     </branch>
+   </branch>
+ </tree>
+ 
+            ]]></source>
+    </section>
+ 
+    <section><title>Extend Java Class AbstractParentChildCreator</title> 
+      <p>
+ Finally the Java class AbstractParentChildCreator has to be extended.
+      </p>  
+            <source><![CDATA[
+ 
+ package ch.unizh.unipublic.lenya.cms.authoring;
+     
+ import java.io.File;
+ 
+ import org.apache.lenya.cms.authoring.AbstractParentChildCreator;
+ 
+ import org.apache.log4j.Category;
+ 
+ /**
+  * @author Michael Wechner
+  * @version 2002.7.2
+  */
+ public class NewArticleCreator extends AbstractParentChildCreator{
+   static Category log=Category.getInstance(NewArticleCreator.class);
+ /**
+  *
+  */
+   public short getChildType(short childType) throws Exception{
+     return childType;
+     }
+ /**
+  *
+  */
+   public String generateTreeId(String childId,short childType) throws 
Exception{
+     return childId;
+     }
+ /**
+  *
+  */
+   public void create(File samplesDir,File parentDir,String childId,short 
childType) throws Exception{
+     log.warn("NewArticleCreator.create() has been called.");
+     }
+   }
+ 
+            ]]></source>
+    </section>
+ 
+    <section><title>Sample: sample.xml</title>
+      <p>
+ When the child is created, the systems takes a sample of the appropriate 
doctype and makes a copy of that sample, such that the user has a starting 
point for editing.
+      </p>
+        <source><![CDATA[
+ 
+ <?xml version="1.0"?>
+  
+ <article>
+    <meta>
+      <id/>
+    </meta>
+    <head>
+      <title>Sample Title</title>
+    </head>
+    <body>
+    <p>
+    Sample Person writes:
+    <quotation>Sample Quotation ...</quotation>
+    Sample Text ...
+    </p>
+    </body>
+    <comments/>
+ </article>                                                                    
                                                              
+ 
+        ]]></source>
+    </section>
+ 
+       <section><title>Bread-Crumb Path</title>
+ <p>
+ You can now easily extract 
+ a bread-crumb path and the siblings from the tree. More details can be found 
within 
+ the publication "Materials Science" (ethz-mat).
+ </p>
+ <source><![CDATA[
+           
+ <?xml version="1.0"?>
+ 
+ <parentchild relURI="g06" doctype="Group" name="Polymer Chemistry">
+ 
+   <parents>
+     <parent relURI="" doctype="Department" name="Department"/>
+   </parents>
+ 
+   <children>
+     <child type="branch" relURI="members" doctype="Members" name="Members"/>
+     <child type="leaf" relURI="research" doctype="Generic" name="Research"/>
+     <child type="leaf" relURI="positions" doctype="Generic" name="Open 
Positions"/>
+     <child type="leaf" relURI="related" doctype="Generic" name="Related 
Topics"/>
+   </children>
+ </parentchild>
+           
+         ]]></source>
+       </section>
+ 
+    </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaRevisionController , 
version: 1 on Mon Jun 23 15:43:50 2003 by GregorRothfuss

New page created:
+ Revision Controller</title> 
+ 
+    <section><title>What is the Revision Controller?</title> 
+     <p>
+ The Revision Controller controls the check-in and check-out of the different 
documents (reserved check-in/check-out) and manages their different versions.
+     </p>
+     <p>
+ An already checked out document cannot be checked out by someone other. An 
exception is sent, which tells who has already checked out this document and 
since when.
+     </p>
+     <p>
+ When a document is checked-in, the old version of the document can be copied 
(backup).
+     </p>
+    </section>
+    
+    <section><title>RCML-file</title>
+     <p>
+ The different check-in/check-out of a file are memorised in an xml file 
(RCML-file) created by the class org.apache.lenya.xps.rc.RCML:
+     </p>
+ <source><![CDATA[
+ 
+ <?xml version="1.0" encoding="utf-8"?>
+ 
+ <XPSRevisionControl>
+ <CheckIn><Identity>lenya</Identity><Time>1023102128815</Time></CheckIn>
+ <CheckOut><Identity>lenya</Identity><Time>1023102128780</Time></CheckOut>
+ <CheckOut><Identity>lenya</Identity><Time>1023102125300</Time></CheckOut>
+ <CheckOut><Identity>lenya</Identity><Time>1023102121346</Time></CheckOut>
+ <CheckIn><Identity>lenya</Identity><Time>1023102110381</Time></CheckIn>
+ <CheckOut><Identity>lenya</Identity><Time>1023102110349</Time></CheckOut>
+ <CheckIn><Identity>System</Identity><Time>1023102073728</Time></CheckIn>
+ <CheckOut><Identity>lenya</Identity><Time>1023102073695</Time></CheckOut>
+ <CheckOut><Identity>lenya</Identity><Time>1023102012990</Time></CheckOut>
+ <CheckOut><Identity>lenya</Identity><Time>1023102010354</Time></CheckOut>
+ <CheckIn><Identity>System</Identity><Time>1022569908000</Time></CheckIn>
+ </XPSRevisionControl>
+                                                                               
                                                           
+ ]]></source>
+     <p>
+ The RCML-file are located in a preconfigured directory, the RCML-directory. 
The RCML-file of a specified article with "path" and "filename" is : 
RCML-directory+path+filename+.rcml  
+     </p>
+    </section>
+ 
+    <section><title>Backup</title>
+     <p>
+ The backup are located in a preconfigured directory, the BACKUP-directory. 
The backup of a specified article with "path" and "filename" is : 
BACKUP-directory+filename+filename+.bak.time 
+     </p>
+    </section>  
+    
+    <section><title>Revision Controller</title>
+      <p>The functionality of the revision controller is managed by the java 
class org.apache.lenya.cms.rc.RevisionController:
+      </p>
+      <ul>
+        <li>to check out a file call the method reservedCheckOut(String 
source, String identity), where source is the filename of the file and 
identity, the user. <br/>
+ Rem: The same user is allowed to check out repeatedly without having to check 
back in first.     
+        </li>
+        <li>to check in a file call the method reservedCheckIn(String 
destination, String identity, boolean backup), where the destination is the 
filename of the file, the identity, the user and backup, a boolean to make a 
backup copy. <br/>
+ Rem: <ul>
+       <li>the same user may check in a document repeatedly</li>
+       <li>an already checked out document cannot be checked out by someone 
other</li>
+       <li>it exists an user "System", who can override evry checkin</li> 
+      </ul> 
+        </li>
+        <li>to roll back to an old version call the method rollback(String 
destination, String identity, boolean backupFlag, long time), where destination 
is the filename of the file, the identity is the user, the backupFlag is a 
boolean to make a backup copy of the current version and the time is the time 
point of the desired old version.
+        </li>
+      </ul> 
+    </section>
+    <section><title>Revision-Controller Action</title>
+      <p>A specified URL will call an action, which in turn calls the Revision 
Controller. We defined two different actions, one for the checkin (the 
reserved-checkin-action) and one for the checkout (the 
reserved-checkout-action). Both actions inherite from 
org.apache.lenya.cms.cocoon.acting.RevisionControllerAction.java
+      </p>
+    </section> 
+ </section>
+ <section><title>Check Out</title>
+    <section><title>Reserved-Checkout Action</title>
+      <p>
+      The check out of a file can be activated by a specified URL, which call 
the reserved-checkout action. 
+      </p>
+      <ul>
+        <li>The action to check out a file is the java class 
java.org.apache.lenya.cms.cocoon.acting.ReservedCheckoutAction</li>
+        <li>It calls the Revision Controller, the java class 
org.apache.lenya.cms.rc.RevisionController and send the different exceptions. 
See also Exception Handling</li>
+        <li>The configuration of the needed parameters (RCML-directory and the 
BACKUP-directory) is made in the sitemap. See also Configuration</li>
+        <li>The value of the user is got from the session</li>
+        <li>The reference to the action is made in the authoring-sitemap.xmap. 
See also Sitemap</li>
+      </ul>
+    </section>
+ 
+    <section><title>Sitemap</title>
+      <p>
+       The authoring-sitemap.xmap treated of the check out of document in 
Authoring.
+      </p>
+      <ul>
+        <li>reference to the action : 
+ <code><![CDATA[
+ 
+ <map:components>
+     ...
+     <map:actions>
+       <map:action name="reserved-checkout" 
src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutAction" 
logger="sitemap.action.reserved-checkout">
+       </map:action>
+     </map:actions>
+     ...
+ </map:components>
+ 
+ ]]></code>
+        </li>
+        <li>call the action for a check out in the pipeline : 
+            <code><![CDATA[
+ 
+       <map:match pattern="rco/*/*/*/*/index.xml">
+         <map:act type="reserved-checkout">
+           <map:parameter name="filename" 
value="content/live/{1}/{2}/articles/{3}/{4}/index.xml"/>
+           <map:generate type="serverpages" 
src="../../content/rc/{exception}.xsp">
+             <map:parameter name="user" value="{user}"/>
+             <map:parameter name="filename" value="{filename}"/>
+             <map:parameter name="date" value="{date}"/>
+           </map:generate>
+           <map:serialize type="xml"/>
+         </map:act>
+         <map:generate src="content/live/{1}/{2}/articles/{3}/{4}/index.xml"/>
+         <map:serialize type="xml"/>
+       </map:match>
+ 
+            ]]></code>
+        </li>                                                                  
                                                             
+      </ul> 
+    </section>
+ 
+    <section><title>Configuration</title>
+      <p>
+      </p>
+      <ul>
+        <li>The configuration of the RCML-directory and the BACKUP-directory 
is made in the sitemap. The desired parameters are given in the definition of 
the reerved-checkout-action: 
+            <code><![CDATA[
+  
+      <map:actions>
+       <map:action name="reserved-checkout" 
src="org.apache.lenya.cms.cocoon.acting.ReservedCheckoutAction" 
logger="sitemap.action.reserved-checkout">
+          <rcmlDirectory href="content/rcml"/>
+          <backupDirectory href="content/rcbak"/>
+        </map:action>
+      </map:actions>
+   
+           ]]></code>
+ Their values are red by the ReservedCheckoutAction, who give them to the 
RevisionController. 
+        </li>
+      </ul>                                                                    
                                                              
+    </section>                                                                 
                                                                   
+ 
+  
+ <anchor id="exception"/>
+     <section><title>Exception Handling (XML)</title>
+      <p>
+      </p>
+      <ul>  
+        <li>If the document couldn't be checked in because it was already 
checked out by someone other or it was already checked in by someone other then 
the Check-In-Action will send the following XML:
+            <code><![CDATA[
+ 
+ <rc:exception>
+   <rc:file-reserved-checkin-exception>
+     <rc:exception><xsp:expr>exception</xsp:expr></rc:exception>
+     <rc:filename><xsp:expr>filename</xsp:expr></rc:filename>
+     <rc:checkType><xsp:expr>checkType</xsp:expr></rc:checkType>
+     <rc:user><xsp:expr>user</xsp:expr></rc:user>
+     <rc:date><xsp:expr>date</xsp:expr></rc:date>                              
                                                              
+   </rc:file-reserved-checkin-exception>
+ </rc:exception>
+ 
+            ]]></code>
+        </li>
+        <li>If another exception occurs (ex: the file to check in doesn't 
exist,...) then the Check-In-Action will
+ send the following XML:
+            <code><![CDATA[
+ 
+ <rc:exception>
+   <rc:exception>
+     <rc:filename><xsp:expr>filename</xsp:expr></rc:filename>
+   </rc:exception>
+ </rc:exception>
+ 
+            ]]></code>
+        </li>
+      </ul>
+    </section>
+    </section>
+    <section><title>Rollback</title>
+      <p> The rollback of a file can be called with a specified URL. The list 
of the different backup versions will appear on the rollback screen. We can 
view it or call the rollback to a specified version.</p>
+      <ul>
+       <li>The rollback-screen and the view of the document are generated by 
serverpages: 
+         <ul>
+          <li>the docs/cms/rc/versions-screen.xsp for the screen</li>
+          <li>and the docs/cms/rc/view.xsp for the view</li>
+         </ul> 
+        </li>
+       <li>The rollback to the an old version si controlled by the rollback 
action org.apache.lenya.cms.cocoon.acting.RollbackAction</li>
+      </ul> 
+    <section><title>versions-screen.xsp</title>
+          <p> This serverpage include in the XML document for the screen the 
rcml document.
+          </p>
+    </section>
+    <section><title>view.xsp</title>
+          <p>
+           This serverpage include in the "View" XML document the XML of 
desired version
+          </p>
+    </section>
+    <section><title>org.apache.lenya.cms.cocoon.acting.RollbackAction</title>
+      <p>
+       This action inherite from 
org.apache.lenya.cms.cocoon.acting.RevisionController. It called the Revision 
Controller to execute the rollback
+      </p>
+    </section>
+    <section><title>Sitemap</title>
+      <p>
+        The authoring-sitemap.xmap treated of the rollback of document in 
Authoring. 
+      </p>
+      <ul>
+        <li>reference to the action for the rollback
+ <code><![CDATA[
+ 
+   <map:components> 
+    ...
+     <map:actions>
+      ...
+       <map:action name="rollback" 
src="org.apache.lenya.cms.cocoon.acting.RollbackAction">
+         <rcmlDirectory href="content/rcml"/>
+         <backupDirectory href="content/rcbak"/>
+       </map:action>                                                           
                                                              
+      ...
+     </map:actions>
+    ... 
+   </map:components> 
+ 
+ ]]></code>
+        </li>
+        <li>call the action for a rollback in the pipeline
+ <code><![CDATA[
+ 
+       <map:match pattern="rollback/*/*/*/*/index.xml">
+         <map:act type="rollback">
+           <map:parameter name="filename" 
value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/>
+           <map:redirect-to uri="{location}" session="true"/>
+         </map:act>
+       </map:match>                                                            
                                                              
+ 
+ ]]></code>
+        </li>
+        <li>generation of the rollback-sreen document
+ <code><![CDATA[
+ 
+       <map:match pattern="revision/*/*/*/*/index.xml">
+         <map:generate type="serverpages" 
src="../../content/rc/versions-screen.xsp">
+           <map:parameter name="rootDir" 
value="/home/edith/build/jakarta-tomcat-4.0/webapps/lenya/lenya/pubs/unipublic"/>
+           <map:parameter name="filename" 
value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/>
+           <map:parameter name="rcmlDirectory" value="content/rcml"/>
+           <map:parameter name="backupDirectory" value="content/rcbak"/>
+           <map:parameter name="channel" value="{1}"/>
+           <map:parameter name="section" value="{2}"/>
+           <map:parameter name="year" value="{3}"/>
+           <map:parameter name="articleId" value="{4}"/>
+         </map:generate>
+         <map:transform src="../../xslt/rc/rollback.xsl"/>
+         <map:serialize type="html"/>
+       </map:match>                                                            
                                                                
+ 
+ ]]></code>
+        </li>
+        <li>generation of the view document
+ <code><![CDATA[
+ 
+       <map:match pattern="view/*/*/*/*/index.xml">
+         <map:generate type="serverpages" src="../../content/rc/view.xsp">
+           <map:parameter name="rootDir" 
value="/home/edith/build/jakarta-tomcat-4.0/webapps/lenya/lenya/pubs/unipublic"/>
+           <map:parameter name="filename" 
value="content/authoring/{1}/{2}/articles/{3}/{4}/index.xml"/>
+           <map:parameter name="rcmlDirectory" value="content/rcml"/>
+           <map:parameter name="backupDirectory" value="content/rcbak"/>
+         </map:generate>
+           <map:transform src="xslt/article/authoring/toArticle.xsl"/>
+           <map:transform src="xslt/article/authoring/main.xsl">
+              <map:paramete]]><![CDATA[r name="section" value="{2}"/>
+           </map:transform>
+           <map:serialize type="html"/>
+       </map:match>                                                            
                                                              
+ 
+ ]]></code></li>
+      </ul>
+    </section>
+    <section><title>Configuration</title>
+      <p>
+       The configuration of the RCML-directory and the BACKUP-directory are 
made in the sitemap. The desired parameters are given in the definition of the 
rollback-action and in the call of the serverpages: look above
+      </p>                                                                     
                                                                
+    </section>                                                                 
                                                                     
+    </section>     
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaTutorial , version: 1 on Mon 
Jun 23 15:44:50 2003 by GregorRothfuss

New page created:
+ At the moment there seem to be two possibilities to
+ use Lenya. You can either copy a sample publication from
+ the Lenya distribution which has a similar information
+ architecture as the one you have in mind for yourself, or
+ you might have an existing Cocoon based publication, which
+ you want to make content manageable, which means documents respectively
+ pages shall basically be editable and publishable.
+ </p>
+ </section>
+ 
+ <section><title>Customizing a sample publication</title>
+ <section><title>Sample publications</title>
+ <p>
+ The following sample publications currently exist:</p>
+ <ol>
+   <li>UNIPUBLIC (University of Zurich)</li>
+   <li>Department of Materials Science (Swiss Federal Institute of 
Technology)</li>
+ </ol>
+ </section>
+ <section><title>Copy sample publication</title>
+ <p>
+ </p>
+ <p>
+ In following let <strong>ethz-mat</strong> be the source and 
<strong>MY-PUB</strong> the name of the new publication
+ </p>
+ <ol>
+ <li>Copy: cp -r lenya/pubs/ethz-mat lenya/pubs/MY-PUB</li>
+ <li>Rename the ethz/mat subdirectories for your purpose<br/>
+      for instance: ethz-mat/docs/ethz/mat ==&gt; MY-PUB/docs/standard/t01 
<br/>
+      and: ethz-mat/stylesheets/ethz/mat ==&gt; MY-PUB/stylesheets/standard/t01
+ </li>
+ <li>
+ Configure MY-PUB/sitemap.xmap<br/>
+ Just replace ethz-mat by MY-PUB and ethz/mat by standard/t01
+ <code><![CDATA[
+ 
+ <map:components>
+  ...
+  <map:actions>
+    <map:action name="authorizer" 
src="org.apache.lenya.cms.cocoon.acting.PMLAuthorizerAction"
+                                                
logger="sitemap.action.pml-authorizer">
+       <authenticator type="MY-PUB"/>
+       <policies>MY-PUB/policies/</policies>
+       
<public>login-screen|do-login|switch-user|logout|.*[.]css|.*[.]jpg|.*[.]gif</public>
+    </map:action>
+    <map:action name="authenticator" 
src="org.apache.lenya.cms.cocoon.acting.IMLAuthenticatorAction"
+                                                   
logger="sitemap.action.iml-authenticator">
+       <type>MY-PUB</type>
+       <passwd>MY-PUB/passwd/</passwd>
+    </map:action>
+  </map:actions>
+ </map:components>
+ ...
+ <map:resources>
+   <map:resource name="login">
+     <map:generate type="serverpages" src="../../content/ac/login.xsp"/>
+     <map:transform src="../../xslt/ac/login.xsl">
+       <map:parameter name="publication_name" value="MY-PUB"/>
+       <map:parameter name="publication_id" value="MY-PUB"/>
+       <map:parameter name="lenya_path" 
value="lenya/pubs/MY-PUB/docs/standard/t01/" />
+     </map:transform>
+     <map:serialize type="html"/>
+   </map:resource>
+ </map:resources>
+ 
+ ]]></code>
+ <code><![CDATA[
+ 
+ <map:match pattern="logout">
+   <map:generate type="serverpages" src="../../content/ac/logout.xsp"/>
+   <map:transform src="../../xslt/ac/logout.xsl">
+     <map:parameter name="publication_name" value="MY-PUB"/>
+   </map:transform>
+   <map:serialize/>
+ </map:match>
+ 
+ ]]></code>
+ </li>
+ <li>
+ Set Name of Publication: lenya/pubs/MY-PUB/stylesheets/lenya/conf/conf.xsl
+ (e.g. 'MY Publication')
+ <code><![CDATA[
+ 
+ <?xml version="1.0"?>
+ <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+  <xsl:include href="../../../Configuration/read.xsl"/>
+  <xsl:variable name="publication">MY Publication</xsl:variable>
+  <xsl:variable name="copyright">copyright &#169; 2002 lenya.org</xsl:variable>
+ </xsl:stylesheet>
+ 
+ ]]></code>
+ </li>
+ <li>
+ Moreover, replace ethz-mat by MY-PUB in following files:<br/>
+ i)   webapp/lenya/content/menus/live.xsp<br/>
+ ii)  webapp/lenya/pubs/MY-PUB/docs/cms/menus/live.xsp<br/>
+ iii) 
webapp/lenya/pubs/MY-PUB/stylesheets/standard/t01/Configuration/read.xsl<br/>
+ iv)  webapp/lenya/pubs/MY-PUB/stylesheets/Configuration/read.xsl<br/>
+ v)   webapp/lenya/pubs/MY-PUB/stylesheets/lenya/edit/root.xsl
+ </li>
+ </ol>
+ </section>
+ <section><title>Adding copied publication to root sitemap</title>
+ <p>
+ </p>
+ <p>
+ File: webapp/sitemap.xmap
+ </p>
+ <source><![CDATA[
+ 
+ <map:match pattern="MY-PUB/**">
+    <map:mount uri-prefix="MY-PUB" src="lenya/pubs/MY-PUB/sitemap.xmap"
+                                  check-reload="true" 
reload-method="synchron"/>
+ </map:match>
+ 
+ ]]></source>
+ </section>
+ </section>
+ <section><title>Adding CM functionalities to an existing publication</title>
+ <section><title>Creating Authoring and Live area</title>
+ <p>
+ </p>
+ <p>
+ to do
+ </p>
+ </section>
+ </section>
+ <section><title>Import content</title>
+ <section><title>Create XSLT from HTML with JTidy</title>
+ <p>
+ </p>
+ <p>
+ export PATH=/usr/local/jdk1.3.1/bin:$PATH <br/>
+ java -classpath 
LENYACMS/build/lenya/classes:LENYACMS/build/lenya/webapp/WEB-INF/lib/jtidy-04aug2000r7-dev.jar
 org.apache.lenya.util.TidyCommandLine
+ </p>
+ </section>
+ </section>
+ <section><title>Regard following items</title>
+ <section><title>Modify EditorMainAction if the html-editor is used</title>
+ <p>
+ </p>
+ <p>
+ Modify 'lenyaPath'in the java-class 
org.apache.lenya.cms.cocoon.acting.EditorMainAction<br/>
+      for instance: String 
lenyaPath="lenya/pubs/MY-PUB/docs/standard/t01/";<br/>
+      and recompile.
+ </p>
+ 
+ </section>
+ </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaLucene , version: 1 on Mon 
Jun 23 15:39:47 2003 by GregorRothfuss

New page created:
+ <section><title>Index</title>
+ <p>...</p>
+ </section>
+ <section><title>Search</title>
+ <section><title>Standard</title>
+ <source><![CDATA[
+ 
+ org.apache.lucene.search.Searcher searcher=new 
org.apache.lucene.search.IndexSearcher("index");
+ org.apache.lucene.analysis.Analyzer analyzer=new 
org.apache.lucene.analysis.standard.StandardAnalyzer();
+ 
+ org.apache.lucene.search.Query query = QueryParser.parse(query_string, 
"contents", analyzer);
+ 
+ org.apache.lucene.search.Hits hits=searcher.search(query);
+ 
+ ]]></source>
+ </section>
+ 
+ <section><title>Cocoon</title>
+ <source><![CDATA[
+ 
+ LuceneCocoonSearcher searcher=new 
org.apache.cocoon.components.search.SimpleLuceneCocoonSearcherImpl();
+ searcher.setDirectory("index");
+ searcher.setAnalyzer(new 
org.apache.lucene.analysis.standard.StandardAnalyzer());
+ 
+ org.apache.lucene.search.Hits 
hits=searcher.search(query_string,LuceneXMLIndexer.BODY_FIELD);
+ 
+ ]]></source>
+ </section>
+ </section>
+ 
+ <section>
+ <title>Usage</title>
+ <p>
+ How to crawl and index ...
+ </p>
+ 
+ <section>
+ <title>ANT</title>
+ <p>
+ <code>ant -f src/webapp/lenya/bin/crawl_and_index.xml -projecthelp</code>
+ </p>
+ <p>
+ <code>ant -f src/webapp/lenya/bin/crawl_and_index.xml 
-Dcrawler.xconf=crawler.xconf crawl</code>
+ </p>
+ <p>
+ <code>ant -f src/webapp/lenya/bin/crawl_and_index.xml 
-Dlucene.xconf=lucene.xconf index</code>
+ </p>
+ </section>
+ 
+ <section><title>Crawling HTDOCS</title>
+ <p>
+ <code>java -cp build/lenya/classes 
org.apache.lenya.search.crawler.IterativeHTMLCrawler</code>
+ </p>
+ </section>
+ 
+ 
+ <section><title>Indexing HTML within the Filesystem</title>
+ <p>
+ <code>java -cp lucene-1.2-rc2.jar:classes org.apache.lenya.lucene.IndexHTML 
-create -index lucene-index-oscom-matrix /usr/local/apache/htdocs_oscom</code>
+ </p>
+ </section>
+ 
+ <section><title>Indexing Files within the Filesystem</title>
+ <p>
+ <code>java -cp lucene-1.2-rc2.jar:classes org.apache.lenya.lucene.IndexFiles 
/usr/local/apache/htdocs_oscom lucene-index-oscom-matrix</code>
+ </p>
+ </section>
+ 
+ <section><title>Indexing HTML via HTTP (Crawling)</title>
+ <ol>
+   <li>LARM</li>
+   <li>i2a.WebSearch (Configuration: WEB-INF/conf/websearch.xml: seed, scope, 
indexURI)</li>
+ </ol>
+ </section>
+ </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaCreatePublication , version: 
1 on Mon Jun 23 15:38:49 2003 by GregorRothfuss

New page created:
+ Creating a new Publication</title>
+ <section><title>Introduction</title>
+ <p>
+ At the moment there seem to be two possibilities to
+ use Lenya. You can either copy a sample publication from
+ the Lenya distribution which has a similar information
+ architecture as the one you have in mind for yourself, or
+ you might have an existing Cocoon based publication, which
+ you want to make content manageable, which means documents respectively
+ pages shall basically be editable and publishable.
+ </p>
+ </section>
+ </section>
+ 
+ <section><title>Customizing a sample publication</title>
+ <section><title>Sample publications</title>
+ <p>
+ The following sample publications currently exist:</p>
+ <ol>
+   <li>UNIPUBLIC (University of Zurich)</li>
+   <li>Department of Materials Science (Swiss Federal Institute of 
Technology)</li>
+ </ol>
+ </section>
+ <section><title>Copy sample publication</title>
+ <p>
+ </p>
+ <p>
+ In following let <strong>ethz-mat</strong> be the source and 
<strong>MY-PUB</strong> the name of the new publication
+ </p>
+ <ol>
+ <li>Copy: cp -r lenya/pubs/ethz-mat lenya/pubs/MY-PUB</li>
+ <li>Rename the ethz/mat subdirectories for your purpose<br/>
+      for instance: ethz-mat/docs/ethz/mat ==&gt; MY-PUB/docs/standard/t01 
<br/>
+      and: ethz-mat/stylesheets/ethz/mat ==&gt; MY-PUB/stylesheets/standard/t01
+ </li>
+ <li>
+ Configure MY-PUB/sitemap.xmap<br/>
+ Just replace ethz-mat by MY-PUB and ethz/mat by standard/t01
+ <code><![CDATA[
+ 
+ <map:components>
+  ...
+  <map:actions>
+    <map:action name="authorizer" 
src="org.apache.lenya.cms.cocoon.acting.PMLAuthorizerAction"
+                                                
logger="sitemap.action.pml-authorizer">
+       <authenticator type="MY-PUB"/>
+       <policies>MY-PUB/policies/</policies>
+       
<public>login-screen|do-login|switch-user|logout|.*[.]css|.*[.]jpg|.*[.]gif</public>
+    </map:action>
+    <map:action name="authenticator" 
src="org.apache.lenya.cms.cocoon.acting.IMLAuthenticatorAction"
+                                                   
logger="sitemap.action.iml-authenticator">
+       <type>MY-PUB</type>
+       <passwd>MY-PUB/passwd/</passwd>
+    </map:action>
+  </map:actions>
+ </map:components>
+ ...
+ <map:resources>
+   <map:resource name="login">
+     <map:generate type="serverpages" src="../../content/ac/login.xsp"/>
+     <map:transform src="../../xslt/ac/login.xsl">
+       <map:parameter name="publication_name" value="MY-PUB"/>
+       <map:parameter name="publication_id" value="MY-PUB"/>
+       <map:parameter name="lenya_path" 
value="lenya/pubs/MY-PUB/docs/standard/t01/" />
+     </map:transform>
+     <map:serialize type="html"/>
+   </map:resource>
+ </map:resources>
+ 
+ ]]></code>
+ <code><![CDATA[
+ 
+ <map:match pattern="logout">
+   <map:generate type="serverpages" src="../../content/ac/logout.xsp"/>
+   <map:transform src="../../xslt/ac/logout.xsl">
+     <map:parameter name="publication_name" value="MY-PUB"/>
+   </map:transform>
+   <map:serialize/>
+ </map:match>
+ 
+ ]]></code>
+ </li>
+ <li>
+ Set Name of Publication: lenya/pubs/MY-PUB/stylesheets/lenya/conf/conf.xsl
+ (e.g. 'MY Publication')
+ <code><![CDATA[
+ 
+ <?xml version="1.0"?>
+ <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+  <xsl:include href="../../../Configuration/read.xsl"/>
+  <xsl:variable name="publication">MY Publication</xsl:variable>
+  <xsl:variable name="copyright">copyright &#169; 2002 lenya.org</xsl:variable>
+ </xsl:stylesheet>
+ 
+ ]]></code>
+ </li>
+ <li>
+ Moreover, replace ethz-mat by MY-PUB in following files:<br/>
+ i)   webapp/lenya/content/menus/live.xsp<br/>
+ ii)  webapp/lenya/pubs/MY-PUB/docs/cms/menus/live.xsp<br/>
+ iii) 
webapp/lenya/pubs/MY-PUB/stylesheets/standard/t01/Configuration/read.xsl<br/>
+ iv)  webapp/lenya/pubs/MY-PUB/stylesheets/Configuration/read.xsl<br/>
+ v)   webapp/lenya/pubs/MY-PUB/stylesheets/lenya/edit/root.xsl
+ </li>
+ </ol>
+ </section>
+ <section><title>Adding copied publication to root sitemap</title>
+ <p>
+ </p>
+ <p>
+ File: webapp/sitemap.xmap
+ </p>
+ <source><![CDATA[
+ 
+ <map:match pattern="MY-PUB/**">
+    <map:mount uri-prefix="MY-PUB" src="lenya/pubs/MY-PUB/sitemap.xmap"
+                                  check-reload="true" 
reload-method="synchron"/>
+ </map:match>
+ 
+ ]]></source>
+ </section>
+ </section>
+ <section><title>Adding CM functionalities to an existing publication</title>
+ <section><title>Creating Authoring and Live area</title>
+ <p>
+ </p>
+ <p>
+ to do
+ </p>
+ </section>
+ </section>
+ <section><title>Import content</title>
+ <section><title>Create XSLT from HTML with JTidy</title>
+ <p>
+ </p>
+ <p>
+ export PATH=/usr/local/jdk1.3.1/bin:$PATH <br/>
+ java -classpath 
LENYACMS/build/lenya/classes:LENYACMS/build/lenya/webapp/WEB-INF/lib/jtidy-04aug2000r7-dev.jar
 org.apache.lenya.util.TidyCommandLine
+ </p>
+ </section>
+ </section>
+ <section><title>Regard following items</title>
+ <section><title>Modify EditorMainAction if the html-editor is used</title>
+ <p>
+ </p>
+ <p>
+ Modify 'lenyaPath'in the java-class 
org.apache.lenya.cms.cocoon.acting.EditorMainAction<br/>
+      for instance: String 
lenyaPath="lenya/pubs/MY-PUB/docs/standard/t01/";<br/>
+      and recompile.
+ </p>
+ 
+ </section>
+ </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaXopusEditor , version: 1 on 
Mon Jun 23 15:46:17 2003 by GregorRothfuss

New page created:
+         <p>The <fork href="http://www.q42.nl/products/xopus/";>Xopus 
+         Wysiwyg XML Editor</fork> allows to edit the content of XML files
+         transparently within the Web browser, without confronting the user 
with 
+         xml/xsl tags. It is currently tested to work with IE 5.5 and IE 
6.0.</p> 
+   
+         <p>Xopus communicates with the http server through a series of 
requests, 
+         and expects the server to return appropriate responses. The structure
+         and content of these requests and responses is defined and explained 
below.
+         To integrate Xopus into the Cocoon environment, we need to implement 
an 
+         interface to handle those requests.</p>
+       </section>
+       
+       
+       <anchor id="req-resp"/>
+       <section><title>Xopus requests and responses (the interface)</title>
+           
+         <p>The requests Xopus sends to the server and the responses it 
expects are
+         valid xml streams according to the definitions below.</p>
+   
+               <anchor id="open-file"/>
+               <section><title>Opening a file for editing</title>
+             
+               <p>Xopus uses 3 requests to get the contents 
+               of the corresponding xml, xsl and xsd files for the content to 
be edited. 
+               This file trio follows the well-known MVC 
(Model-View-Controller) pattern:</p>
+             
+               <table>
+                       <tr>
+                 <th>File Type</th>
+                 <th>Extension</th>
+                 <th>Function</th>
+               </tr>
+               <tr>
+                 <td><link href="http://www.w3.org/XML/"; >XML File</link></td>
+                 <td>.xml</td>
+                 <td>Model</td>
+                       </tr>
+                       <tr>
+                 <td><link href="http://www.w3.org/Style/XSL/"; 
>Stylesheet</link></td>
+                 <td>.xsl</td>
+                 <td>View</td>
+                       </tr>
+                       <tr>
+                 <td><link href="http://www.w3.org/XML/Schema"; 
>Schema</link></td>
+                 <td>.xsd</td>
+                 <td>Controller</td>
+                       </tr>
+               </table>
+             
+               <p>The <code> &lt;request&gt; </code> element has always the 
attribute 
+               <code> type="open"</code>, while the <code> &lt;data&gt;</code> 
elements,
+               which are children of the <code> &lt;request&gt;</code> 
elements, 
+               have the attributes <code> type="xml|xsl|xsd"</code>, 
respectively.</p>
+             
+               <p>For each of these requests, Xopus expects the "right" 
responses
+               from the server. These responses are always enclosed in 
+               <code>&lt;response&gt;</code> tags, and should have the same id 
+               as the requests, and an attibute <code>status="ok"</code>. In 
case of an error,
+               the status attribute will be set to "error" and return an error
+               message.</p>
+         
+               <p>After the formal <jump 
href="xopus.html#def_open">definition</jump> of the "open file" dialog,
+               there is a (still somewhat generic) <link 
href="#xmp_open">example</link> to demonstrate 
+               the use of this interface.</p>
+         
+               
+                       <anchor id="def_open"/>
+                               <section><title>Interface definition for the 
open file dialog</title>
+             
+                       <p>Here, we are defining the xml structure of the 
dialog between Xopus and the server 
+                       for opening a file for editing. We have 3 requests, and 
3 corresponding responses, that have to
+                       be exchanged in this order:</p>
+             
+                       <ol>
+                               <li>Request for xml file (Xopus to Server)</li>
+                               <li>Response returning xml file (Server to 
Xopus)</li>
+                               <li>Request for xsl file (Xopus to Server)</li>
+                               <li>Response returning xsl file (Server to 
Xopus)</li>
+                               <li>Request for xsd file (Xopus to Server)</li>
+                               <li>Response returning xsd file (Server to 
Xopus)</li>
+                       </ol>
+             
+                       <p>The structure of these requests and responses is 
defined as:
+             
+                       <em>Request messages (Xopus to Server)</em></p>
+                       <source><![CDATA[
+               
+ <request 
+     type="open" 
+     id="req_<em>path/filename</em>_<em>id</em>">
+   <data 
+       type="xml|xsl|xsd"                           <em><!-- One request for 
each type of data --></em>
+       id=<em>path/filename</em>>
+   </data>
+ </request>
+                       ]]></source>
+             <p>
+                       <em>Response messages (Server to Xopus)</em></p>
+                       <source><![CDATA[
+ <response 
+     id="req_<em>path/filename</em>_<em>id</em>"        <em><!-- Same id as 
the request --></em>
+     status="ok"                                    <em><!-- If no error 
occured --></em>
+     type="open"                                    <em><!-- Same type as the 
request --></em>
+     xmlns:xlink="http://www.w3.org/xlink";>      <em><!-- This is probably 
optional??? --></em>
+   <data 
+       id=<em>path/filename</em>                      <em><!-- Same id as the 
request --></em>
+       type="xml|xsl|xsd">                       <em><!-- Same type as the 
request --></em>
+     <em>Content of path/filename</em>
+   </data>
+ </response>
+                       ]]></source>
+                               </section>
+                               
+                       <anchor id="xmp_open"/>
+                               <section><title>Implementation Example</title>
+             
+                       <p>When everything goes well, i.e. no errors occur, the 
exchange between
+                       Xopus and the server looks like the following 
example:</p>
+             
+                       <ol>
+                               <li><jump href="xopus.html#req-01">Request 1 
(Xopus to Server)</jump></li>
+                               <li><jump href="xopus.html#rsp-01">Response 1 
(Server to Xopus)</jump></li>
+                               <li><jump href="xopus.html#req-02">Request 2 
(Xopus to Server)</jump></li>
+                               <li><jump href="xopus.html#rsp-02">Response 2 
(Server to Xopus)</jump></li>
+                               <li><jump href="xopus.html#req-03">Request 3 
(Xopus to Server)</jump></li>
+                               <li><jump href="xopus.html#rsp-03">Response 3 
(Server to Xopus)</jump></li>
+                       </ol>
+             
+                               <anchor id="req-01"/>
+                               <p><em>Xopus (Request 1):</em></p>
+                               <source><![CDATA[
+ <request 
+     type="open" 
+     id="req_somepath/somedoc.xml_someid">
+   <data 
+       type="xml" 
+       id="somepath/somedoc.xml">
+   </data>
+ </request>
+                               ]]></source>
+                               
+                               <anchor id="rsp-01"/>
+                               <p><em>Server (Response 1):</em></p>
+                               <source><![CDATA[
+ <?xml version="1.0" encoding="utf-8"?>        <em><!-- This is probably not 
needed --></em>
+ 
+ <response 
+     id="req_somepath/somedoc.xml_someid" 
+     status="ok" 
+     type="open" 
+     xmlns:xlink="http://www.w3.org/xlink";>
+   <data 
+       id="somepath/somedoc.xml" 
+       type="xml">
+     <Root>             <em><!-- Start of the requested file's content --></em>
+       ...
+       ...
+       ...           <em><!-- Content of the xml file --></em>
+       ...
+       ...                
+     </Root>            <em><!-- End of the requested file's content --></em>
+   </data>
+ </response>
+                               ]]></source>
+             
+                               <anchor id="req-02"/>
+                               <p><em>Xopus (Request 2):</em></p>
+                               <source><![CDATA[
+ <request 
+     type="open" 
+     id="req_somepath/somestylesheet.xsl_somenewid">
+   <data 
+       type="xml" 
+       id="somepath/somestylesheet.xsl">
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <anchor id="rsp-02"/>
+                               <p><em>Server (Response 2):</em></p>
+                               <source><![CDATA[
+ <?xml version="1.0" encoding="utf-8"?>        <em><!-- This is probably not 
needed --></em>
+ 
+ <response 
+     id="req_somepath/somestylesheet.xsl_somenewid" 
+     status="ok" 
+     type="open" 
+     xmlns:xlink="http://www.w3.org/xlink";>
+   <data 
+       id="somepath/somestylesheet.xsl"
+       type="xsl">
+     <xsl:stylesheet version="1.0"               <em><!-- Start of the 
requested stylesheet's content --></em>
+                        xmlns:xlink="http://www.w3c.org/xlink"; 
+                        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>      
       
+       ...
+       ...
+       ...           <em><!-- Content of the stylesheet --></em>
+       ...
+       ...                
+     </xsl:stylesheet>            <em><!-- End of the requested stylesheet's 
content --></em>
+   </data>
+ </response>
+                               ]]></source>
+             
+                               <anchor id="req-03"/>
+                               <p><em>Xopus (Request 3):</em></p>
+                               <source><![CDATA[
+ <request type="open" 
+          id="req_someschema.xsd_someotherid">
+   <data type="xsd" 
+         id="someschema.xsd">
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <anchor id="rsp-03"/>
+                               <p><em>Server (Response 3):</em></p>
+                               <source><![CDATA[
+ <?xml version="1.0" encoding="utf-8"?>        <em><!-- This is probably not 
needed --></em>
+ 
+ <response id="req_someschema.xsd_someotherid" 
+           status="ok" 
+           type="open" 
+           xmlns:xlink="http://www.w3.org/xlink";>
+   <data id="someschema.xsd" 
+         type="xsd">
+     <Schema xmlns="urn:schemas-microsoft-com:xml-data" 
+             xmlns:dt="urn:schemas-microsoft-com:datatypes" 
+             xmlns:xlink="http://www.w3c.org/xlink";>
+       <AttributeType dt:type="string" name="Id"/>
+       <AttributeType dt:type="string" name="Name"/>
+       <AttributeType default="URL" dt:type="string" name="href"/>
+       <ElementType content="eltOnly" model="closed" name="Bericht">
+         <group order="seq">
+                 <element maxOccurs="1" minOccurs="1" type="Meta"/>
+                 <element maxOccurs="1" minOccurs="1" type="Content"/>
+                 <element maxOccurs="1" minOccurs="0" 
type="WeiterfuehrendeLinks"/>
+         </group>
+       </ElementType>
+       <ElementType content="eltOnly" mo]]><![CDATA[del="closed" name="Meta">
+         <group order="seq">
+                 <element maxOccurs="1" minOccurs="1" 
type="ErscheinungsDatum"/>
+                 <element maxOccurs="1" minOccurs="1" type="ZeitungsRessort"/>
+                 <element maxOccurs="1" minOccurs="1" type="OnlineRessort"/>
+         </group>
+       </ElementType>
+       ...
+       ...
+       ...           <em><!-- Further definitions skipped to improve 
readability --></em>
+       ...
+       ...                
+     </Schema>
+   </data>
+ </response>
+                               ]]></source>
+             
+                               </section>
+           
+                               <section><title>Exception Handling</title>
+  
+                               <p><em>Error (Request for an xml File):</em></p>
+                               <p>When the xml-file is already checked out by 
another user, the response looks like :</p>
+                               <source><![CDATA[
+               <response
+                status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="16">
+                     <title>You are not allowed to edit this document right 
now. </title>
+                     <message>"User 'Lala' started working on it on Wed Jun 19 
14:22:02 </message>
+                   </error>
+                 </response>
+                               ]]></source>
+             
+                               <p><em>Error (Bad data type requested):</em></p>
+                               <p>When the data type isn't one of xml, xsl or 
xsd:</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="2">
+                     <title>No such Type. </title>
+                     <message>data type </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p><em>Error (All Requests):</em></p>
+                               <p>When the identity of the user isn't defined, 
the response looks like :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
get identification from session, check cookies and user! </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When we couldn't detemine the filename for 
request :</p>
+                                <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
determine filename for request </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When the file doesn't exist:</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="4">
+                     <title>No such File. </title>
+                     <message>file </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>An other error occurs</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="3">
+                     <title> File file exists, but an internal error occured. 
</title>
+                     <message>exception message </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               </section>
+               
+                       </section>
+               
+                       <anchor id="checkin-file"/>
+                       <section><title>Checking in the file when finished 
editing</title>
+            
+             
+                       <p>At the end of the editing session, when the user 
clicks on "close", Xopus places a
+                       single request containing the new contents of the 
edited xml file. As the stylesheet 
+                       and the schema are not modified during editing, there 
are no requests for the updating
+                       of these.</p>
+             
+                       <p>Again, here is the <jump 
href="xopus.html#def_checkin">interface definition</jump> and an 
+                       <jump href="xopus.html#xmp_checkin">example</jump> for 
the implementation.</p>            
+             
+                               <anchor id="def_checkin"/>
+                                       <section><title>Interface definition 
for the checkin file dialog</title>
+             
+                               <p><em>Request message (Xopus to 
Server)</em></p>
+                               <source><![CDATA[
+ <request 
+     type="checkin" 
+     id="req_<em>path/filename</em>_<em>id</em>">
+   <data 
+       type="xml"                           <em><!-- Only xml file is checked 
back in --></em>
+       id=<em>path/filename</em>>
+     <em>Content of the editor (current state of path/filename)</em>
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <p><em>Response message (Server to 
Xopus)</em></p>
+                               <source><![CDATA[
+ <response 
+     id="req_<em>path/filename</em>_<em>id</em>"        <em><!-- Same id as 
the request --></em>
+     status="ok"                                    <em><!-- If no error 
occured --></em>
+     type="checkin"                                 <em><!-- Same type as the 
request --></em>
+     xmlns:xlink="http://www.w3.org/xlink";>      <em><!-- This is probably 
optional??? --></em>
+   <data 
+       id=<em>path/filename</em>                      <em><!-- Same id as the 
request --></em>
+       type="xml">                               <em><!-- Same type as the 
request --></em>
+     <em>Content of path/filename</em>
+   </data>
+ </response>
+                               ]]></source>
+           
+                               </section>
+           
+                               <anchor id="xmp_checkin"/>
+                                       <section><title>Implementation 
Example</title>
+            
+             
+                               <p>When everything goes well, i.e. no errors 
occur, the exchange between
+                               Xopus and the server looks like the following 
example:</p>
+             
+                               <p><em>Xopus (Request):</em></p>
+                               <source><![CDATA[
+ <request type="checkin" 
+          id="req_2002/01/17/al/newzzCWKQDEV5-12.nzzoml_1014216332805">
+   <data type="xml" 
+         id="2002/01/17/al/newzzCWKQDEV5-12.nzzoml">
+     <Bericht Id="newzz-2002.01.17-al-newzzCWKQDEV5-12">
+       <id>2002/01/17/al/newzzCWKQDEV5-12</id>
+       <Meta>
+         <ErscheinungsDatum>
+           <Jahr>2002</Jahr>
+           ---- snip ----
+         </ErscheinungsDatum>
+         ---- snip ----
+       </Meta>
+       <Content>
+       ---- snip ----
+       </Content>
+       ---- snip ----
+     </Bericht>
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <p><em>Server (Response):</em></p>
+                               <source><![CDATA[
+ <response id="req_2002/01/17/al/newzzCWKQDEV5-12.nzzoml_1014216332805" 
+           status="ok" 
+           type="checkin" 
+           xmlns:xlink="http://www.w3.org/xlink";>
+   <data id="2002/01/17/al/newzzCWKQDEV5-12.nzzoml" 
+         type="xml">
+     <Bericht Id="newzz-2002.01.17-al-newzzCWKQDEV5-12">
+       <id>2002/01/17/al/newzzCWKQDEV5-12</id>
+       <Meta>
+         <ErscheinungsDatum>
+           <Jahr>2002</Jahr>
+           ---- snip ----
+         </ErscheinungsDatum>
+         ---- snip ----
+       </Meta>
+       <Content>
+       ---- snip ----
+       </Content>
+       ---- snip ----
+     </Bericht>
+   </data>
+ </response>
+                               ]]></source>
+ 
+                               </section>
+           
+                                       <section><title>Exception 
Handling</title>
+                               <p>When the file couldn't be checked in because 
user Lala already 
+                               checked out the document, the response looks 
like :</p>
+                               <source><![CDATA[
+                 <response 
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="17">
+                     <title>You are not allowed to check in this document. 
</title>
+                     <message>"There was a checkout by user 'Lala' at Wed Jun 
19 14:22:02 </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When the identity of the user isn't defined, 
the response looks like :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
get identification from session, check cookies and user! </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When we couldn't detemine the filename for 
request :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number=]]><![CDATA["1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
determine filename for request </message>
+                   </error>
+                 </response>
+                               ]]></source>
+  
+                               </section>
+  
+                               <anchor id="save-file"/>
+                                       <section><title>Save file temporarily 
while continuing editing</title>
+             
+                               <p>This request/response pair performs a 
temporary save of the file being edited. 
+                               From the interface point of view, the only 
difference to the "checkin" transaction
+                               is the <code>type</code> attribute, which is 
set to <code>type="save"</code>.</p>
+                         
+                                       </section>
+             
+                               <anchor id="def_save"/>
+                                       <section><title>Interface definition 
for the save file dialog</title>
+             
+             
+                               <p><em>Request message (Xopus to 
Server)</em></p>
+                               <source><![CDATA[
+ <request 
+     type="save" 
+     id="req_<em>path/filename</em>_<em>id</em>">
+   <data 
+       type="xml"                           <em><!-- Only xml file is saved 
--></em>
+       id=<em>path/filename</em>>
+     <em>Content of the editor (current state of path/filename)</em>
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <p><em>Response message (Server to 
Xopus)</em></p>
+                               <source><![CDATA[
+ <response 
+     id="req_<em>path/filename</em>_<em>id</em>"        <em><!-- Same id as 
the request --></em>
+     status="ok"                                    <em><!-- If no error 
occured --></em>
+     type="save"                                    <em><!-- Same type as the 
request --></em>
+     xmlns:xlink="http://www.w3.org/xlink";>      <em><!-- This is probably 
optional??? --></em>
+   <data 
+       id=<em>path/filename</em>                      <em><!-- Same id as the 
request --></em>
+       type="xml">                               <em><!-- Same type as the 
request --></em>
+     <em>Content of path/filename</em>
+   </data>
+ </response>
+                               ]]></source>
+                               
+                               </section>
+             
+                               <section><title>Exception Handling</title>
+                               <p>When we couldn't write the file :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
write to output file </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When the file hasn't a root element:</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): data node 
does not contain an element node </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               <p>When we couldn't detemine the filename for 
request :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Unable to 
determine filename for request </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               
+                               </section>
+                               
+                       </section>
+             
+                       <anchor id="corr-file"/>
+                               <section><title>Have the content spellchecked 
while continuing editing</title>
+             
+             
+                       <p>This request/response pair performs a spellcheck of 
the file being edited. 
+                       For this transaction, the <code>type</code> attribute 
is set to 
+                       <code>type="checkspelling"</code>, and the misspelled 
words are surrounded by
+                       <code>&lt;span class="spell_error_xopus"&gt;&lt;i&gt; 
&lt;/i&gt;&lt;/span&gt;</code> tags in
+                       the server's response (see <jump 
href="xopus.html#xmp_corr">example</jump> below.</p>
+             
+                               <anchor id="def_corr"/>
+                                       <section><title>Interface definition 
for the spellcheck file dialog</title>
+             
+                               <p><em>Request message (Xopus to 
Server)</em></p>
+                               <source><![CDATA[
+ <request 
+     type="checkspelling" 
+     id="req_<em>path/filename</em>_<em>id</em>">
+   <data 
+       type="xml"
+       id=<em>path/filename</em>>
+     <em>Content of the editor (current state of path/filename)</em>
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <p><em>Response message (Server to 
Xopus)</em></p>
+                               <source><![CDATA[
+ <response 
+     id="req_<em>path/filename</em>_<em>id</em>"        <em><!-- Same id as 
the request --></em>
+     status="ok"                                    <em><!-- If no error 
occured --></em>
+     type="checkspelling"                                    <em><!-- Same 
type as the request --></em>
+     xmlns:xlink="http://www.w3.org/xlink";>      <em><!-- This is probably 
optional??? --></em>
+   <data 
+       id=<em>path/filename</em>                      <em><!-- Same id as the 
request --></em>
+       type="xml">                               <em><!-- Same type as the 
request --></em>
+     <em>Content of the editor (misspelled words tagged)</em>
+   </data>
+ </response>
+                               ]]></source>
+            
+                               </section>
+          
+                               <anchor id="xmp_corr"/>
+                                       <section><title>Implementation 
example</title>
+ 
+                               <p>When everything goes well, i.e. no errors 
occur, the exchange between
+                               Xopus and the server looks like the following 
example:</p>
+             
+                               <p><em>Xopus (Request):</em></p>
+             
+                               <source><![CDATA[
+ <request type="checkspelling" 
+          id="req_2002/01/17/al/newzzCWKQDEV5-12.nzzoml_1014220920281">
+   <data type="xml" 
+         id="2002/01/17/al/newzzCWKQDEV5-12.nzzoml">
+     <Bericht xmlns:xlink="http:/www.w3.org/xlink" 
+              Id="newzz-2002.01.17-al-newzzCWKQDEV5-12">
+       <id>2002/01/17/al/newzzCWKQDEV5-12</id>
+       ---- snip ----
+       <Content>
+         <Head>
+           <Haupttitel>Hallo Herr Korosec</Haupttitel>
+           <Untertitel>Geaenderter Untertitel</Untertitel>
+           <Lead>Geaenderter Lead</Lead>
+           <Meta>
+             <Stichwort>ETH</Stichwort>
+             <Autor>lenya</Autor>
+             ---- snip ----
+           </Meta>
+         </Head>
+         <Text>
+           <Paragraph>
+             <Subparagraph>Absatz geaendert von Memo</Subparagraph>
+           </Paragraph>
+           ---- snip ----
+         </Text>
+         ---- snip ----
+       </Content>
+     </Bericht>
+   </data>
+ </request>
+                               ]]></source>
+             
+                               <p><em>Server (Response):</em></p>
+ 
+                               <source><![CDATA[
+ <response id="req_2002/01/17/al/newzzCWKQDEV5-12.nzzoml_1014220920281" 
+           status="ok" 
+           type="checkspelling" 
+           xmlns:xlink="http://www.w3.org/xlink";>
+   <data id="2002/01/17/al/newzzCWKQDEV5-12.nzzoml" 
+         type="xml">
+     <Bericht Id="newzz-2002.01.17-al-newzzCWKQDEV5-12" 
+              xmlns:xlink="http:/www.w3.org/xlink">
+       <id>2002/01/17/al/newzzCWKQDEV5-12</id>
+       ---- snip ----
+       <Content xmlns:xlink="http://www.w3.org/xlink";>
+         <Head>
+           <Haupttitel>Hallo Herr <span 
class="spell_error_xopus">Korosec</span></Haupttitel>
+           <Untertitel><span class="spell_error_xopus">Geaenderter</span> 
Untertitel</Untertitel>
+           <Lead><span class="spell_error_xopus">Geaenderter</span> Lead</Lead>
+           <Meta>
+             <Stichwort>ETH</Stichwort>
+             <Autor>lenya</Autor>
+             ---- snip ----
+           </Meta>
+         </Head>
+         <Text>
+           <Paragraph>
+             <Subparagraph>Absatz <span 
class="spell_error_xopus">geaendert</span> von Memo</Subparagraph>
+           </Paragraph>
+           ---- snip ----
+         </Text>
+         ---- snip ----
+       </Content>
+     </Bericht>
+   </data>
+ </response>
+                               ]]></source>
+           
+                               </section>
+               
+                               <section><title>Exception Handling</title>
+ 
+                               <p>When no spell checker is defined :</p>
+                               <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): Spell 
check request received, but there is no spell checker defined </message>
+                   </error>
+                 </response>
+                               ]]></source>
+                               </section>
+             
+                       </section>
+           
+                       <anchor id="exception"/>
+                               <section><title>Exception handling</title>
+            
+                       <p>When the request type is unknown, the response looks 
like:</p>                                                   
+                       <source><![CDATA[
+                 <response
+                 status="error"
+               ]]><![CDATA[  xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="5">
+                     <title>The client sent an unknown request type. </title>
+                     <message> </message>
+                   </error>
+                 </response>
+                       ]]></source>
+ 
+                       <p>When an other exception occurs, the response looks 
like:</p>
+                       <source><![CDATA[
+                 <response
+                 status="error"
+                 xmlns:xlink="http://www.w3.org/xlink";>
+                   <error
+                   number="1">
+                     <title>An internal error has occurred: </title>
+                     <message>Caught exception in dispatchRequest(): error 
message </message>
+                   </error>
+                 </response>
+                       ]]></source>
+                       
+                       </section>
+               </section>
+ 
+ 
+ 
+                       <anchor id="navigation_bar"/>
+                       <section><title>Navigation Bar and Edit/Open 
Button</title>
+       
+                       <p>The Xopus navigation bar can be modified by editing 
the stylesheet <code> xopus.xsl</code> (Currently located at
+                       
<code>resources/html/scratchpad/xopus/stylesheets</code>).
+                       The Edit/Open Button can be modified by editing the 
Javascript function createEditButton within
+                       the script <code> 
PREFIX/tomcat/webapps/ROOT/xps/xopus/init.js</code>.
+                       </p>
+               </section>
+ 
+               
+                       <anchor id="locationXopus"/>
+               <section><title>Location of Xopus</title>
+                       <p>Because Xopus is not Open Source yet, you won't find 
it within the snapshot
+                       or CVS. You will have to ask <link 
href="http://www.q42.nl";>Q42</link> to receive a version.
+                       If you have a version, then you have to place it within 
the ROOT directory of Tomcat, i.e.
+                       <code>PREFIX/tomcat/webapps/ROOT/xps/xopus</code>.
+                       </p>
+               </section>
+ 
+               
+                       <anchor id="confRequestURL"/>
+               <section><title>Configuration of requested URL by the client 
Xopus</title>
+                       <p>The requested URL is configured within two files:
+                       <br/>
+                       
<code>PREFIX/tomcat/webapps/ROOT/xps/xopus/init.js</code>
+                       <br/>
+                       
<code>PREFIX/tomcat/webapps/ROOT/xps/xopus/logic/index.js</code>
+                       <br/>
+                       For the time being it is 
<code>/lenya/ethz-mat/xopus/XopusInterface</code>
+                       </p>
+               </section>
+ 
+                       <anchor id="setupCms"/>
+               <section><title>Setting up the Lenya CMS for Xopus</title>
+                       <ol>
+               <li>
+               Route all Xopus requests to the handler<br/>
+               For this purpose, we are sending all requests matching 
"xopus/**" to a subsitemap, 
+               called <code>xopus.xmap</code>, where they are first routed 
through
+               an action, the <code>XopusHandlerAction</code>.
+               </li>
+               <li>
+               Handle the requests<br/>
+               The handler is responsible for decoding the attributes of
+               the request and supplying them to the sitemap, and for handling 
file operations (i.e. saving), 
+               when needed. Check out the source source for more info.
+               </li>
+               <li>
+               Provide the responses to Xopus<br/>
+               Using the request parameters (supplied by the handler), the 
response 
+               to Xopus is formatted through a generic stylesheet, 
<code>xopus_resp.xsl</code>.
+               </li>
+               </ol>
+               </section> 
+       
+       
+                       <anchor id="hookers"/>
+               <section><title>Hooking Xopus to an existing page</title>
+               <p>To make a page of a publication available for editing with 
Xopus, follow the
+               example of the Department page of the ETHZ-Mat publication:</p>
+               <ol>
+               <li>
+               Create <code>main_xopus.xsl</code><br/>
+               Make a copy of the existing <code>main.xsl</code> and change 
the include statement for 
+               <code>root.xsl</code> to <code>root_xopus.xsl</code>.
+               </li>
+               <li>
+               Edit the authoring (protected) sitemap<br/>
+               Change the authoring stylesheet for the page to another 
version. Don't forget to check 
+               for the browser first, Xopus works only with IE 5.5 or later! 
<br/>
+               For an example, look at the Department Authoring snippet, where 
the 
+               <code>stylesheets/ethz/mat/Department/authoring/main.xsl</code> 
stylesheet
+               is replaced by 
<code>stylesheets/ethz/mat/Department/authoring/main_xopus.xsl</code>.
+               </li>
+               <li>
+               Edit <code>body.xsl</code><br/>
+                 Add the call to Xopus to the element of the page that you 
want to edit. The easiest way to do this
+               is to enwrap the portion that you want to make editable in a 
<code>&lt;div ...&gt;...&lt;/div&gt;</code>
+               statement containing the specific attributes to call Xopus. For 
example:
+               <code><![CDATA[
+ <div id_xopus="dept" 
+         xml_xopus="index.xml" 
+         xsl_xopus="Department/Edit/xopus.xsl" 
+         xsd_xopus="department.xsd">
+   <span class="CONTALBLETITLE">Chairman</span>
+   <table border="1" cellspacing="0" cellpadding="2">
+     <tr>
+       <td><a class="CONTABLELINK" href="">Department</link></td>
+       <td><a class="CONTABLELINK" 
href="mailto:{chairman/email}";><xsl:value-of 
select="chairman/name"/></link></td>
+       <td><a class="CONTABLELINK" 
href="mailto:{chairman/email}";><xsl:value-of 
select="chairman/email"/></link></td>
+     </tr>
+   </table>
+ </div>
+               
+               ]]></code> 
+ The file paths must be relative to the "root paths" for each filetype, as 
defined in the 
+             <code>xopus.xmap</code> for the <code>xopushandler</code>. Also, 
do not use template calls in this
+             stylesheet, as Xopus does not seem to handle those well.
+               </li>
+               <li>
+               Create the schema<br/>
+               For an example, see 
<code>config/doctypes/schemas/department.xsd</code>.
+               </li>
+               </ol>
+               </section>
+ 
+ 
+ Xopus has been developed originally by Lon Boonen and Kars Veling from <link 
href="http://www.q42.nl";>Q42</link>.
+ The project is hosted at <link 
href="http://www.xopus.org";>http://www.xopus.org</link>.
+ </p>
+ </section>
+ 
+ 
+ <section><title>Browser Requirements and Remarks</title>
+ <section><title>Mozilla</title>
+ <p>
+ You need Mozilla 1.0 (at least Release Candidate 3) to run Xopus on Windows 
and Mac OS X.
+ When you have opened a Document which you want to edit, then type F7 to turn 
on caret mode, which
+ allows you to edit text within the Browser Window.
+ </p>
+ </section>
+ 
+ 
+ <section><title>Microsoft's Internet Explorer</title>
+ <p>
+ On Windows you need IE5.5 or IE6.x and you have to install MSXML4.0 from 
Microsoft.
+ To install MSXML4.0 you can click <link 
href="http://www.lenya.org/msxml4/index.html";>here</link>.
+ Unfortunately IE does NOT work on Mac OS X.
+ </p>
+ </section>
+ </section>
+ 
+ 
+ <section><title>Open/Edit and Save</title>
+ <p>
+ The Open/Edit and Save functionality are implemented by the javascript 
"xopusPlugins/databasedriver.js".
+ This Read/Write interface is initialized within the javascript 
"xopus/xopus.js".
+ Lenya has its own implementation of the databasedriver, which allows to read 
from and write
+ to the server via HTTP POST and XML.
+ </p>
+ <section><title>Xopus Default Driver</title>
+ <p>
+ Open/Edit is done by HTTP GET requests.
+ </p>
+ <p>
+ How does Save work?
+ </p>
+ </section>
+ <section><title>Lenya Driver</title>
+ <p>
+ The Lenya databasedriver reads from and writes to the server via HTTP POST 
and XML.
+ More information on the exchanged XML can be found at <link 
href="xopus.html#req-resp">here</link>.
+ </p>
+ <p>
+ HTML which tells the Browser to load Xopus and the required data (XML, XSLT, 
XSD):</p>
+ <source><![CDATA[
+ 
+ <html>
+ <head>
+   <script language="javascript" 
src="{$xopus_prefix}/xopus/xopus.js">;</script>
+   <script language="javascript">
+     xopus_consts.LENYA_CMS_URL="<xsl:value-of select="$context_pubprefix" 
/>/xopus/XopusInterface";
+   </script>
+   ...
+ </head>
+ <body>
+ ...
+ </body>
+ </html>
+ 
+ ]]></source>
+ <p>where for instance $xopus_prefix=/software and 
$context_pubprefix=/lenya/unipublic
+ </p>
+ <p>
+ Sitemap Component:
+ org.apache.lenya.cms.cocoon.acting.XopusHandlerAction</p>
+ <source><![CDATA[
+ 
+ <map:action name="xopushandler" 
src="org.apache.lenya.cms.cocoon.acting.XopusHandlerAction" 
logger="sitemap.action.xopus-handler">
+   <xml href="content/authoring"/>
+   <xsl href="stylesheets/publication"/>
+   <xsd href="config/doctypes/schemas"/>
+   <temp href="temp"/>
+ </map:action>
+ 
+ ]]></source>
+ <p>
+ Sitemap Pipeline:</p>
+ <source><![CDATA[
+ 
+ <map:pipeline>
+ 
+   <map:match pattern="XopusInterface">
+     <map:act type="xopushandler">
+       <map:generate src="{reqFilePath}"/>
+       <map:transform src="../../xslt/xopus/response.xsl">
+         <map:parameter name="reqId" value="{reqId}"/>
+         <map:parameter name="reqType" value="{reqType}"/>
+         <map:parameter name="reqFile" value="{reqFile}"/>
+         <map:parameter name="fileType" value="{fileType}"/>
+       </map:transform>
+       <map:serialize type="xml"/>
+     </map:act>
+     <map:generate src="../../content/xopus/error.xml"/>
+     <map:serialize type="xml"/>
+   </map:match>
+       
+   <!-- Error handling -->
+   <map:handle-errors>
+     <map:transform src="context://stylesheets/system/error2html.xsl"/>
+     <map:serialize status-code="500"/>
+   </map:handle-errors>
+     
+ </map:pipeline>
+ 
+ ]]></source>
+ <p>
+ FIXME:
+ org.apache.lenya.cms.cocoon.acting.XopusHandlerAction: root.getFirstChild() 
doesn't work if the Client (Browser Editor) sends white space and line breaks 
between two elements. There's no problem with Xopusection actually, but the 
problem occured with the Bitflux editor, although it has been fixed in the case 
of the Bitflux editor. But it should be fixed nevertheless!
+ </p>
+ </section>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=Lenya , version: 24 on Mon Jun 23 
15:31:09 2003 by GregorRothfuss

- * [WyonaAdministratorGuide]


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaPerformane , version: 1 on 
Mon Jun 23 15:39:18 2003 by GregorRothfuss

New page created:
+ Performance</title>
+       <p>
+       Check out <fork
+       href="http://xml.apache.org/cocoon/performancetips.html";>Cocoons
+       own set of performance tips</fork>.</p>
+ 
+                       <section><title>Cocoon Performance</title>
+               <ol>
+               <li>Set all "check-reload" attributes within all sitemaps to 
"false"</li>
+               <li>Set all "log-level" attributes within WEB-INF/logkit.xconf 
to "ERROR"</li>
+               </ol>
+               </section>
+       
+               <section><title>Tomcat performance</title>
+               <ol>
+               <li>Set attribute "reloadable" of Context lenya to "false" 
within conf/server.xml</li>
+               </ol>
+               </section>
+               
+               <section><title>Load Test with Apache's ab</title>
+               <p>
+               The following load tests were executed on a PC with
+               1GHz AMD processor, 1GB RAM, Kernel 2.4, jdk1.3.1, Tomcat 
4.0.1, Cocoon 2.0.1
+               </p>
+               <p>
+               <code>nohup /usr/local/apache/bin/ab -n 100000 -c 3 
http://localhost:8080/lenya/ethz-mat/live/index.html </code><br/>
+               </p>
+ 
+                       <section><title>Test 1</title>
+                       <p>
+                       No performace tips applied<br/>
+                       Number of Requests: 100000<br/>
+                       Concurrency: 1<br/>
+                       Result (nohup.out):<br/></p>
+                       <source><![CDATA[
+                       
+ This is ApacheBench, Version 1.3d <$Revision: 1.4 $> apache-1.3
+ Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
+ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
+ 
+ Benchmarking 194.191.122.220 (be patient)
+ 
+ Server timed out
+ 
+ : Operation now in progress
+ This is ApacheBench, Version 1.3d <$Revision: 1.4 $> apache-1.3
+ Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
+ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
+ 
+ Benchmarking 194.191.122.220 (be patient)
+ Completed 10000 requests
+ Completed 20000 requests
+ Completed 30000 requests
+ Completed 40000 requests
+ Completed 50000 requests
+ Completed 60000 requests
+ Completed 70000 requests
+ Completed 80000 requests
+ Completed 90000 requests
+ Finished 100000 requests
+ Server Software:        Apache
+ Server Hostname:        194.191.122.220
+ Server Port:            8080
+ 
+ Document Path:          /lenya/ethz-mat/live/index
+ Document Length:        8340 bytes
+ 
+ Concurrency Level:      1
+ Time taken for tests:   9212.161 seconds
+ Complete requests:      100000
+ Failed requests:        0
+ Broken pipe errors:     0
+ Keep-Alive requests:    0
+ Total transferred:      849200000 bytes
+ HTML transferred:       834000000 bytes
+ Requests per second:    10.86 [#/sec] (mean)
+ Time per request:       92.12 [ms] (mean)
+ Time per request:       92.12 [ms] (mean, across all concurrent requests)
+ Transfer rate:          92.18 [Kbytes/sec] received
+ 
+ Connnection Times (ms)
+               min  mean[+/-sd] median   max
+ Connect:        0     0    0.2      0    68
+ Processing:    74    92   56.2     84   666
+ Waiting:        0    70   59.8     81   618
+ Total:         74    92   56.2     84   666
+ 
+ Percentage of the requests served within a certain time (ms)
+   50%     84
+   66%     85
+   75%     85
+   80%     85
+   90%     86
+   95%     87
+   98%     96
+   99%    522
+  100%    666 (last request)
+                       
+                       ]]></source>
+                       </section>
+                       
+                       <section><title>Test 2</title>
+                       <p>
+                       No performace tips applied<br/>
+                       Number of Requests: 100000<br/>
+                       Concurrency: 3<br/>
+                       Result (nohup.out):<br/></p>
+                       <source><![CDATA[
+                       
+ This is ApacheBench, Version 1.3d <$Revision: 1.4 $> apache-1.3
+ Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
+ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
+ 
+ Benchmarking 194.191.122.220 (be patient)
+ Completed 10000 requests
+ Completed 20000 requests
+ Completed 30000 requests
+ Completed 40000 requests
+ Completed 50000 requests
+ Completed 60000 requests
+ Completed 70000 requests
+ Completed 80000 requests
+ Completed 90000 requests
+ Finished 100000 requests
+ Server Software:        Apache
+ Server Hostname:        194.191.122.220
+ Server Port:            8080
+ 
+ Document Path:          /lenya/ethz-mat/live/index
+ Document Length:        8340 bytes
+ 
+ Concurrency Level:      3
+ Time taken for tests:   9951.852 seconds
+ Complete requests:      100000
+ Failed requests:        0
+ Broken pipe errors:     0
+ Keep-Alive requests:    0
+ Total transferred:      849216384 bytes
+ HTML transferred:       834016080 bytes
+ Requests per second:    10.05 [#/sec] (mean)
+ Time per request:       298.56 [ms] (mean)
+ Time per request:       99.52 [ms] (mean, across all concurrent requests)
+ Transfer rate:          85.33 [Kbytes/sec] received
+ 
+ Connnection Times (ms)
+               min  mean[+/-sd] median   max
+ Connect:        0    15   24.1      1   209
+ Processing:    75   283  142.7    250  1093
+ Waiting:        0   264  151.5    235  1092
+ Total:         75   298  140.6    267  1093
+ 
+ Percentage of the requests served within a certain time (ms)
+   50%    267
+   66%    314
+   75%    344
+   80%    361
+   90%    432
+   95%    654
+   98%    768
+   99%    816 
+  100%   1093 (last request)
+                       
+                       ]]></source>
+                               </section>
+               </section>
+     </section>
+ 


Page: http://wiki.cocoondev.org/Wiki.jsp?page=WyonaDirectoryStructure , 
version: 1 on Mon Jun 23 15:31:35 2003 by GregorRothfuss

New page created:
+ Directory Structure</title> 
+ 
+ <p>
+   The directory structure of the Lenya-CMS has to facilitate the needs of 
specific
+   user groups at different stages:
+ </p>
+   <ol>
+     <li>Developpers of the Lenya-CMS</li>
+     <li>Users of the Lenya-CMS, including</li>
+     <ol>
+       <li>Administrators</li>
+       <li>Authors</li>
+       <li>Designers</li>
+       <li>Publishers</li>
+     </ol>
+   </ol>
+ <p>
+   A temptative directory tree is provided here as a basis for further 
discussion:</p>
+   <ul>
+     <li><strong>cms</strong> (the generic CMS framework, i.e. Lenya-CMS)</li>
+     <ul>
+       <li><strong>src</strong></li>
+       <ul>
+         <li>This directory contains all files pertaining to the content 
management
+         system itself, independent of any instance (i.e. the pubs 
directories).</li>
+       </ul>
+       <li><strong>config</strong> (default configuration, to be overridden by 
the files of 
+       each actual publication)</li>
+       <ul>
+         <li>users.xml (users and their roles)</li>
+         <li>roles.xml (authorization management for roles)</li>
+         <li>sitedef.xml (site structure management, like tree.xml)</li>
+         <li><strong>pages</strong> (contains descriptor files for each 
page)</li>
+         <ul>
+           <li>pd000001.xml</li>
+           <li>pd000002.xml</li>
+           <li>...</li>
+         </ul>
+       </ul>
+     </ul>
+     <li><strong>pubs</strong> (the actual publications)</li>
+     <ul>
+       <li><strong>pub00001</strong> (a specific publication - similar to a 
virtual host)</li>
+       <ul>
+         <li><strong>config</strong> (all configuration files, they override 
the defaults 
+         in the cms directory)</li>
+         <ul>
+           <li>users.xml (users and their roles)</li>
+           <li>roles.xml (authorization management for roles)</li>
+           <li>sitedef.xml (site structure management, like tree.xml)</li>
+           <li><strong>pages</strong> (contains descriptor files for each 
page)</li>
+           <ul>
+             <li>pd000001.xml</li>
+             <li>pd000002.xml</li>
+             <li>...</li>
+           </ul>
+         </ul>
+         <li><strong>content</strong></li>
+         <ul>
+           <li><strong>staging</strong></li>
+           <ul>
+             <li>URI-tree according to sitedef.xml ...</li>
+           </ul>
+           <li><strong>live</strong></li>
+           <ul>
+             <li>URI-tree according to sitedef.xml ...</li>
+           </ul>
+         </ul>
+         <li><strong>design</strong></li>
+         <ul>
+           <li><strong>staging</strong></li>
+           <ul>
+             <li>URI-tree according to sitedef.xml ...</li>
+           </ul>
+           <li><strong>live</strong></li>
+           <ul>
+             <li>URI-tree according to sitedef.xml ...</li>
+           </ul>
+         </ul>
+       </ul>
+       <li><strong>pub00002</strong> (another specific publication - similar 
to a virtual host)</li>
+       <ul>
+         <li><strong>...</strong></li>
+       </ul>
+     </ul>
+   </ul>
+ 
+ </section>
+ 


Reply via email to