You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/11/16 16:12:50 UTC

svn commit: r595691 [19/28] - in /lenya/sandbox/pubs/docu: config/ content/authoring/ content/authoring/0033e320-8731-11dc-ae46-9e7b5d14892d/ content/authoring/018a9980-8731-11dc-ae46-9e7b5d14892d/ content/authoring/02f9e0f0-8731-11dc-ae46-9e7b5d14892d...

Added: lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221904892.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221904892.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221904892.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221904892.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>AbstractUsecase</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a1297160-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221904892" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221883976"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910792341" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910765431"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781627135" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.1195221895605.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.1195221895605.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.1195221895605.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.1195221895605.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>Publication Configuration</title> 
+  </header>
+  <body>
+    
+    <section>
+      <title>The publication.xml file</title>
+      <p>
+        The main configuration file of a publication is <code>$PUB_HOME/config/publication.xml</code>.
+        The namespace of this XML file is <code>http://apache.org/cocoon/lenya/publication/1.1</code>.
+      </p>
+      <source xml:space="preserve"><![CDATA[<publication xmlns="http://apache.org/cocoon/lenya/publication/1.1" >]]></source>
+      <p>
+        The first section contains some meta data about the publication which is
+        displayed on overview pages etc.
+      </p>
+      <source xml:space="preserve"><![CDATA[  <name>Default Publication</name>
+  <description>This publication is a best practice, getting started publication.</description>
+  <!-- the @...@ macros are evaluated by ant at build time -->
+  <version>@lenya.version@</version>
+  <lenya-version>@lenya.version@</lenya-version>
+  <lenya-revision>@lenya.revision@</lenya-revision>
+  <cocoon-version>2.1.10-dev</cocoon-version>]]></source>
+      <p>
+        In the languages section you define which content languages should be
+        supported. Exactly one language has to be identified as the default
+        language.
+      </p>
+  <!-- NOTE: The various languages need to be listed for verification and widget building -->
+      <source xml:space="preserve"><![CDATA[  <languages>
+    <language default="true">en</language>
+    <language>de</language>
+    <language>he</language>
+    <language>es</language>
+    <language>fr</language>
+  </languages>]]></source>
+      <p>
+        The following section declares service implementations which are used
+        by the publication.
+      </p>
+      <ul>
+        <li>The <code>template-instantiator</code> element references an <code>Instantiator</code> declaration in
+          <code>cocoon.xconf</code>.</li>
+        <li>The <code>path-mapper</code> element declares the <code>DocumentIdToPathMapper</code> implementation
+          which is used by this publication.</li>
+        <li>The <code>document-builder</code> element references a <code>DocumentBuilder</code> declaration in
+          <code>cocoon.xconf</code>.</li>
+        <li>The <code>site-manager</code> element references a <code>SiteManager</code> declaration in
+          <code>cocoon.xconf</code>.</li>
+      </ul>
+      <source xml:space="preserve"><![CDATA[  <template-instantiator name="default"/>
+  <path-mapper>org.apache.lenya.cms.publication.DefaultDocumentIdToPathMapper</path-mapper>
+  <document-builder name="default"/>
+  <site-manager name="tree"/>]]></source>
+  
+      <p>
+        The <code>resource-types</code> section declares all resource types which are
+        used by this publication and assigns them workflow schemas. When the "Create"
+        usecase is invoked without a parameter denoting the resoure type, you can
+        present a list of all these resource types to choose from (this is the default
+        behaviour).
+      </p>
+      <source xml:space="preserve"><![CDATA[  <resource-types>
+    <resource-type name="xhtml" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="homepage" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="links" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="cforms" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="opendocument" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="resource" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="usecase" workflow="fallback://config/workflow/workflow.xml"/>
+  </resource-types>]]></source>
+  
+      <p>
+        The <code>modules</code> section declares all modules which are used by this
+        publication. This is necessary to generate the menus accordingly and to access
+        the i18n messages from these modules.
+      </p>
+      <source xml:space="preserve"><![CDATA[  <modules>
+    <module name="editors"/>
+    <module name="xhtml"/>
+    <module name="links"/>
+    <module name="opendocument"/>
+    <module name="cforms"/>
+    <module name="homepage"/>
+    <module name="resource"/>
+    <module name="sitemanagement"/>
+    <module name="sitetree"/>
+    <module name="export"/>
+    <module name="workflow"/>
+    <module name="notification"/>
+    <module name="svg"/>
+    <module name="lucene"/>
+    <module name="development"/>
+    <module name="languageselector"/>
+    <module name="administration"/>
+    <module name="workflow"/>
+  </modules>]]></source>
+
+      <p>
+        The optional <code>content-dir</code> element points to the parent directory
+        of the publications <code>content</code> directory. You can use either an
+        absolute file system path, or a path relative to the web application context
+        (e.g. <code>lenya/pubs/default</code>). 
+      </p>
+      <source xml:space="preserve"><![CDATA[  <content-dir src="/home/USERNAME/data/default"/>]]></source>
+      <p>
+        The optional <code>proxies</code> section contains the proxy configuration
+        of this publication. For more information see <a href="lenya-document:1f62d3f0-8731-11dc-ae46-9e7b5d14892d">Proxying</a> and the <a href="lenya-document:ff0240f0-8730-11dc-ae46-9e7b5d14892d">turorial</a>.
+      </p>
+      <p> In short the idea of the following proxy snippet in the configuration is a rewrite of links.
+        Using proxies will prefix all absolute links (starting with
+        <strong>"/"</strong>) to absoult urls (the proxy host). </p>
+      <source xml:space="preserve"><![CDATA[  <proxies>
+    <proxy area="live" ssl="true" url="https://www.host.com/ssl/default"/>
+    <proxy area="live" ssl="false" url="http://www.host.com/default"/>
+    <proxy area="authoring" ssl="true" url="https://www.host.com/lenya/default/authoring"/>
+    <proxy area="authoring" ssl="false" url="http://www.host.com/lenya/default/authoring"/>
+  </proxies>]]></source>
+      <p>Since we have the concept of areas we define the proxy per area and for the different
+        types of pages (ssl protected or not). For example if a link points to a document in the
+        live area and this document is ssl protected then it will be rewritten to
+        <code>"https://www.host.com/ssl/default{$link}"</code>. Where {$link} is the linked
+        document.</p>
+      <p>For all links that are not pointing to a document the global proxy rule in <code>cocoon.xconf/cocoon/component[@role = 'org.apache.lenya.cms.linking.GlobalProxies']</code> is applied (see <code>$LENYA_HOME/src/modules-core/linking/config/cocoon-xconf/globalproxies.xconf</code>):
+      </p>
+      <source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon" unless="/cocoon/component[@role = 'org.apache.lenya.cms.linking.GlobalProxies']">
+          <component logger="lenya.proxy"
+                     role="org.apache.lenya.cms.linking.GlobalProxies"
+                     class="org.apache.lenya.cms.linking.impl.GlobalProxiesImpl">
+            <!--
+                <proxy ssl="false" url="http://cms.host.com/foo"/>
+                <proxy ssl="true" url="https://cms.host.com/foo"/>
+            -->
+          </component>
+        </xconf>]]></source>
+      <p>
+        For
+        example a link such as
+        <code>/modules/myModule/somePath/some.thing</code> will be rewritten to
+        <code>
+          http://cms.host.com/foo/modules/myModule/somePath/some.thing</code>
+        . In short
+        <code>"/"</code> will be replaced with {proxies/@root}. 
+      </p>
+      <source xml:space="preserve"><![CDATA[</publication>]]></source>
+    </section>
+    
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895605.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895605.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895605.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895605.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Configuration</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a26d8a20-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221895605" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221883188"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910779757" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910765509"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781630928" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.1195221902227.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.1195221902227.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.1195221902227.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.1195221902227.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>Publication Templating</title> 
+  </header>
+  <body>
+    
+    <section>
+      <title>What is Publication Templating?</title>
+      <p>
+        Imagine you are a company or organisation with some departments which want to edit
+        their content using a Lenya-based CMS. All departments use similar publications,
+        sharing lots of functionality. The layout is based on a common corporate identity,
+        but some departments want to use their own logo or tweak the navigation menu style.
+      </p>
+      <p>
+        If all departments develop their own publications, it will be very hard to keep them
+        consistent, to add changes to all publications or to update them to a newer Lenya version.
+        This can be simplified using publication templates. You define a base (template) publication
+        which all others are derived from.         
+      </p>
+      
+<source xml:space="preserve">
+                        +----------------------+
+                        | Template Publication |
+                        +----------------------+
+                                    |
+           +-----------------+------+---------------------+
+           |                 |                            |
+   +--------------+  +--------------+             +--------------+
+   | Department A |  | Department B |     ...     | Department X |
+   +--------------+  +--------------+             +--------------+
+</source>     
+
+      <p>Multiple layers of templates are supported.</p>
+
+<source xml:space="preserve">
+                    +--------------------------------+
+                    | University Website Publication |
+                    +--------------------------------+
+                                    |
+           +-----------------+------+------------------------+
+           |                 |                               |
+   +------------+  +--------------------+             +-------------+
+   | Uni Zurich |  | Harvard University |     ...     | UC Berkeley |
+   +------------+  +--------------------+             +-------------+
+                             |
+              +----------+---+-----------+
+              |          |               |
+        +----------+  +-----+       +---------+
+        | Business |  | Law |  ...  | Medical |
+        +----------+  +-----+       +---------+
+</source>
+ 
+    </section>
+    
+    <section>
+      <title>The Concept of Publication Templating</title>
+      
+      <ul>
+        <li>There is a publication <em>my-pub</em>.</li>
+        <li>It depends on a template which is called <em>template(my-pub)</em>.</li>
+        <li>When a file is requested using the templating mechanism (<code>fallback://xslt/page2xhtml.xsl</code>),
+            it is searched in a certain traversing order:
+          <ol>
+            <li>
+<code>context://lenya/pubs/my-pub/xslt/page2xhtml.xsl</code>
+</li>
+            <li>
+<code>context://lenya/pubs/template(my-pub)/xslt/page2xhtml.xsl</code>
+</li>
+            <li>
+<code>context://lenya/pubs/template(template(my-pub))/xslt/page2xhtml.xsl</code>
+</li>
+            <li>...</li>
+            <li>
+<code>context://xslt/page2xhtml.xsl</code>
+</li>
+          </ol>
+        </li>
+      </ul>
+      
+      <p>
+        The publication <em>my-pub</em> is called an <strong>instance</strong> of the publication <em>template(my-pub)</em>.
+        Note that, in contrast to the fallback mechanism in Lenya 1.2, the prefix <code>lenya</code> is not used,
+        but the path is resolved relatively to the <code>context://</code> root. 
+      </p>
+      
+    </section>
+    
+    <section>
+      <title>Declaration of a Template</title>
+      <p>The template of a publication is declared in <code>my-pub/config/publication.xml</code>:</p>
+      
+<source xml:space="preserve"><![CDATA[<publication>
+  ...
+  <templates>
+    <template id="my-template"/>
+  </templates>
+  ...
+</publication>]]></source>
+    </section>
+    
+    <section>
+      <title>Usage</title>
+      <p>To invoke publication templating, it is necessary to use the <code>fallback://</code>
+      protocol for all relevant files. For an XSLT stylesheet, the according pipeline looks as follows:</p>
+      
+      <source xml:space="preserve"><![CDATA[<map:transform src="fallback://xslt/doctypes/doctype2xhtml.xsl">]]></source>
+    </section>
+    
+    <section>
+      <title>XSLT Include and Import</title>
+      <p>
+        To leverage the publication templating concept, it is necessary to apply it to included
+        or imported stylesheets as well. Fortunately, we can make use of the <code>fallback://</code>
+        protocol in XSLT stylesheets. At the moment, this only works with Xalan which means you
+        have to use this one as the default transformer.
+      </p>
+      <source xml:space="preserve"><![CDATA[<xsl:include href="fallback://header.xsl"/>]]></source>
+      <p>
+        To simplify overriding of XSLT stylesheets, it would be useful to import the template
+        stylesheet. For this purpose, an additional template source factory could be used, which
+        skips the current publication when resolving the file:
+      </p>
+      <source xml:space="preserve"><![CDATA[<xsl:import href="template://template/xslt/common/header.xsl"/>]]></source>
+    </section>
+    
+    <section>
+      <title>Sitemaps</title>
+      <p>
+        If a sitemap is loaded from a template publication, it is very important that the sitemap
+        is completely fallback-enabled. Otherwise, the source resolver will resolve sources relatively
+        to the template sitemap instead of using the overridden ones.
+      </p>
+      <p>
+        In <code>lenya/global-sitemap.xmap</code>, all publication sitemaps are mounted
+        using the fallback module, for instance
+      </p>
+      <source xml:space="preserve"><![CDATA[<!-- Enter the actual publication -->
+<map:match pattern="*/**">
+  <map:mount uri-prefix="{1}" src="{fallback:sitemap.xmap}"/>
+</map:match>]]></source>
+    </section>
+    
+    <section>
+      <title>Usecases</title>
+      <p>
+        The <a href="lenya-document:9ffa4030-8730-11dc-ae46-9e7b5d14892d">usecase framework</a>
+        supports publication templating by default.
+      </p>
+      <p>
+        If you can't (or don't want to) use the usecase framework, you have to implement
+        your own usecase sitemap. The traversing order for usecase sitemaps is
+      </p>
+      <ol>
+        <li>
+<code>context://lenya/pubs/my-pub/usecase.xmap</code>
+</li>
+        <li>
+<code>context://lenya/pubs/template(my-pub)/usecase.xmap</code>
+</li>
+        <li>
+<code>context://lenya/pubs/template(template(my-pub))/usecase.xmap</code>
+</li>
+        <li>...</li>
+        <li>
+<code>context://lenya/usecase.xmap</code>
+</li>
+      </ol>
+      <p>
+        This behaviour is achieved by the usecase fallback module which is called in <code>global-sitemap.xmap</code>:
+      </p>
+<source xml:space="preserve"><![CDATA[<map:match type="usecase" pattern="*">
+  <map:mount src="{usecase-fallback:{1}}" uri-prefix=""/>
+</map:match>]]></source>
+      <p>
+        The decision which <code>usecase.xmap</code> to choose is based on the usecase configuration
+        in <code>publication.xml</code>. To declare a usecase to be implemented by a publication,
+        add the corresponding entry:
+      </p>
+<source xml:space="preserve"><![CDATA[<publication>
+  ...
+  <usecases>
+    <usecase name="create"/>
+  </usecases>
+  ...
+</publication>]]></source>
+    </section>
+    
+    <section>
+      <title>Setting Up a Publication To Support Templating</title>
+      
+      <p>
+        The service <code>org.apache.lenya.cms.publication.templating.Instantiator</code> is responsible for
+        creating instances of publications which support templating. If your publication shall support
+        templating, you have to follow these steps:
+      </p>
+      
+      <section>
+        <title>Implement an <code>Instantiator</code> Class</title>
+        
+<source xml:space="preserve"><![CDATA[package org.myproject.lenya;
+
+public class MyInstantiator extends AbstractLogEnabled implements Instantiator {
+
+    public void instantiate(Publication template, String newPublicationId, String name)
+            throws Exception {
+        ...
+    }
+
+}]]></source>
+      </section>
+      
+      <section>
+        <title>Add it to <code>cocoon.xconf</code> Using a Patch File</title>
+        
+        <p>
+          For instance <code>my-pub/config/cocoon-xconf/instantiator.xconf</code>:
+        </p>
+        
+<source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/template-instantiators"
+       unless="/cocoon/template-instantiators/component-instance[@name = 'default']">
+
+    <component-instance name="mypub"
+                        logger="myproject.publication"
+                        class="org.myproject.lenya.MyInstantiator"/>
+
+</xconf>]]></source>
+      </section>
+      
+      <section>
+        <title>Declare the Instantiator in <code>publication.xml</code>
+</title>
+      </section>
+      
+<source xml:space="preserve"><![CDATA[<publication>
+  ...
+  <template-instantiator name="mypub"/>
+  ...
+</publication>]]></source>
+    </section>
+    
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902227.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902227.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902227.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902227.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Publication Templating</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a3a1c460-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221902227" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221881221"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910798510" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910769440"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781621559" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.1195221909610.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.1195221909610.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.1195221909610.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.1195221909610.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+	<header>
+		<title>Resource Types</title>
+	</header>
+	<body>
+	  
+<section>
+	<title>Introduction</title>
+	
+	<p>
+	A resource type defines a certain (XML or binary) source format, together with processing options.
+	It typically consists of
+	</p>
+	<ul>
+	  <li>an XML structure definition (e.g., Relax NG), if the resource type is XML-based,</li>
+	  <li>some presentation pipelines,</li>
+	  <li>some presentation XSLT stylesheets,</li>
+	  <li>usecases to manipulate documents.</li>
+	</ul>
+	<p>
+	  All of these can be shared between several resource types.
+	</p>
+	<p>
+	  The information describing a resource type is managed by a
+	  <a href="http://lenya.apache.org/apidocs/2.0/org/apache/lenya/cms/publication/ResourceType.html">
+<code>ResourceType</code>
+</a>
+	  service. The default implementation is <code>ResourceTypeImpl</code>.
+	  It implements <code>ThreadSafe</code>, which ensures that only a single instance of every resource type is created.
+	  It is not possible to declare multiple resource types with the same name. 
+	</p>
+</section>
+
+<section>
+<title>Choose a Unique Resource Type Name</title>
+  <p>
+    You should choose a reasonable name for your resource type.
+  </p>
+  <note>
+    In the examples, we use the name <em>profile</em> (page with information about a person).
+  </note>
+</section>
+	  
+<section>
+  <title>Adding the Resource Type to a Publication</title>
+  
+  <p>
+    The resource types used by a publication are declared in <code>publication.xml</code>,
+    including the assignment of a workflow schema to a resource type. You have to add your
+    resource type to the <code><![CDATA[<resource-types>]]></code> section of this file:
+  </p>
+  
+<source xml:space="preserve"><![CDATA[<publication>
+  ...
+  <resource-types>
+    <resource-type name="xhtml" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="homepage" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="links" workflow="fallback://config/workflow/workflow.xml"/>
+    <resource-type name="profile" workflow="fallback://config/workflow/workflow.xml"/>
+    ...
+  </resource-types>
+  ...
+</publication>
+]]></source>
+
+  
+  <p>
+    You can add references to any resource types configured in
+    <code><![CDATA[<lenya-webapp>/WEB-INF/cocoon.xconf]]></code> (see below),
+    containing
+  </p>
+  
+  <ul>
+    <li>resource types provided by modules,</li>
+    <li>resource types of template publications, and</li>
+    <li>resource types of the publication itself.</li>
+  </ul>
+  
+  </section>
+  
+  <section>
+<title>Providing One or More Sample XML Documents</title>
+    <p>
+      If you want to enable users to create new resources belonging to
+      your resource type, it is useful to provide one more more sample XML documents.
+    </p>
+    <p>
+      The sample document(s) are typically placed in the directory
+      <code>$MODULE_HOME/samples</code>.
+      You can choose arbitrary filenames, but for a single sample
+      it is recommended to use the resource type name
+      (e.g., <code>profile.xml</code>).
+    </p>
+    <p>
+      There are two ways of declaring the samples. The first option is very
+      convenient if you don't need custom samples per publication. You just add
+      the samples to the resource type declaration:
+    </p>
+    <source xml:space="preserve"><![CDATA[<component-instance name="profile" ...
+  ...
+  <sample-name name="Empty Profile" mime-type="application/xml">
+    fallback://lenya/modules/profile/samples/empty.xml</sample-name>
+  <sample-name name="Example Profile" mime-type="application/xml">
+    fallback://lenya/modules/profile/samples/example.xml</sample-name>
+  ...
+</component-instance>]]>
+    </source>
+    <p>
+      The second option allows you to specify a file where the samples declarations
+      are stored. This enables you to override this file in your publications,
+      providing a different sample list per publication:
+    </p>
+    <source xml:space="preserve"><![CDATA[<component-instance name="profile" ...
+  ...
+  <samples uri="fallback://lenya/modules/profile/samples/samples.xml"/>
+  ...
+</component-instance>]]>
+    </source>
+    <p>
+      The <code>samples.xml</code> file uses the same syntax:
+    </p>
+    <source xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<samples>
+  <sample-name name="Empty Profile" mime-type="application/xml">
+    fallback://lenya/modules/profile/samples/empty.xml</sample-name>
+  <sample-name name="Example Profile" mime-type="application/xml">
+    fallback://lenya/modules/profile/samples/example.xml</sample-name>
+</samples>]]></source>
+  </section>
+  
+  <section>
+<title>Providing an XML Structure Definition</title>
+    <p>
+      This step is only needed if you want to edit resources with Lenya
+      or validate them after they have been imported or manipulated.
+      The type of the structure definition
+      (<a href="http://www.w3.org/XML/Schema">XML Schema</a>,
+      <a href="http://www.relaxng.org/">Relax NG</a>, ...)
+      depends on the editor or validator you want to use. For instance,
+      the <a href="http://www.bitfluxeditor.org/">BXE</a> WYSIWYG
+      editor requires a Relax NG document.
+    </p>
+    <p>The structure definition document is typically placed in the directory
+      <code>$MODULE_HOME/resources/schemas</code>. The name
+      of the file is arbitrary, but it is recommended to use the
+      resource type name (e.g., <code>profile.rng</code>).
+    </p>
+  </section>
+  
+  <section>
+<title>Creating a Workflow Schema</title>
+    <p>
+      If your resources should have a workflow, you have to add a workflow
+      schema for your resource type as described in
+      <a href="lenya-document:5059c540-8731-11dc-ae46-9e7b5d14892d">Workflow Configuration</a>.
+      A workflow schema can be shared between multiple resource types.
+      The workflow schema is assigned to a resource type in
+      <code>$PUB_HOME/config/publication.xml</code>
+      (see section <em>Adding Resource Types to a Publication</em>).
+    </p>
+  </section>
+	  
+	  <section id="expiration">
+	    <title>Cache Expiration Time</title>
+	    <p>
+	      For each resource type, you can configure how long the documents shall be cached by
+	      the client, for instance:
+	    </p>
+	    <source xml:space="preserve"><![CDATA[<expires seconds="3600" />]]></source>
+	    <p>
+	      This value can be accessed via the <code>getExpires()</code> methods of the
+	      <code>ResourceType</code> and <code>Document</code> interfaces. You can use the
+	      header action to set the corresponding HTTP response header in your publication:
+	    </p>
+	    <source xml:space="preserve"><![CDATA[<map:act type="set-header">
+  <map:parameter name="Expires"
+    value="{date-iso8601-rfc822:{doc-info:{pubId}:{area}:{uuid}:{language}:expires}}"/>
+</map:act>]]></source>
+	  </section>
+  
+  <section>
+<title>The Resource Type Definition</title>
+    <p>
+    To declare a custom resource type and assign the creator, schema etc. to it,
+	  add the component instance to an XPatch file (e.g.,
+	  <code>$MODULE_HOME/config/cocoon-xconf/resourcetype-profile.xconf</code>):
+    </p>
+    <source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/resource-types"
+       unless="/cocoon/resource-types/component-instance[@name = 'profile']">
+
+  <component-instance name="profile"
+                      logger="lenya.resourcetypes.profile"
+                      class="org.apache.lenya.cms.publication.ResourceTypeImpl">
+                      
+    <schema src="fallback://lenya/modules/profile/resources/schemas/profile.rng"
+            language="http://relaxng.org/ns/structure/0.9"/>
+            
+    <sample-name name="Empty Profile" mime-type="application/xml">
+        fallback://lenya/modules/profile/samples/empty.xml</sample-name>
+        
+    <sample-name name="Example Profile" mime-type="application/xml">
+        fallback://lenya/modules/profile/samples/example.xml</sample-name>
+    
+    <link-attribute xpath="//*[namespace-uri() = 'http://foo.bar.org/profile']/@href"/>
+    
+    <format name="xhtml" uri="cocoon://modules/profile/profile.xml"/>
+    
+    <expires seconds="3600" />
+    
+  </component-instance>
+
+</xconf>]]></source>
+
+    <p>
+      This XPatch file will be used when the publication is deployed (e.g., when you issue
+      a <code>./build</code> command). Its contents will be patched into
+      <code><![CDATA[<lenya-webapp>/WEB-INF/cocoon.xconf]]></code>.
+    </p>
+
+  </section>
+  
+  <section>
+    <title>I18n for the Resource Type Label</title>
+    <p>
+      There is a convention that the message key <em>resourceType-{name}</em> is used for a
+      human-readable, translated resource type label:
+    </p>
+    <source xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+  <message key="resourceType-profile">Profile</message>
+</catalogue>]]></source>
+  </section>
+  
+  <section>
+<title>Define a Custom Menubar</title>
+    <p>
+      If you want to use a custom menubar for your resource type,
+      follow the guidelines on the page
+      <a href="lenya-document:2a82ba70-8731-11dc-ae46-9e7b5d14892d">The Lenya Menubar</a>.
+      Typically, a menubar is shared between multiple resource types.
+      Small customizations can be achieved with Java code in the menubar XSP.
+    </p>
+    <p>
+      To let the user create new resources using the <code>DefaultBranchCreator</code>,
+      you have to add the following menu item:
+    </p>
+    <source xml:space="preserve"><![CDATA[<item uc:usecase="sitemanagement.create" href="?doctype=profile">
+  <i18n:translate>
+    <i18n:text>New ... Document</i18n:text>
+    <i18n:param><i18n:text>resourceType-profile</i18n:text></i18n:param>
+  </i18n:translate>
+</item>]]></source>
+  </section>
+  
+  <section>
+    <title>Formats</title>
+    
+    <p>
+      A resource type provides a set of <em>formats</em> to provide different ways of presenting content documents.
+      The formats are defined in the resource type declaration in
+      <code>$MODULE_HOME/config/cocoon-xconf/resourcetype-profile.xconf</code>:
+    </p>
+<source xml:space="preserve">
+  <![CDATA[<format name="xhtml" uri="cocoon://modules/profile/xhtml.xml"/>]]>
+  <![CDATA[<format name="include" uri="cocoon://modules/profile/xhtml-inline.xml"/>]]>
+</source>
+    <p>
+      The following figure illustrates some usage examples of formats:
+    </p>
+    <figure alt="Resource type formats" src="lenya-document:686acfd0-8731-11dc-ae46-9e7b5d14892d"/>
+    <ul>
+      <li>
+        Example <strong>A</strong> shows the most typical case - a <em>msg</em> (message) document
+        is rendered using the format <em>xhtml</em> to be displayed as page content.
+      </li>
+      <li>
+        In example <strong>B</strong>, the format <em>teaser</em> is used to render teaser versions
+        of the <em>msg</em> documents to be displayed in the sidebar. This is usually done using
+        an include mechanism (see below).
+      </li>
+      <li>
+        In example <strong>C</strong>, a <em>news</em> document includes the <em>teaser</em>
+        versions of message documents. The <em>news</em> document in turn provides the format
+        <em>xhtml</em> to be rendered as page content.
+      </li>
+    </ul>
+    <p>
+      The <code>uri</code> attribute of the <code>format</code> element may refer to an arbitrary URL,
+      which is typically a request into the module itself. This URI is matched inside the module
+      sitemap (in our case, <code>modules/profile/sitemap.xmap</code>).
+    </p>
+    <p>
+      There are two ways in which the format can be requested:
+    </p>
+    <ul>
+      <li>for the current document - without parameters</li>
+      <li>for a specific document - with the parameters <code>/{pubId}/{area}/{uuid}/{language}</code>
+</li>
+    </ul>
+    <p>
+      Typically, an XSLT is applied to the content document to transform
+      it into another format (XHTML, XSL-FO, ...). In the following example,
+      the name of the XSLT stylesheet is supposed to end with the format name
+      (e.g., <code>profile2xhtml.xsl</code>):
+    </p>
+    <source xml:space="preserve"><![CDATA[
+  <!-- apply a format -->
+  <!-- {format}.xml (current document) -->
+  <map:match pattern="*.xml">
+    <map:generate src="cocoon:/{1}/{page-envelope:publication-id}/ \
+                                   {page-envelope:area}/ \
+                                   {page-envelope:document-uuid}/ \
+                                   {page-envelope:document-language}"/>
+    <map:serialize type="xml"/>
+  </map:match>
+  
+  <!-- {format}.xml/{pubId}/{area}/{uuid}/{language} (specific document) -->
+  <map:match pattern="*.xml/*/*/*/*">
+    <map:generate src="lenya-document:{4},lang={5}{link:rev}"/>
+    <map:transform src="fallback://lenya/modules/profile/xslt/profile2{1}.xsl">
+      <map:parameter name="rendertype" value="{request-param:rendertype}"/>
+      <map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>
+      <map:parameter name="language" value="{4}"/>
+    </map:transform>
+    <map:serialize type="xml"/>
+  </map:match>
+]]></source>
+    <p>
+      To request a formatted document, you can use the <em>format</em> parameter of the
+      <code>site:</code> and <code>lenya-document:</code> protocols. You can issue such
+      a request from an arbitrary sitemap (e.g., from your publication sitemap or from
+      a different module sitemap).
+    </p>
+<source xml:space="preserve">
+  <![CDATA[<!-- aggregate navigation components and XHTML-formatted content -->
+  <map:aggregate element="cmsbody">
+    <map:part src="cocoon://modules/sitetree/{2}/{3}/breadcrumb/{5}.xml"/>
+    <map:part src="cocoon://modules/sitetree/{2}/{3}/tabs/{5}.xml"/>
+    <map:part src="cocoon://modules/sitetree/{2}/{3}/menu/{5}.xml"/>
+    <map:part src="cocoon://modules/sitetree/{2}/{3}/search/{5}.xml"/>
+    <map:part src="lenya-document:{page-envelope:documente-uuid}?format=xhtml"/>
+  </map:aggregate>
+]]>
+</source>
+
+    <p>
+      Another usage scenario is to include formatted documents in other documents, e.g. as a teaser or summary
+      (see the figure above):
+    </p>
+    <source xml:space="preserve"><![CDATA[<ci:include src="site:/{$language}{$path}?format=teaser"/>]]></source>
+    <source xml:space="preserve"><![CDATA[<ci:include src="lenya-document:{$uuid}?format=teaser"/>]]></source>
+  
+    <p>
+      Since formats allow you to select the presentation style of a document
+      on demand, you can use them as layout templates. But unfortunately formats have to
+      be declared in <code>cocoon.xconf</code>, so you can't add new templates at
+      runtime with this approach at the moment. Here's an example how to use formats to select templates:
+    </p>
+    <ul>
+      <li>
+        Set the Dublin Core element <code>format</code> when you create the document,
+        e.g. using a combo box. We use the Dublin Core for simplicity here, for a cleaner
+        approach you should define your own meta data element set.
+      </li>
+      <li>
+        In the resource type module, provide an XSLT stylesheet
+        <code>{resource-type}2{format}.xsl</code> for each format (see above)
+      </li>
+      <li>
+        <p>
+          Add the format parameter to the <code>lenya-document</code> call:
+        </p>
+        <source xml:space="preserve"><![CDATA[<map:generate src="lenya-document:{page-envelope:uuid}?format={dublincore:format}"/>]]></source>
+      </li>
+    </ul>
+  
+  </section>
+  
+  <section>
+<title>Presentation</title>
+    
+    <p>
+      To make your resources available as HTTP pages, you have to add the
+      appropriate pipelines and XSLT stylesheets. In general, there are no
+      restrictions.
+    </p>
+    <p>
+      The pipelines have to be placed in
+      <code>$MODULE_HOME/sitemap.xmap</code>. The stylesheets are typically located in
+      <code>$MODULE_HOME/xslt/</code> and named <code>{resource-type}2{format}.xsl</code>
+      (e.g., <code>profile2xhtml.xsl</code>).
+    </p>
+    <p>  
+      In the case of the <em>xhtml</em> format, the stylesheet is supposed to generate
+      a valid XHTML document (in the XHTML namespace). The output of other formats depends
+      on the purpose of the respective format.
+    </p>
+    
+  </section>
+
+	</body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221909610.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221909610.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221909610.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221909610.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Resource Types</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a4ecbaf0-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221909610" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221889102"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910781828" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910767027"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781616294" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.1195221897146.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.1195221897146.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.1195221897146.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.1195221897146.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>Modules</title> 
+  </header>
+  <body>
+    
+    <section>
+      <title>Introduction</title>
+      <p>
+        Modules are packages providing a certain set of resources or functionality.
+      </p>
+      <p>Examples:</p>
+      <ul>
+        <li>a resource type (e.g., docbook module)</li>
+        <li>a repository implementation (e.g., jdbc module)</li>
+        <li>a collection of XSLTs (e.g., content2svg module)</li>
+      </ul>
+      <p>
+        Some modules are included in the Lenya distribution:
+      </p>
+      <ul>
+        <li>
+<strong>lucene</strong> - search functionality</li>
+        <li>
+<strong>sitetree</strong> - manage documents in a tree-like structure</li>
+        <li>
+<strong>jcr</strong> - store content in a <a href="http://www.jcp.org/en/jsr/detail?id=170">JCR</a> repository (experimental)</li>
+        <li>
+<strong>xhtml</strong> - XHTML-based resource type</li>
+        <li>
+<strong>links</strong> - resource type to manage link lists</li>
+        <li>
+<strong>lenyadoc</strong> - adds the <code>lenyadoc://</code> protocol</li>
+      </ul>
+    </section>
+
+    <section>
+      <title>Implementing a module</title>
+      
+      <p>
+        All resources of a module are located in a single directory.
+        The following is an example directory structure, all files are optional
+        and depend on the nature of the module.
+      </p>
+    
+<source xml:space="preserve">
+mymodule/
+  config/                    configuration files
+    module.xml               module descriptor
+    cocoon-xconf/            patches for cocoon.xconf
+      components.xconf     
+  usecases/
+    mymodule.jx              usecase view
+  resources/
+    images/                  image files
+    css/                     CSS files
+    schemas/                 XML schemas (RNG, XSD, ...)
+    samples/                 Samples (in case of resource type modules)
+  java/
+    src/                     Java source files
+    test/                    Java test classes
+    lib/                     Java libraries
+  xslt/                      XSLT stylesheets
+  sitemap.xmap               main module sitemap
+</source>
+
+      <p>To add a module to your Lenya installation, declare it in <code>local.build.properties</code>:</p>
+
+<source xml:space="preserve">
+modules.root.dirs=src/modules:src/webapp/lenya/pubs/default/modules:/home/john/modules/mymodule
+</source>      
+      <p>
+        When the module is deployed, the following steps are executed:
+      </p>
+      <ul>
+        <li>the module files are copied to <code>context://lenya/modules</code>
+</li>
+        <li>Java sources are compiled, libraries are installed</li>
+        <li>
+<code>cocoon.xconf</code> is patched</li>
+      </ul>
+
+    </section>
+    
+    <section>
+      <title>The Module Descriptor File</title>
+      <p>
+        Each module must be described using a <em>module descriptor</em> XML file
+        <code>module.xml</code>, located in the <code>config</code> directory of the module.
+        The descriptor is validated when the module is deployed, so be careful! :)
+      </p>
+      <p>
+        A typical module descriptor looks like this:
+      </p>
+      <source xml:space="preserve"><![CDATA[<module xmlns="http://apache.org/lenya/module/1.0">
+  <id>org.myproject.lenya.modules.myeditor</id>
+  <depends module="org.apache.lenya.modules.usecase"/>
+  <depends module="org.apache.lenya.modules.webdav"/>
+  <export package="org.myproject.lenya.modules.myeditor.api"/>
+  <package>org.myproject.lenya.modules</package>
+  <version>0.1-dev</version>
+  <name>My Own Editor</name>
+  <lenya-version>2.0-dev</lenya-version>
+  <description>
+    This is my own editor.
+    For more information, visit http://myproject.org/editor.
+  </description>
+</module>]]></source>
+      <p>
+        The <code>id</code> must start with the <code>package</code> of the module.
+        It is not allowed to deploy two modules with the same ID.
+      </p>
+      <p>If your module uses code from other modules, you have to add 
+       a <code><![CDATA[<depends>]]></code> for each of these modules.</p>
+      <p>
+        The <code><![CDATA[<export package="..."/>]]></code> statement(s) declare
+        public packages, which means that these packages are accessible from other
+        modules. You should aim for long-term stability of all interfaces and classes
+        in exported packages, since they represent the Java API of your module.
+      </p>
+    </section>
+    
+    <section>
+      <title>Implementing Usecases in Modules</title>
+      
+      <section>
+        <title>Declaring the Usecase</title>
+      
+      <p>
+        For example, imagine you implement a <code>newsletter</code> module, containing a <code>send</code> usecase.
+        To declare usecases, add a patch file for <code>cocoon.xconf</code>, for instance <code>newsletter/config/cocoon-xconf/usecases.xconf</code>:
+      </p>
+<source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/usecases"
+       unless="/cocoon/usecases/component-instance[@name = 'newsletter.send']">
+  <component-instance name="newsletter.send"
+                      logger="lenya.usecases.newsletter.send"
+                      class="org.myproject.lenya.newsletter.usecases.Send">
+    <view template="modules/newsletter/usecases/send.jx" menu="false"/>
+  </component-instance>
+</xconf>]]></source>
+
+      <p>
+        As you can see in the view declaration, the JX templates are typically stored in the <code>&lt;module&gt;/usecases</code>
+        directory. The Java source files go into the <code>&lt;module&gt;/java/src</code> directory, they are compiled
+        automatically by the Lenya build process.
+      </p>
+      
+    </section>
+    
+    <section>
+      <title>Calling the Module Sitemap</title>
+      
+      <p>
+        The following URL syntax is used to make a call to a module sitemap:
+      </p>
+<source xml:space="preserve"><![CDATA[cocoon://modules/<module>/**]]></source>
+      
+      <p>
+        The module sitemap is located at <code>newsletter/sitemap.xmap</code>. To request
+        the latest newsletter and display it on the confirmation screen using the CInclude approach
+        (for more information, see documentation about the usecase framework), you could for instance use
+        the URI <code>cocoon://modules/newsletter/latestNewsletter.xml</code>:
+      </p>
+      
+<source xml:space="preserve"><![CDATA[<page:page
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
+  xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+  >
+  
+  <page:body>
+    <h1><i18n:text>Send Newsletter</i18n:text></h1>
+    <form>
+      ...
+      <jx:import uri="templates/messages.jx"/>
+      
+      <cinclude:includexml>
+        <cinclude:src>cocoon://modules/newsletter/latestNewsletter.xml</cinclude:src>
+      </cinclude:includexml>
+      
+      <input name="submit" type="submit" value="Send Newsletter"/>
+    </form>
+  </page:body>
+</page:page>]]></source>
+
+        <p>
+        Another useful option is to use a module URL as the usecase view, e.g. to export some XML.
+        Note that the attribute <code>uri</code> is used instead of <code>template</code>.
+        The usecase class <code>DummyUsecase</code> can be used because no Java code shall be
+        executed.
+        </p>
+      
+        <source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/usecases"
+       unless="/cocoon/usecases/component-instance[@name = 'newsletter.download']">
+  <component-instance name="newsletter.send"
+                      logger="lenya.usecases.newsletter.send"
+                      class="org.apache.lenya.cms.usecase.DummyUsecase">
+    <view uri="cocoon://modules/newsletter/downloadNewsletter.xml"/>
+  </component-instance>
+</xconf>]]></source>
+      </section>
+    
+      <section>
+        <title>Adding Menu Items</title>
+      
+      <p>
+      A module can provide menu items which are added to the publication menu.
+      To insert the menu items of a module, you have to add the module declaration to <code>publication.xml</code>:
+      </p>
+      
+<source xml:space="preserve"><![CDATA[<publication>
+  ...
+  <module name="newsletter"/>
+  ...
+</publication>]]></source>
+
+      <p>
+        If there is a <code>menus.xmap</code> sitemap in the module's root directory, a
+        request of the form <code>&lt;area&gt;.xml</code> is sent into this sitemap.
+        The matching pipeline could look like this:
+      </p>
+      
+<source xml:space="preserve"><![CDATA[<map:match pattern="**">
+  <map:generate type="serverpages" src="config/menu.xsp"/>
+  <map:serialize type="xml"/>
+</map:match>
+]]></source>
+
+      <p>
+        The server page <code>&lt;module&gt;/config/menu.xsp</code> delivers a menu XML
+        which includes the items to be inserted:
+      </p>
+      
+<source xml:space="preserve"><![CDATA[<xsp:page ...>
+  <menu>
+    <menus>
+      <menu i18n:attr="name" name="File">
+        <block admin="false">
+          <item uc:usecase="newsletter.send" href="?">
+            <i18n:text>Send Newsletter</i18n:text>
+          </item>
+        </block>
+      </menu>
+    </menus>
+  </menu>
+</xsp:page>]]></source>
+      
+      
+      </section>
+    </section>
+    
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221897146.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221897146.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221897146.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221897146.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Modules</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a624c5c0-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221897146" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221885001"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910797343" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910768835"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781624256" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.1195221902867.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.1195221902867.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.1195221902867.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.1195221902867.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2006 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id: metadata.xml 55543 2004-10-26 00:14:59Z gregor $ --><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document>
+  <header>
+    <title>Meta Data</title>
+  </header>
+  <body>
+    <section>
+      <title>Introduction</title>
+      <p>
+        Meta data are organized in <em>element sets</em>.
+        An element set is identified using a namespace URI.
+        Each element set can supply a fixed set of elements.
+        An element is identified using a name. An element can
+        be <em>editable</em>, and it can support <em>multiple values</em>.
+      </p>
+    </section>
+    
+    <section>
+      <title>Registering Meta Data Element Sets</title>
+      <p>Element sets are declared using patch files for <code>cocoon.xconf</code>.
+      When the application starts up, they are registered with the <code>MetaDataRegistry</code>.
+      Here's an example:</p>
+<source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/meta-data"
+    unless="/cocoon/meta-data/component-instance
+      [@name = 'http://apache.org/lenya/metadata/media/1.0']">
+  <component-instance name="http://apache.org/lenya/metadata/media/1.0"
+    class="org.apache.lenya.cms.metadata.ConfigurableElementSet">
+    <element name="filename" multiple="false"/>
+    <element name="format" multiple="false"/>
+    <element name="extent" multiple="false"/>
+    <element name="width" multiple="false"/>
+    <element name="height" multiple="false"/>
+    <element name="caption" multiple="false" editable="true"/>
+  </component-instance>
+</xconf>]]></source>
+    </section>
+    
+    <section>
+      <title>Accessing Meta Data</title>
+      <p>Here's an example for accessing the meta data of a document:</p>
+      <source xml:space="preserve"><![CDATA[
+MetaData meta = document.getMetaData("http://myproject.org/metadata/1.0");
+String description = meta.getFirstValue("description");
+String[] references = meta.getValues("references");
+]]></source>
+      <p>To find out which element sets are registered, you can access
+      the <code>MetaDataRegistry</code>:</p>
+      <source xml:space="preserve"><![CDATA[
+MetaDataRegistry registry = null;
+try {
+    registry = (MetaDataRegistry) this.manager.lookup(MetaDataRegistry.ROLE);
+    String[] namespaces = registry.getNamespaceUris();
+    ...
+}
+finally {
+    if (registry != null) {
+        this.manager.release(registry);
+    }
+}      
+]]></source>
+    </section>
+    
+    <section>
+      <title>The Meta Data Input Module</title>
+      <p>You can use the <code>MetaDataModule</code> to make an element set accessible
+      in Cocoon sitemaps. To declare it, use a patch file for <code>cocoon.xconf</code>:</p>
+      <source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/input-modules"
+  unless="/cocoon/input-modules/component-instance[@name = 'mymeta']">
+  <component-instance logger="sitemap.modules.input.mymeta" name="mymeta"
+    class="org.apache.lenya.cms.cocoon.components.modules.input.MetaDataModule"
+    namespace="http://myproject.org/metadata/1.0"/>
+</xconf>]]></source>
+      <p>Now you can access the meta data in your pipelines:</p>
+      <source xml:space="preserve"><![CDATA[<map:transform src="...">
+  <map:parameter name="description" value="{mymeta:description}"/>
+</map:transform>]]></source>
+    </section>
+    
+    <section>
+      <title>The LenyaMetaDataGenerator</title>
+      <p>
+        To get an XML summary of all meta data, you can use the <code>LenyaMetaDataGenerator</code>.
+        Here's an example how to call it in the sitemap:
+      </p>
+      
+      <source xml:space="preserve"><![CDATA[<map:match pattern="**.html.meta">
+  <map:generate type="lenyaMetaData">
+    <map:parameter name="pubid" value="{page-envelope:publication-id}"/>
+    <map:parameter name="area" value="{page-envelope:area}"/>
+    <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
+    <map:parameter name="lang" value="{page-envelope:document-language}"/>
+  </map:generate>
+  <map:serialize type="xml"/>
+</map:match>]]></source>
+      
+      <p>
+        Here's an example for the output of the generator:
+      </p>
+      
+      <source xml:space="preserve"><![CDATA[<lenya:metadata xmlns:lenya="http://apache.org/cocoon/lenya/metadata/1.0">
+  <elements xmlns="http://purl.org/dc/elements/1.1/">
+    <title>Search</title>
+    <date>2006-06-12 13:43:14</date>
+    <language>en</language>
+    <creator>lenya</creator>
+  </elements>
+  <elements xmlns="http://apache.org/lenya/metadata/document/1.0">
+    <extension>xml</extension>
+    <resourceType>usecase</resourceType>
+    <contentType>xml</contentType>
+  </elements>
+</lenya:metadata>]]></source>
+      
+    </section>
+    
+    <section>
+      <title>Storage</title>
+      <p>In 2.0.x meta data is stored separately from the document content but in the same 
+        directory (index_{lang}.meta).
+        A typical sample for a meta data XML document may be the following:
+      </p>
+      <source xml:space="preserve"><![CDATA[<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+  <element-set namespace="http://apache.org/lenya/metadata/media/1.0">
+    <element key="width">
+      <value>300</value>
+    </element>
+    <element key="height">
+      <value>374</value>
+    </element>
+    <element key="extent">
+      <value>30291</value>
+    </element>
+    <element key="filename">
+      <value>hello-world.jpg</value>
+    </element>
+    <element key="format">
+      <value>image/jpeg</value>
+    </element>
+  </element-set>
+  <element-set namespace="http://purl.org/dc/elements/1.1/">
+    <element key="creator">
+      <value>lenya</value>
+    </element>
+    <element key="title">
+      <value>Hello World</value>
+    </element>
+    <element key="date">
+      <value>2006-07-20 22:44:37</value>
+    </element>
+    <element key="language">
+      <value>en</value>
+    </element>
+  </element-set>
+  <element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+    <element key="extension">
+      <value>jpg</value>
+    </element>
+    <element key="resourceType">
+      <value>resource</value>
+    </element>
+    <element key="contentType">
+      <value>xml</value>
+    </element>
+  </element-set>
+</metadata>
+]]> </source>
+    </section>
+    <section>
+      <title>Implementation</title>
+      <p>Like nearly all new modules/functionality the meta data usecases are 
+        following the new <strong>fallback</strong> concept. Meaning you are 
+        using the core contracts as long you are <strong>not</strong> overriding them with 
+        your own implementation. To override a core implementation you just 
+        need to place your custom implementation to the right path in you pub 
+        and lenya will try to pick it up from there.</p>
+      <section>
+        <title>Create meta data</title>
+        <p>Upon creation of a document a set of sample meta data is presented 
+          in the creation form. This values are partially filled in by the user 
+          (subject, desciption, etc.) and partly by the system (creator, 
+          creation data). This is done with the <code>site.create</code> 
+          usecase (lenya.usecase=site.create).</p>
+        <p> To tell lenya that you want as 
+          well create a set of custom meta data, you need to extend the
+          usecase handler and modify your 
+          implementation of the <code>create.jx</code> form.</p>
+        <note label="Custom implementation of create.jx"> An 
+          <strong>example</strong> of an implementation can be found in 
+          <code>{$default-pub}/lenya/usecases/site/create.jx</code>. Just 
+          change it and see what comes out. BTW if you need it in your custom 
+          pub just mind the path. ;-)</note>
+      </section>
+      <section>
+        <title>Display/modify meta data</title>
+        <p>The display of meta data is handled by the usecase 
+          <code>tab.meta</code>. All editable meta data are presented by the form.</p>
+      </section>
+    </section>
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902867.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902867.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902867.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221902867.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Meta data</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a7ac0200-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221902867" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221881938"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910775775" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910761535"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781618832" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.1195221900667.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.1195221900667.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.1195221900667.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.1195221900667.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>Lenya Protocols</title> 
+  </header>
+  <body>
+    <p>Cocoon uses different protocols to access sources. The protocols are handled by a <code>SourceFactory</code> which resolves the
+       given URI to a source. There are a few protocols specific to Lenya:
+    </p>
+    <ul>
+      <li>
+<a href="lenya-document:ab51ff90-8730-11dc-ae46-9e7b5d14892d">
+<code>lenya-document:</code>
+</a> Reference a document by UUID. The swiss army knife of Lenya. Used for all internal links.</li>
+      <li>
+<a href="lenya-document:ac8ec550-8730-11dc-ae46-9e7b5d14892d">
+<code>site:</code>
+</a> Get a <code>RepositorySource</code> using the path of a document in the site structure.</li>
+      <li>
+<a href="lenya-document:693e7380-8731-11dc-ae46-9e7b5d14892d">
+<code>lenya:</code>
+</a> Get a <code>RepositorySource</code> in the context of Lenya. Used mainly internally.</li>
+      <li>
+<em>deprecated</em> <a href="lenya-document:adb480a0-8730-11dc-ae46-9e7b5d14892d">
+<code>lenyadoc:</code>
+</a> Get a <code>RepositorySource</code> of a specific document using the UUID.</li>
+    </ul>
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221900667.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221900667.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221900667.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221900667.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>Overview</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/a8e2fb60-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221900667" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221890777"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910784961" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910769540"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781625600" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.1195221895138.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.1195221895138.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.1195221895138.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.1195221895138.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>
+<code>lenya:</code> Protocol</title> 
+  </header>
+  <body>
+    <p>
+      The <code>lenya:</code> protocol creates a <a href="http://lenya.apache.org/apidocs/1.4/org/apache/lenya/cms/cocoon/source/RepositorySource.html">
+      <code>RepositorySource</code>
+</a>, which is a 
+      <a href="http://lenya.apache.org/apidocs/1.4/org/apache/lenya/cms/cocoon/source/TransactionableSource.html">
+<code>TransactionableSource</code>
+</a>.
+      The resolution of the URI is based on the <code>context:</code> protocol
+      handler, i.e. you are accessing files under the webapp base directory.
+    </p>
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895138.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895138.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895138.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221895138.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>lenya Protocol</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/aa12a1c0-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221895138" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221882076"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910792443" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910765740"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781622973" version="1"/>

Added: lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.1195221905764.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.1195221905764.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.1195221905764.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.1195221905764.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+
+<document> 
+  <header> 
+    <title>lenya-document: Protocol</title> 
+  </header>
+  <body>
+    <p>
+      The <code>lenya-document:</code> protocol allows to access the source of a Lenya document <strong>by
+      its UUID, publication ID, area, language and revision</strong>, regardless of the sitetree layout.
+      All Lenya-internal links use it, so that links will not break when documents are moved around
+      in the sitetree. 
+    </p>
+    <p>
+      Since it is such a fundamental concept, it is documented in detail under <a href="lenya-document:b0364980-8730-11dc-ae46-9e7b5d14892d">Link Management</a>.
+    </p>
+  </body>
+</document>

Added: lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221905764.bak
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221905764.bak?rev=595691&view=auto
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221905764.bak (added)
+++ lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.meta.1195221905764.bak Fri Nov 16 07:11:58 2007
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata xmlns="http://apache.org/lenya/metadata/1.0">
+<element-set namespace="http://purl.org/dc/elements/1.1/">
+<element key="title">
+<value>lenya-document Protocol</value>
+</element>
+</element-set>
+<element-set namespace="http://apache.org/lenya/metadata/document/1.0">
+<element key="extension">
+<value>xml</value>
+</element>
+<element key="mimeType">
+<value>application/xml</value>
+</element>
+<element key="resourceType">
+<value>forrestDocument20</value>
+</element>
+<element key="contentType">
+<value>xml</value>
+</element>
+</element-set>
+</metadata>

Modified: lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.rcml
URL: http://svn.apache.org/viewvc/lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.rcml?rev=595691&r1=595690&r2=595691&view=diff
==============================================================================
--- lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.rcml (original)
+++ lenya/sandbox/pubs/docu/content/authoring/ab51ff90-8730-11dc-ae46-9e7b5d14892d/en.rcml Fri Nov 16 07:11:58 2007
@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XPSRevisionControl xmlns="">
+<CheckIn backup="true" identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221905764" version="3"/>
+<CheckOut identity="lenya" session="fde084c0-944b-11dc-8f2e-e6c0ff9903ab" time="1195221884810"/>
 <CheckIn backup="true" identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910789427" version="2"/>
 <CheckOut identity="lenya" session="1f12dc80-8860-11dc-ba66-cfbbb816bd0d" time="1193910762284"/>
 <CheckIn backup="true" identity="lenya" session="60798970-8730-11dc-ae46-9e7b5d14892d" time="1193781625513" version="1"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org