You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ne...@apache.org on 2007/04/13 16:02:51 UTC

svn commit: r528490 - in /lenya/trunk/src: impl/java/org/apache/lenya/cms/publication/ pubs/blog/ pubs/blog/config/ pubs/default/ pubs/default/config/ pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/ resources/dev/eclipse/ ...

Author: nettings
Date: Fri Apr 13 07:02:49 2007
New Revision: 528490

URL: http://svn.apache.org/viewvc?view=rev&rev=528490
Log:
merged new publication configuration from branch trunk-rework-pubconf.
works for me, please test.

HEADSUP:
THIS COMMIT WILL BREAK YOUR EXISTING PUBLICATIONS.
you will need to tweak your publication.xconf file. for details, just
build the trunk and read the introductory page you see after starting
lenya. take a look at src/pubs/default/config/publication.xconf for
what's changed.

TODO:
* fix NPE during build if src/pubs/[default|blog]/publication.xml is
  deleted entirely (as a workaround, it's now a null-byte file).
* get rid of multiple-inheritance templating code (which does not work).
  currently, that stuff has only been removed from the user-visible
  configuration. under the hood, it still looks as if we supported it.
  some weird empty-array semantics and a world of null objects pain...


Added:
    lenya/trunk/src/pubs/blog/readme.xml
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/pubs/blog/readme.xml
    lenya/trunk/src/pubs/default/readme.xml
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/pubs/default/readme.xml
    lenya/trunk/src/webapp/lenya/content/welcome.xml
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/webapp/lenya/content/welcome.xml
    lenya/trunk/src/webapp/lenya/resources/schemas/publication.rng
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng
    lenya/trunk/src/webapp/lenya/xslt/util/aggregate-publications.xsl
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/aggregate-publications.xsl
    lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/util/introduction.xsl
    lenya/trunk/src/webapp/readme.xml
      - copied unchanged from r528481, lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml
Removed:
    lenya/trunk/src/pubs/blog/publication-tests.xml
    lenya/trunk/src/webapp/lenya/xslt/util/publication.xsl
    lenya/trunk/src/webapp/lenya/xslt/util/xinclude.xsl
Modified:
    lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
    lenya/trunk/src/pubs/blog/config/publication.xconf
    lenya/trunk/src/pubs/blog/publication.xml
    lenya/trunk/src/pubs/default/config/publication.xconf
    lenya/trunk/src/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java
    lenya/trunk/src/pubs/default/publication.xml
    lenya/trunk/src/resources/dev/eclipse/project
    lenya/trunk/src/targets/dist-build.xml
    lenya/trunk/src/targets/test-build.xml
    lenya/trunk/src/targets/webapp-build.xml
    lenya/trunk/src/webapp/global-sitemap.xmap
    lenya/trunk/src/webapp/lenya/content/about.xml
    lenya/trunk/src/webapp/lenya/content/introduction.xml
    lenya/trunk/src/webapp/lenya/resources/css/default.css
    lenya/trunk/src/webapp/lenya/resources/css/tables.css
    lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml
    lenya/trunk/src/webapp/lenya/resources/i18n/modules2xinclude.xsl
    lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl
    lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl

Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/PublicationConfiguration.java Fri Apr 13 07:02:49 2007
@@ -30,7 +30,9 @@
 import org.apache.lenya.cms.repository.Node;
 
 /**
- * A publication configuration.
+ * A publication's configuration.
+ * Keep in sync with src/webapp/lenya/resources/schemas/publication.rng!
+ * FIXME: validate publication.xconf before attempting to parse
  */
 public class PublicationConfiguration extends AbstractLogEnabled implements Publication {
 
@@ -43,11 +45,6 @@
     private String instantiatorHint = null;
     private String contentDir = null;
 
-    private static final String ELEMENT_PROXY = "proxy";
-    private static final String ATTRIBUTE_AREA = "area";
-    private static final String ATTRIBUTE_URL = "url";
-    private static final String ATTRIBUTE_SSL = "ssl";
-
     private boolean isConfigLoaded = false;
 
     /**
@@ -56,20 +53,41 @@
     public static final String CONFIGURATION_FILE = CONFIGURATION_PATH + File.separator
             + "publication.xconf";
 
-    private static final String ELEMENT_TEMPLATES = "templates";
+    private static final String CONFIGURATION_NAMESPACE = 
+            "http://apache.org/cocoon/lenya/publication/1.1" ;
+
+    // properties marked with "*" are currently not parsed by this class.
+    private static final String ELEMENT_NAME = "name";
+    private static final String ELEMENT_DESCRIPTION = "description"; //*
+    private static final String ELEMENT_LONGDESC = "longdesc"; //*
+    private static final String ELEMENT_VERSION = "version"; //*
+    private static final String ELEMENT_LENYA_VERSION = "lenya-version"; //*
+    private static final String ELEMENT_LENYA_REVISION = "lenya-revision"; //*
+    private static final String ELEMENT_COCOON_VERSION = "cocoon-version"; //*
+    private static final String ELEMENT_LANGUAGES = "languages";
+    private static final String ELEMENT_LANGUAGE = "language";
+    private static final String ATTRIBUTE_DEFAULT_LANGUAGE = "default";
     private static final String ELEMENT_TEMPLATE = "template";
     private static final String ATTRIBUTE_ID = "id";
+    private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator";
+    private static final String ATTRIBUTE_NAME = "name";
     private static final String ELEMENT_PATH_MAPPER = "path-mapper";
     private static final String ELEMENT_DOCUMENT_BUILDER = "document-builder";
     private static final String ELEMENT_SITE_MANAGER = "site-manager";
-    private static final String ATTRIBUTE_NAME = "name";
-    private static final String ELEMENT_TEMPLATE_INSTANTIATOR = "template-instantiator";
-    private static final String ELEMENT_CONTENT_DIR = "content-dir";
-    private static final String LANGUAGES = "languages";
-    private static final String DEFAULT_LANGUAGE_ATTR = "default";
-    private static final String BREADCRUMB_PREFIX = "breadcrumb-prefix";
-    private static final String ELEMENT_RESOURCE_TYPE = "resource-type";
+    private static final String ELEMENT_RESOURCE_TYPES = "resource-types";//*
+    private static final String ELEMENT_RESOURCE_TYPE = "resource-type";//*
     private static final String ATTRIBUTE_WORKFLOW = "workflow";
+    private static final String ELEMENT_MODULES = "modules";//*
+    private static final String ELEMENT_MODULE = "module";//*
+    private static final String ELEMENT_BREADCRUMB_PREFIX = "breadcrumb-prefix";
+    private static final String ELEMENT_CONTENT_DIR = "content-dir";
+    private static final String ATTRIBUTE_SRC = "src";
+    private static final String ELEMENT_PROXIES = "proxies";
+    private static final String ELEMENT_PROXY = "proxy";
+    private static final String ATTRIBUTE_AREA = "area";
+    private static final String ATTRIBUTE_URL = "url";
+    private static final String ATTRIBUTE_SSL = "ssl";
+
 
     /**
      * Creates a new instance of Publication
@@ -108,8 +126,9 @@
         } else {
             getLogger().debug("Configuration file [" + configFile + "] exists.");
         }
-
-        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
+        
+        final boolean ENABLE_XML_NAMESPACES = true;
+        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(ENABLE_XML_NAMESPACES);
 
         Configuration config;
 
@@ -119,6 +138,13 @@
             config = builder.buildFromFile(configFile);
 
             try {
+                // one sanity check for the proper namespace. we should really do that for every element,
+                // but since ELEMENT_PATH_MAPPER is mandatory, this should catch most cases of forgotten namespace.
+                if (config.getChild(ELEMENT_PATH_MAPPER).getNamespace() != CONFIGURATION_NAMESPACE) {
+                   getLogger().warn("Deprecated configuration: the publication configuration elements in "
+                       + configFile + " must be in the " + CONFIGURATION_NAMESPACE + " namespace."
+                       + " See webapp/lenya/resources/schemas/publication.xconf.");
+                }
                 pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
                 Class pathMapperClass = Class.forName(pathMapperClassName);
                 this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
@@ -134,12 +160,12 @@
                         .getAttribute(ATTRIBUTE_NAME);
             }
 
-            Configuration[] _languages = config.getChild(LANGUAGES).getChildren();
+            Configuration[] _languages = config.getChild(ELEMENT_LANGUAGES).getChildren(ELEMENT_LANGUAGE);
             for (int i = 0; i < _languages.length; i++) {
                 Configuration languageConfig = _languages[i];
                 String language = languageConfig.getValue();
                 this.languages.add(language);
-                if (languageConfig.getAttribute(DEFAULT_LANGUAGE_ATTR, null) != null) {
+                if (languageConfig.getAttribute(ATTRIBUTE_DEFAULT_LANGUAGE, null) != null) {
                     this.defaultLanguage = language;
                 }
             }
@@ -149,34 +175,41 @@
                 this.siteManagerName = siteManagerConfiguration.getAttribute(ATTRIBUTE_NAME);
             }
 
-            Configuration[] proxyConfigs = config.getChildren(ELEMENT_PROXY);
-            for (int i = 0; i < proxyConfigs.length; i++) {
-                String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL);
-                String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL);
-                String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA);
-
-                Proxy proxy = new Proxy();
-                proxy.setUrl(url);
-
-                Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue());
-                this.areaSsl2proxy.put(key, proxy);
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug(
-                            "Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=[" + ssl
-                                    + "]");
+            Configuration proxyConfig = config.getChild(ELEMENT_PROXIES);
+            if (proxyConfig != null) {
+                Configuration[] proxyConfigs = proxyConfig.getChildren(ELEMENT_PROXY);
+                for (int i = 0; i < proxyConfigs.length; i++) {
+                    String url = proxyConfigs[i].getAttribute(ATTRIBUTE_URL);
+                    String ssl = proxyConfigs[i].getAttribute(ATTRIBUTE_SSL);
+                    String area = proxyConfigs[i].getAttribute(ATTRIBUTE_AREA);
+    
+                    Proxy proxy = new Proxy();
+                    proxy.setUrl(url);
+    
+                    Object key = getProxyKey(area, Boolean.valueOf(ssl).booleanValue());
+                    this.areaSsl2proxy.put(key, proxy);
+                    if (getLogger().isDebugEnabled()) {
+                        getLogger().debug(
+                                "Adding proxy: [" + proxy + "] for area=[" + area + "] SSL=[" + ssl
+                                        + "]");
+                    }
                 }
             }
 
-            Configuration templatesConfig = config.getChild(ELEMENT_TEMPLATES);
-            if (templatesConfig != null) {
-                Configuration[] templateConfigs = templatesConfig.getChildren(ELEMENT_TEMPLATE);
-                this.templates = new String[templateConfigs.length];
-                for (int i = 0; i < templateConfigs.length; i++) {
-                    String templateId = templateConfigs[i].getAttribute(ATTRIBUTE_ID);
-                    this.templates[i] = templateId;
-                }
+            Configuration templateConfig = config.getChild(ELEMENT_TEMPLATE, false);
+            //FIXME: this is a hack. For some reason, the old code seems to imply that a publication
+            // can have multiple templates. This is not the case. All this code should use a simple string
+            // rather than arrays at some point. For now, the old array is kept, to avoid having to deal
+            // with all kinds of NPEs that keep cropping up...
+            if (templateConfig == null) {
+                this.templates = new String[0]; // ugh. empty array to keep the legacy code from breaking.
+            }
+            else {
+                 this.templates = new String[1];
+                 this.templates[0] = templateConfig.getAttribute(ATTRIBUTE_ID);
             }
 
+
             Configuration templateInstantiatorConfig = config.getChild(
                     ELEMENT_TEMPLATE_INSTANTIATOR, false);
             if (templateInstantiatorConfig != null) {
@@ -186,21 +219,24 @@
 
             Configuration contentDirConfig = config.getChild(ELEMENT_CONTENT_DIR, false);
             if (contentDirConfig != null) {
-                this.contentDir = contentDirConfig.getAttribute("src");
+                this.contentDir = contentDirConfig.getAttribute(ATTRIBUTE_SRC);
                 getLogger().info(
                         "Content directory loaded from pub configuration: " + this.contentDir);
             } else {
                 getLogger().info("No content directory specified within pub configuration!");
             }
 
-            Configuration[] resourceTypeConfigs = config.getChildren(ELEMENT_RESOURCE_TYPE);
-            for (int i = 0; i < resourceTypeConfigs.length; i++) {
-                String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME);
-                this.resourceTypes.add(name);
-
-                String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null);
-                if (workflow != null) {
-                    this.resourceType2workflow.put(name, workflow);
+            Configuration resourceTypeConfig = config.getChild(ELEMENT_RESOURCE_TYPES);
+            if (resourceTypeConfig != null) {
+                Configuration[] resourceTypeConfigs = resourceTypeConfig.getChildren(ELEMENT_RESOURCE_TYPE);
+                for (int i = 0; i < resourceTypeConfigs.length; i++) {
+                    String name = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_NAME);
+                    this.resourceTypes.add(name);
+    
+                    String workflow = resourceTypeConfigs[i].getAttribute(ATTRIBUTE_WORKFLOW, null);
+                    if (workflow != null) {
+                        this.resourceType2workflow.put(name, workflow);
+                    }
                 }
             }
 
@@ -209,7 +245,7 @@
                     e);
         }
 
-        this.breadcrumbprefix = config.getChild(BREADCRUMB_PREFIX).getValue("");
+        this.breadcrumbprefix = config.getChild(ELEMENT_BREADCRUMB_PREFIX).getValue("");
 
         isConfigLoaded = true;
     }

Modified: lenya/trunk/src/pubs/blog/config/publication.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/config/publication.xconf?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/pubs/blog/config/publication.xconf (original)
+++ lenya/trunk/src/pubs/blog/config/publication.xconf Fri Apr 13 07:02:49 2007
@@ -18,7 +18,13 @@
 
 <!-- $Id$ -->
 
-<publication>
+<publication xmlns="http://apache.org/cocoon/lenya/publication/1.1" show="true">
+  <name>Lenya Blog</name>
+  <description>An experimental Lenya-based blog in proof-of-concept stage.</description>
+  <version>@lenya.version@</version>
+  <lenya-version>@lenya.version@</lenya-version>
+  <lenya-revision>@lenya.revision@</lenya-revision>
+  <cocoon-version>2.1.8+</cocoon-version>
   <languages>
     <language default="true">en</language>
     <language>de</language>
@@ -28,17 +34,9 @@
   <breadcrumb-prefix/>
   <ssl-prefix/>
   <site-manager name="simple"/>
-  <resource-type name="entry" workflow="workflow.xml"/>
-  <resource-type name="sidebar" workflow="workflow.xml"/>
-
-  <!-- NOTE: The configuration of the content directory has NOT been fully tested yet and might lead to unexpected results. Use at own risk ;-) -->
-  <!-- Relative to webapp context: -->
-  <!--
-  <content-dir src="lenya/pubs/blog"/>
-  -->
-  <!-- Absolute: -->
-  <!--
-  <content-dir src="/home/USERNAME/data/blog"/>
-  <content-dir src="D:/tmp/blog"/>
-  -->
+  <resource-types>
+    <resource-type name="entry" workflow="workflow.xml"/>
+    <resource-type name="sidebar" workflow="workflow.xml"/>
+  </resource-types>
 </publication>
+

Modified: lenya/trunk/src/pubs/blog/publication.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/publication.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/pubs/blog/publication.xml (original)
+++ lenya/trunk/src/pubs/blog/publication.xml Fri Apr 13 07:02:49 2007
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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$ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" lenya:show="true">
-<lenya:pub-version>@lenya.version@</lenya:pub-version>
-<lenya:lenya-version>@lenya.version@</lenya:lenya-version>
-<lenya:lenya-revision>@lenya.revision@</lenya:lenya-revision>
-<lenya:cocoon-version>2.1.8 or 2.1.9-dev</lenya:cocoon-version>
-<lenya:name>Lenya's Weblog</lenya:name>
-
-<lenya:description>
-This publication is an initiative to implement the <a href="http://www.intertwingly.net/wiki/pie/FrontPage">"Echo/Atom"</a> specification for syndicating, archiving and
-editing episodic web sites (e.g. weblogs).
-</lenya:description>
-
-<lenya:readme>
-<h3>Customizing the layout</h3>
-The fonts and colors can be customized by editing the file <code>resources/css/styles.css</code>.
-The positioning can be customized by editing the file <code>xslt/global.xsl</code>. The following CSS resources
-might be helpful
-<br /><a href="http://www.w3schools.com/css/css_reference.asp">CSS2 Reference</a>
-<br /><a href="http://www.csszengarden.com">The Beauty of CSS Design</a>
-<br /><a href="http://www.lightsphere.com/colors/">216 Color Square</a>
-
-<h3>Weblog Resources</h3>
-<a href="http://www.intertwingly.net/wiki/pie/Syntax">Doctypes</a> (entry, feed, etc.)
-<br />
-<a href="http://www.imc.org/atom-syntax/mail-archive/maillist.html">Mailing List</a>
-<br />
-<a href="http://intertwingly.net/stories/2003/07/01/example.necho">XML proposal of doctype entry</a>
-<br />
-<a href="http://www.dynamicobjects.com/d2r/archives/001921.html">A Review of Blogging APIs</a>
-<br />
-<a href="http://btrott.typepad.com/typepad/atom.xml">Sample Feed by TypePad</a>
-
-<h3>Other Atom API Implementations</h3>
-<a href="http://bitworking.org/rfc/">Specification</a>
-<br />
-<a href="http://diveintomark.org/archives/2003/08/18/atom_api_implementation">Overview</a>
-<br />
-<a href="http://bitworking.org/rfc/implementation/wxAtomClient_25Aug2003.zip">Python Client</a>
-<br />
-<code>export HTTP_PROXY=http://127.0.0.1:4444</code>
-<br />
-<code>python wxAtomClientApp.py</code>
-<br />
-<a href="http://www.diveintomark.org/atom/">Testing the client</a>
-<br />
-<code>java -classpath lib/axis.jar org.apache.axis.utils.tcpmon</code>
-(Listen Port # 4444, Act as a ... Proxy, Options: HTTP Proxy Support)
-<br />
-<a href="http://diveintomark.org/public/2003/08/atom-api-20030825.py">Python Server</a>
-<br />
-<a href="http://www.intertwingly.net/code/mombo/">Python Server</a>
-
-<h3>Atom Misc</h3>
-<a href="http://www.feedvalidator.org">http://www.feedvalidator.org</a>
-<br />
-<a href="http://feedvalidator.org/download/rssvalidator-latest.zip">Download Feed Validator</a>
-</lenya:readme>
-
-</lenya:publication>

Modified: lenya/trunk/src/pubs/default/config/publication.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/config/publication.xconf?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/pubs/default/config/publication.xconf (original)
+++ lenya/trunk/src/pubs/default/config/publication.xconf Fri Apr 13 07:02:49 2007
@@ -18,9 +18,17 @@
 
 <!-- $Id$ -->
 
-<publication>
+<publication xmlns="http://apache.org/cocoon/lenya/publication/1.1" >
 
-  <!-- NOTE: The various languages need to be listed for verification and widget building -->
+  <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>
+
+  <!-- The various languages need to be listed for verification and widget building -->
   <languages>
     <language default="true">en</language>
     <language>de</language>
@@ -28,66 +36,75 @@
     <language>es</language>
     <language>fr</language>
   </languages>
+  <!-- A template instantiator is used to create new publications based on this one. -->
   <template-instantiator name="default"/>
+  <!-- A publication can inherit from another publication. "id" corresponds to the publication id 
+       of that template (and thus to the name of the directory it's stored in) -->
+  <!--
+     <template id="some-pub-id"/>
+  -->
   <path-mapper>org.apache.lenya.cms.publication.DefaultDocumentIdToPathMapper</path-mapper>
   <document-builder name="default"/>
   <breadcrumb-prefix/>
   <site-manager name="tree"/>
   
-  <!-- NOTE: Resource types need to be listed because of the workflow resp. because the workflow depends on the publication and not on the resource type -->
-  <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-type name="news" workflow="fallback://config/workflow/workflow.xml"/>
+  <!-- Resource types need to be listed because of the workflow resp. because the workflow depends on the publication and not on the resource type -->
+  <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-type name="news" workflow="fallback://config/workflow/workflow.xml"/>
+  </resource-types>
   
-  <!-- NOTE: Modules need to be listed because of the menu and i18n -->
-  <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="news"/>
-  <module name="contactform"/>
+  <!-- Modules need to be listed because of the menu and i18n -->
+  <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="news"/>
+  </modules>
   <!-- TODO: The goal is to have a blog module ;-) -->
   <!--
   <module name="blog"/>
   -->
 
-  <!-- NOTE: The configuration of the content directory has NOT been fully tested yet and might lead to unexpected results. Use at own risk ;-) -->
-  <!-- Relative to webapp context: -->
-  <!--
-  <content-dir src="lenya/pubs/default"/>
-  -->
-  <!-- Absolute: -->
+  <!-- You can specify a custom location for your content, outside the Lenya build tree. Note that you will probably also want
+       to specify custom locations for access control (see ac/ac.xconf), so that all your dynamically generated data is in one place
+       for easy backup. -->
   <!--
-  <content-dir src="/home/USERNAME/data/default"/>
-  <content-dir src="D:/tmp/default"/>
+       Relative to webapp context: 
+          <content-dir src="lenya/pubs/default"/>
+       Absolute:
+          <content-dir src="/home/USERNAME/data/default"/>
+          <content-dir src="D:/tmp/default"/>
   -->
   
-  <!--
-       For information about these settings, read 
-       http://lenya.apache.org/1_2_x/components/deployment/proxying.html
-
-  <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"/>
+  <!-- Lenya can rewrite the links to cater to special proxy setups.
+       For information about these settings, read http://lenya.apache.org/1_2_x/components/deployment/proxying.html
+       (yes, this needs some updating... sorry.)
+  <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>
   -->
-  
 </publication>

Modified: lenya/trunk/src/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java (original)
+++ lenya/trunk/src/pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/Instantiator.java Fri Apr 13 07:02:49 2007
@@ -28,7 +28,7 @@
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerException;
 
-import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.MutableConfiguration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
@@ -44,6 +44,7 @@
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.excalibur.source.impl.FileSource;
 import org.apache.lenya.cms.publication.Publication;
+//import org.apache.lenya.cms.publication.PublicationConfiguration;
 import org.apache.lenya.xml.DocumentHelper;
 import org.apache.lenya.xml.NamespaceHelper;
 import org.w3c.dom.Document;
@@ -58,15 +59,27 @@
 public class Instantiator extends AbstractLogEnabled implements
         org.apache.lenya.cms.publication.templating.Instantiator, Serviceable {
 
-    protected static final String[] sourcesToCopy = { "publication.xml",
-            "config/publication.xconf", "config/ac/ac.xconf",
-            "config/ac/policies/", "config/ac/usecase-policies.xml", "config/workflow/workflow.xml",
+    protected static final String[] sourcesToCopy = { 
+            "config/publication.xconf",
+            "config/ac/ac.xconf", "config/ac/policies/", "config/ac/usecase-policies.xml", 
+            "config/workflow/workflow.xml",
             "config/" + org.apache.cocoon.components.search.components.impl.IndexManagerImpl.INDEX_CONF_FILE};
 
-    /*
-     * "config/cocoon-xconf/index_manager_index.xconf", "config/cocoon-xconf/index_manager.xconf",
-     */
-
+    // the following stuff should actually come from PublicationConfiguration, but there's currently no way to get at it.
+    // the correct solution suggested by andreas is not to meddle with config files here at all, but instead implement
+    // appropriate setter functions in the Publication class. postponed to after 1.4.
+    // thus, don't waste too much effort on this file, it's all an intermediate hack.
+    private static final String CONFIGURATION_FILE = "config/publication.xconf";
+    private static final String CONFIGURATION_NAMESPACE = "http://apache.org/cocoon/lenya/publication/1.1";
+    private static final String ELEMENT_NAME = "name";
+    private static final String ELEMENT_TEMPLATES = "templates";
+    private static final String ELEMENT_TEMPLATE = "template";
+    private static final String ATTRIBUTE_ID = "id";
+    private static final String ELEMENT_RESOURCE_TYPES = "resource-types";//*
+    private static final String ELEMENT_RESOURCE_TYPE = "resource-type";//*
+    private static final String ELEMENT_MODULES = "modules";//*
+    private static final String ELEMENT_MODULE = "module";//*
+ 
     /**
      * @see org.apache.lenya.cms.publication.templating.Instantiator#instantiate(org.apache.lenya.cms.publication.Publication,
      *      java.lang.String, java.lang.String)
@@ -117,12 +130,12 @@
         ModifiableSource metaSource = null;
         try {
             metaSource = (ModifiableSource) resolver.resolveURI(publicationsUri + "/"
-                    + newPublicationId + "/publication.xml");
+                    + newPublicationId + "/" + CONFIGURATION_FILE);
             Document metaDoc = DocumentHelper.readDocument(metaSource.getInputStream());
-            NamespaceHelper helper = new NamespaceHelper("http://apache.org/cocoon/lenya/publication/1.0",
-                    "lenya",
+            NamespaceHelper helper = new NamespaceHelper(CONFIGURATION_NAMESPACE,
+                    "",
                     metaDoc);
-            Element nameElement = helper.getFirstChild(metaDoc.getDocumentElement(), "name");
+            Element nameElement = helper.getFirstChild(metaDoc.getDocumentElement(), ELEMENT_NAME);
             DocumentHelper.setSimpleElementText(nameElement, name);
 
             save(metaDoc, metaSource);
@@ -142,12 +155,15 @@
         try {
 
             configSource = (ModifiableSource) resolver.resolveURI(publicationsUri + "/"
-                    + newPublicationId + "/config/publication.xconf");
-            DefaultConfiguration config = (DefaultConfiguration) new DefaultConfigurationBuilder().build(configSource.getInputStream());
+                    + newPublicationId + "/" + CONFIGURATION_FILE);
+
+            final boolean ENABLE_XML_NAMESPACES = true;
+            DefaultConfiguration config = 
+                    (DefaultConfiguration) new DefaultConfigurationBuilder(ENABLE_XML_NAMESPACES).build(configSource.getInputStream());
             addTemplateConfiguration(template, config);
             
-            removeChildren(config, "module");
-            removeChildren(config, "resource-type");
+            removeChildren(config.getMutableChild(ELEMENT_MODULES), ELEMENT_MODULE);
+            removeChildren(config.getMutableChild(ELEMENT_RESOURCE_TYPES), ELEMENT_RESOURCE_TYPE);
             
             OutputStream oStream = configSource.getOutputStream();
             new DefaultConfigurationSerializer().serialize(oStream, config);
@@ -171,25 +187,24 @@
         }
     }
 
-    protected void addTemplateConfiguration(Publication template, DefaultConfiguration config) {
-        DefaultConfiguration templatesConfig = (DefaultConfiguration) config.getChild("templates",
-                false);
+    protected void addTemplateConfiguration(Publication template, DefaultConfiguration config) throws ConfigurationException {
+        MutableConfiguration templatesConfig = config.getMutableChild(ELEMENT_TEMPLATES, false);
         if (templatesConfig == null) {
-            templatesConfig = new DefaultConfiguration("templates");
+            templatesConfig = new DefaultConfiguration(ELEMENT_TEMPLATES, null, CONFIGURATION_NAMESPACE, "");
             config.addChild(templatesConfig);
         } else {
-            Configuration[] templateConfigs = templatesConfig.getChildren("template");
+            MutableConfiguration[] templateConfigs = templatesConfig.getMutableChildren(ELEMENT_TEMPLATE);
             for (int i = 0; i < templateConfigs.length; i++) {
                 templatesConfig.removeChild(templateConfigs[i]);
             }
         }
-        DefaultConfiguration templateConfig = new DefaultConfiguration("template");
-        templateConfig.setAttribute("id", template.getId());
+        DefaultConfiguration templateConfig = new DefaultConfiguration(ELEMENT_TEMPLATE, null, CONFIGURATION_NAMESPACE, "");
+        templateConfig.setAttribute(ATTRIBUTE_ID, template.getId());
         templatesConfig.addChild(templateConfig);
     }
 
-    protected void removeChildren(DefaultConfiguration config, String name) {
-        Configuration[] moduleConfigs = config.getChildren(name);
+    protected void removeChildren(MutableConfiguration config, String name) throws ConfigurationException {
+        MutableConfiguration[] moduleConfigs = config.getMutableChildren(name);
         for (int i = 0; i < moduleConfigs.length; i++) {
             config.removeChild(moduleConfigs[i]);
         }

Modified: lenya/trunk/src/pubs/default/publication.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/publication.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/pubs/default/publication.xml (original)
+++ lenya/trunk/src/pubs/default/publication.xml Fri Apr 13 07:02:49 2007
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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$ -->
-
-<lenya:publication xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0" lenya:show="true">
-  <lenya:name>Default Publication</lenya:name>
-  <lenya:pub-version>@lenya.version@</lenya:pub-version>
-  <lenya:lenya-version>@lenya.version@</lenya:lenya-version>
-  <lenya:lenya-revision>@lenya.revision@</lenya:lenya-revision>
-  <lenya:cocoon-version>2.1.8 or 2.1.9-dev</lenya:cocoon-version>
-  <lenya:modules>
-    <lenya:module>lucene</lenya:module>
-    <lenya:module>homepage</lenya:module>
-    <lenya:module>xhtml</lenya:module>
-    <lenya:module>links</lenya:module>
-    <lenya:module href="https://svn.apache.org/repos/asf/lenya/trunk/src/modules/opendocument">opendocument</lenya:module>
-    <lenya:module>cforms</lenya:module>
-    <lenya:module>sitetree</lenya:module>
-    <lenya:module>...</lenya:module>
-  </lenya:modules>
-  <lenya:description>This publication is a best practice, getting started publication.</lenya:description>
-  <lenya:credits>Special thanks to </lenya:credits>
-  <lenya:help></lenya:help>
-  <lenya:changelog>changes.xml</lenya:changelog>
-  <lenya:license></lenya:license>
-  <lenya:readme>
-    <ol>
-      <li><a href="live/index.html">Reader`s View</a> (Live)</li>
-      <li><a href="authoring/index.html">Editor`s View</a> (Authoring)</li>
-    </ol>
-
-    <h4>Use WebDAV</h4>
-    <ul>
-      <li>Cadaver: cadaver http://127.0.0.1:8888/default/webdav</li>
-      <li>More Info: <a href="http://wiki.apache.org/lenya/HowToEditWithWebDAV">http://wiki.apache.org/lenya/HowToEditWithWebDAV</a></li>
-    </ul>
-
-    <!--
-    <h4>Enable JCR</h4>
-    <ul>
-      <li>Build Lenya and start it</li>
-      <li>Import content from filesystem into JCR Repository by executing: <a href="../index.html?lenya.usecase=jcr.import">../index.html?lenya.usecase=jcr.import</a>
-      </li>
-      <li>Stop Lenya</li>
-      <li>Switch the NodeFactory within <i>build/lenya/webapp/WEB-INF/classes/org/apache/lenya/lenya.roles</i> to <i>org.apache.lenya.cms.jcr.JCRNodeFactory</i>
-      </li>
-      <li>Optional: The JCR implementation can be configured within local.build.properties resp. build.properties</li>
-      <li>Start Lenya</li>
-    </ul>
-    -->
-
-  </lenya:readme>
-</lenya:publication>

Modified: lenya/trunk/src/resources/dev/eclipse/project
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/dev/eclipse/project?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
Binary files - no diff available.

Modified: lenya/trunk/src/targets/dist-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/dist-build.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/targets/dist-build.xml (original)
+++ lenya/trunk/src/targets/dist-build.xml Fri Apr 13 07:02:49 2007
@@ -117,9 +117,9 @@
   	
   	<!-- Replace version placeholder with build version -->
   	<replace dir="${dist.src.dir}">
-  	  <include name="**/introduction.xml"/>
+          <include name="**/welcome.xml"/>
   	  <include name="**/about.xml"/>
-	  <include name="**/publication.xml"/>
+	  <include name="**/config/publication.xconf"/>
   	  <replacefilter token="@lenya.version@" value="${version}"/>
   	  <replacefilter token="@lenya.revision@" value="${lenya.revision}"/>
   	</replace>

Modified: lenya/trunk/src/targets/test-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/test-build.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/targets/test-build.xml (original)
+++ lenya/trunk/src/targets/test-build.xml Fri Apr 13 07:02:49 2007
@@ -73,7 +73,7 @@
       </fileset>
     </copy>
     <replace encoding="utf-8"
-      file="${build.webapp}/lenya/pubs/${test.pub.id}/publication.xml"
+      file="${build.webapp}/lenya/pubs/${test.pub.id}/config/publication.xconf"
       token="Default Publication" value="Test Publication"/>
   </target>
   

Modified: lenya/trunk/src/targets/webapp-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/webapp-build.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/targets/webapp-build.xml (original)
+++ lenya/trunk/src/targets/webapp-build.xml Fri Apr 13 07:02:49 2007
@@ -194,9 +194,9 @@
   	
     <!-- Replace version placeholder with build version -->
     <replace dir="${build.webapp}">
-      <include name="lenya/content/introduction.xml"/>
+      <include name="lenya/content/welcome.xml"/>
       <include name="lenya/content/about.xml"/>
-      <include name="**/publication.xml"/>
+      <include name="**/config/publication.xconf"/>
       <replacefilter token="@lenya.version@" value="${version}"/>
       <replacefilter token="@lenya.revision@" value="${lenya.revision}"/>
     </replace>

Modified: lenya/trunk/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/global-sitemap.xmap?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/global-sitemap.xmap (original)
+++ lenya/trunk/src/webapp/global-sitemap.xmap Fri Apr 13 07:02:49 2007
@@ -89,9 +89,9 @@
 <!-- =========================== Pipelines ================================= -->
 
     <map:pipeline>
-      <map:match pattern="publications.xml">
+      <map:match pattern="aggregate-publications">
         <map:generate type="directory" src="lenya/pubs"/>
-        <map:transform src="lenya/xslt/util/xinclude.xsl"/>
+        <map:transform src="lenya/xslt/util/aggregate-publications.xsl"/>
         <map:transform type="xinclude"/>
         <map:serialize type="xml"/>
       </map:match>
@@ -210,8 +210,9 @@
         <map:serialize type="xml"/>
       </map:match>
       
+    </map:pipeline>
       <!-- menus -->
-      
+    <map:pipeline type="profile-noncaching">  
       <!-- menu-xml/modules -->
       <!-- menu-xml/modules/{pub-id}/{area}.xml -->
       <map:match pattern="menu-xml/modules/*/*.xml">
@@ -222,8 +223,9 @@
         <map:transform type="xinclude"/>
         <map:serialize type="xml"/>
       </map:match>
+    </map:pipeline>
 
-
+    <map:pipeline>
       <!-- menu-xml/module/{area}/{module-id}.xml -->
       <map:match pattern="menu-xml/module/*/*.xml">
         <map:select type="resource-exists">
@@ -307,9 +309,10 @@
 
     <map:pipeline>
       <map:match pattern="index.html">
-        <map:aggregate element="lenya" ns="http://apache.org/cocoon/lenya/publication/1.0" prefix="lenya" label="aggregate">
-          <map:part src="cocoon:/publications.xml"/>
-          <map:part src="lenya/content/introduction.xml"/>
+        <map:aggregate element="aggregation-wrapper" label="aggregate">
+          <map:part src="cocoon:/aggregate-publications"/>
+          <map:part src="lenya/content/welcome.xml"/>
+          <map:part src="readme.xml"/>
         </map:aggregate>
         <map:transform src="lenya/xslt/util/welcome.xsl"/>
         <map:call resource="style-cms-page"/>
@@ -367,15 +370,11 @@
 
       <!-- About Publication -->
       <map:match pattern="*/introduction.html">
-        <map:generate src="lenya/pubs/{1}/publication.xml" />
-        <map:transform src="lenya/xslt/util/publication.xsl"/>
-        <map:call resource="style-cms-page"/>
-        <map:serialize />
-      </map:match>
-      <!-- Publication Tests-->
-      <map:match pattern="*/tests.html">
-        <map:generate src="lenya/pubs/{1}/publication-tests.xml" />
-        <map:transform src="lenya/xslt/util/publication.xsl"/>
+        <map:aggregate element="aggregation-wrapper">
+          <map:part src="aggregate-fallback://readme.xml"/>
+          <map:part src="lenya/pubs/{1}/config/publication.xconf"/>
+        </map:aggregate>
+        <map:transform src="lenya/xslt/util/introduction.xsl"/>
         <map:call resource="style-cms-page"/>
         <map:serialize />
       </map:match>

Modified: lenya/trunk/src/webapp/lenya/content/about.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/content/about.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/content/about.xml (original)
+++ lenya/trunk/src/webapp/lenya/content/about.xml Fri Apr 13 07:02:49 2007
@@ -18,25 +18,27 @@
 
 <!-- $Id$ -->
 
-<page:page  
-   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
-
-<page:title>Apache Lenya @lenya.version@ (Revision: @lenya.revision@)</page:title>
-<page:body>
-<div class="lenya-box">
-<p>
-This software consists of voluntary contributions made by many individuals
-on behalf of the <br /><a href="http://www.apache.org/">Apache Software Foundation</a> 
-and was originally created by <a href="mailto:michi@apache.org">Michael Wechner</a>.
-<br /><br />
-Apache Lenya includes software developed by the <a href="http://www.apache.org/">Apache Software Foundation</a>, 
-<a href="http://w3c.org">W3C</a>, <br /> and <a href="http://sf.net/projects/websphinx">WebSPHINX</a>.
-<br /><br /> 
-Copyright (C) 2006 The Apache Software Foundation. All rights reserved.
-</p>
-<form id="form-about-back">
-<input type="button" value="Back" onClick="history.go(-1)" name="input-back"/>
-</form>		
-</div>
-      </page:body>
-    </page:page>
+<page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
+  <page:title>Apache Lenya @lenya.version@ (Revision: @lenya.revision@)</page:title>
+  <page:body>
+    <div class="lenya-box">
+      <p>
+        This software consists of voluntary contributions made by many individuals
+        on behalf of the <br /><a href="http://www.apache.org/">Apache Software Foundation</a> 
+        and was originally created by <a href="mailto:michi@apache.org">Michael Wechner</a>.
+      </p>
+      <p>
+        Apache Lenya includes software developed by the 
+        <a href="http://www.apache.org/">Apache Software Foundation</a>, 
+        <a href="http://w3c.org">W3C</a>, and 
+        <a href="http://sf.net/projects/websphinx">WebSPHINX</a>.
+      </p>
+      <p>
+        Copyright (C) 2006 The Apache Software Foundation. All rights reserved.
+      </p>
+      <form id="form-about-back">
+        <input type="button" value="Back" onClick="history.go(-1)" name="input-back"/>
+      </form>		
+    </div>
+  </page:body>
+</page:page>

Modified: lenya/trunk/src/webapp/lenya/content/introduction.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/content/introduction.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/content/introduction.xml (original)
+++ lenya/trunk/src/webapp/lenya/content/introduction.xml Fri Apr 13 07:02:49 2007
@@ -18,26 +18,60 @@
 
 <!-- $Id$ -->
 
-<div xmlns="http://www.w3.org/1999/xhtml" class="lenya-frontpage">
-<h2>Welcome to Apache Lenya</h2>
-<p>
-You have successfully installed Apache Lenya <strong>@lenya.version@</strong> (Revision: @lenya.revision@). To start, click on any of the publications on the left.</p>
-
-<h3>About Apache Lenya</h3>
-<p>
-<a href="http://lenya.apache.org">Apache Lenya</a> is a Java-based <a href="http://www.opensource.org">Open-Source</a>
-Content Management System. It
-is based on open standards such as <a href="http://www.w3c.org/XML/">XML</a> and <a href="http://www.w3c.org/TR/xslt">XSLT</a>. One of its core
-components is <a href="http://cocoon.apache.org">Cocoon</a> from the
-<a href="http://www.apache.org">Apache Software Foundation</a>.
-</p>
-		
-<p>
-Lenya supports inline WYSIWYG editors such as <a href="http://kupu.oscom.org">Kupu</a> or <a href="http://bxe.oscom.org">BXE</a>. Your site editors do
-not have to learn XML. This is possible thanks to the support
-of XML, XSLT and XML Schema on the client side.
-An administration interface allows advanced users to
-monitor the CMS, and perform configuration tasks.
-</p>
-		
-</div>
+<page:page xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0">
+  <page:title>Apache Lenya @lenya.version@ (Revision:@lenya.revision@)</page:title>
+  <page:body>
+  
+    <div xmlns="http://www.w3.org/1999/xhtml" class="lenya-frontpage">
+    
+      <h2>Welcome to Apache Lenya</h2>
+      <p>
+        You have successfully installed Apache Lenya 
+        <strong>@lenya.version@</strong> (Revision: @lenya.revision@).
+        To start, click on any of the publications on the left, or create
+        a new publication.
+      </p>
+    
+      <h3>About</h3>
+      <p>
+        <a href="http://lenya.apache.org">Apache Lenya</a> is a Java-based
+        <a href="http://www.opensource.org">open-source</a> Content Management 
+        System. It is based on open standards such as 
+        <a href="http://www.w3c.org/XML/">XML</a> and 
+        <a href="http://www.w3c.org/TR/xslt">XSLT</a>. It is based on
+        <a href="http://cocoon.apache.org">Apache Cocoon</a>.
+      </p>
+      <p>
+        Lenya is a community project and is being developed under the aegis of the 
+        <a href="http://www.apache.org/">Apache Software Foundation (ASF)</a>. The
+        project was donated to the ASF by Michael Wechner of <a
+        href="http://wyona.com">Wyona AG</a> and accepted as a top-level ASF
+        project in 2004. You are welcome to join our mailing lists and contribute!
+      </p>
+      
+      <h3>Features</h3>
+      <ul>
+        <li>supports multi-lingual websites</li>
+        <li>
+          includes several client-side content editors, many of them
+          WYSIWYG
+        </li>
+        <li>allows for complex workflows (edit/submit/review/publish)</li>
+        <li>
+          allows for arbitrary output, does not impose standard layouts or 
+          techniques (such as HTML tables) on the user
+        </li>
+        <li>
+          provides revision control, old page versions can be viewed and restored
+          if necessary
+        </li>
+        <li>
+          powerful XML processing capabilities thanks to the underlying Cocoon
+          engine
+        </li>
+        <li>...</li>
+      </ul>
+    </div>
+  
+  </page:body>
+</page:page>

Modified: lenya/trunk/src/webapp/lenya/resources/css/default.css
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/css/default.css?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/css/default.css (original)
+++ lenya/trunk/src/webapp/lenya/resources/css/default.css Fri Apr 13 07:02:49 2007
@@ -20,7 +20,7 @@
 @import url(menu.css);
 @import url(tabs.css);
 @import url(boxes.css);
-
+  
 body {
     margin: 0px;
     padding: 0px;
@@ -28,11 +28,16 @@
 }
 
 h1 {
-    font-family: Verdana, sans-serif;
     font-size: 150%;
     padding: 0px;
     margin: 0px;
 }
+
+h2 { font-size: 120%; }
+h3 { font-size: 110%; }
+h4 { font-size: 100%; }
+h5 { font-size: 90%; }
+h6 { font-size: 80%; }
 
 p {
     font-size: small;

Modified: lenya/trunk/src/webapp/lenya/resources/css/tables.css
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/css/tables.css?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/css/tables.css (original)
+++ lenya/trunk/src/webapp/lenya/resources/css/tables.css Fri Apr 13 07:02:49 2007
@@ -28,29 +28,35 @@
 }
 
 table.lenya-table th {
-    background-color: #DDDCCF;
+  background-color: #DDDCCF;
 	border: solid 1px #CCCCCC;
 	color: Black;
 	font-weight: bold;
 	padding: 3px 10px;
 	text-align: left;
+	vertical-align: top;
 	font-size: small;
 }
 
 table.lenya-table td {
-    background-color: #F5F4E9;
+  background-color: #F5F4E9;
 	border: solid 1px #CCCCCC;
 	padding: 3px 10px;
 	font-size: small;
 	color: Black;
 }
 
-table.lenya-table-noborder td {
+table.lenya-table-noborder td, table.lenya-table-noborder th {
 	border: 0px;
 	padding: 3px 10px;
 	font-size: small;
 }
 
+table.lenya-table-noborder th {
+  vertical-align: top;
+  text-align: left;
+}
+
 table.lenya-table-noborder-nopadding td {
 	border: 0px;
 	padding: 0px;
@@ -72,6 +78,7 @@
 table.lenya-table-list-noborder th,
 table.lenya-table-list-noborder td {
   text-align: left;
+  vertical-align: top;
   padding: 2px 2em 2px 5px;
   border-bottom: solid 1px #CCCCCC;
 	font-size: small;
@@ -104,6 +111,10 @@
 
 table.lenya-table-list-noborder td {
   border-bottom: none;
+}
+
+table.lenya-table-list-noborder td.border {
+  border-bottom: solid 1px #CCCCCC;
 }
 
 table.lenya-table-list-noborder th,

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/cmsui_de.xml Fri Apr 13 07:02:49 2007
@@ -379,8 +379,19 @@
   <message key="lenya.rc.checkedoutalready">Die Ressource wurde bereits von jemand anders ausgecheckt.</message>
   <message key="lenya.rc.nocheckin">Resource konnte nicht eingecheckt werden</message>
   <message key="Generic Exception">Allgemeiner Fehler</message>
-  <message key="Check the log files.">Ü	berprüfen Sie die Logdatei.</message>
-
+  <message key="Check the log files.">Überprüfen Sie die Logdatei.</message>
+  
+  <!-- Publication introduction page -->
+  <message key="Publication properties">Eigenschaften der Publikation</message>
+  <message key="Available languages">Verfügbare Sprachen</message>
+  <message key="Available resource types">Verfügbare Ressource-Typen</message>
+  <message key="Required Lenya version">Benötigte Lenya-Version</message>
+  <message key="Required Lenya revision">Benötigte Lenya-Revision</message>
+  <message key="Required Cocoon version">Benötigte Cocoon-Version</message>
+  <message key="Modules used">Verwendete Module</message>
+  <message key="Templates used">Verwendete Templates</message>
+  <message key="Inherited: see template publication">Vererbt: Siehe Template-Publikation</message>
+  
   <!-- Error messages of a general nature -->
   <message key="error-document-form">Dokument ist nicht wohlgeformt: {0}</message>
   <message key="error-validation">Schema Validierung schlug fehl: {0}</message>
@@ -389,5 +400,6 @@
   <message key="error-document-existance">Das angeforderte Dokument {0} existiert nicht.</message>
   <message key="error-generic">Ein Fehler ist aufgetreten.</message>
   <message key="error-404">404: Seite nicht gefunden</message>
+  
 </catalogue>
 

Modified: lenya/trunk/src/webapp/lenya/resources/i18n/modules2xinclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/i18n/modules2xinclude.xsl?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/i18n/modules2xinclude.xsl (original)
+++ lenya/trunk/src/webapp/lenya/resources/i18n/modules2xinclude.xsl Fri Apr 13 07:02:49 2007
@@ -21,9 +21,9 @@
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xi="http://www.w3.org/2001/XInclude"
-  xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
+  xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
   >
-  
+
   <xsl:param name="pubId"/>
   <xsl:param name="catalogue"/>
 
@@ -31,17 +31,15 @@
   <xsl:template match="catalogue">
     <xsl:copy>
       <xsl:copy-of select="@*|node()"/>
-      <xsl:apply-templates select="document('aggregate-fallback://config/publication.xconf')/publication/module"/>
+      <xsl:apply-templates select="document('aggregate-fallback://config/publication.xconf')/*/lenya:modules/lenya:module"/>
     </xsl:copy>
-  </xsl:template>  
-  
-  
-  <xsl:template match="module">
+  </xsl:template>
+
+  <xsl:template match="lenya:module">
     <xsl:if test="not(preceding-sibling::module[@name = current()/@name])">
       <xi:include href="cocoon:/i18n-catalogue/module/{@name}/{$catalogue}"
         xpointer="xpointer(/catalogue/message)"/>
     </xsl:if>
   </xsl:template>
-  
-  
+
 </xsl:stylesheet>

Modified: lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/modules/modules2xinclude.xsl Fri Apr 13 07:02:49 2007
@@ -19,25 +19,24 @@
 <!-- $Id: xinclude.xsl 123414 2004-12-27 14:52:24Z gregor $ -->
 
 <xsl:stylesheet version="1.0"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xi="http://www.w3.org/2001/XInclude"
-    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
-    xmlns:dir="http://apache.org/cocoon/directory/2.0"
+    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
     xmlns:menu="http://apache.org/cocoon/lenya/menubar/1.0"
-    >
+    xmlns:xi="http://www.w3.org/2001/XInclude"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+>
 
   <xsl:param name="area"/>
 
-  <xsl:template match="publication">
+  <xsl:template match="lenya:publication">
     <menu:menu>
-      <xsl:apply-templates select="module"/>
+      <xsl:apply-templates select="lenya:modules/lenya:module"/>
     </menu:menu>
   </xsl:template>
 
-  <xsl:template match="module">
-    <xsl:if test="not(preceding-sibling::module[@name = current()/@name])">
+  <xsl:template match="lenya:module">
+    <xsl:if test="not(preceding-sibling::lenya:module[@name = current()/@name])">
       <xi:include href="cocoon:/menu-xml/module/{$area}/{@name}.xml" xpointer="xpointer(/*/*)"/>
-    </xsl:if>
+    </xsl:if>
   </xsl:template>
 
 </xsl:stylesheet>

Modified: lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl?view=diff&rev=528490&r1=528489&r2=528490
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl Fri Apr 13 07:02:49 2007
@@ -19,49 +19,69 @@
 <!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
+    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
+    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+    xmlns:xhtml="http://www.w3.org/1999/xhtml"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.0"
     xmlns="http://www.w3.org/1999/xhtml"
-    xmlns:xhtml="http://www.w3.org/1999/xhtml"
-    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
-    >
+>
 
-<xsl:template match="lenya:lenya">
+<xsl:template match="/*">
   <page:page>
-    
-  <page:title>Apache Lenya - Content Management System</page:title>
-  <page:head>
-    <xhtml:meta http-equiv="cache-control" content="no-cache"/>
-    <xhtml:meta http-equiv="pragma" content="no-cache"/>
-  </page:head>  
-  <page:body>
-    <xsl:apply-templates select="xhtml:div[@class = 'lenya-frontpage']"/>
-    <xsl:apply-templates select="lenya:publications"/>
-  </page:body>
+    <page:title>Apache Lenya - Content Management System</page:title>
+    <page:head>
+      <xhtml:meta http-equiv="cache-control" content="no-cache"/>
+      <xhtml:meta http-equiv="pragma" content="no-cache"/>
+    </page:head>  
+    <page:body>
+      <xsl:apply-templates select="lenya:publications"/>
+      <xsl:apply-templates select="page:page"/>
+    </page:body>
   </page:page>
 </xsl:template>
 
 <xsl:template match="lenya:publications">
-<div class="lenya-sidebar">
-<div class="lenya-sidebar-heading">Publications</div>
+  <div class="lenya-sidebar">
+  <div class="lenya-sidebar-heading">Publications</div>
   <div class="lenya-publication-item">
     <strong><a href="index.html?lenya.usecase=templating.createPublicationFromTemplate">New publication</a></strong>
   </div>
-<xsl:for-each select="lenya:publication">
-  <xsl:choose>
-    <xsl:when test="lenya:publication/@lenya:show = 'false'">
-      <!-- do not list this publication. Might be a "template" publication -->
-    </xsl:when>
-    <xsl:otherwise>
-      <div class="lenya-publication-item">
-        <a href="{@pid}/introduction.html">
-        <xsl:value-of select="lenya:publication/lenya:name|lenya:publication/lenya:name/@name"/></a>
-      </div>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:for-each>
-</div>
+  <!-- do not list publications with @show="false" 
+     (can be used to hide template publications -->
+  <xsl:for-each select="lenya:publication[not(@show) or @show != 'false']">
+    <div class="lenya-publication-item">
+      <a>
+        <xsl:attribute name="href"><xsl:value-of select="@dirname"/><xsl:text>/introduction.html</xsl:text></xsl:attribute>
+        <xsl:attribute name="title"><xsl:value-of select="lenya:description"/></xsl:attribute>
+        <xsl:value-of select="lenya:name"/>
+      </a>
+    </div>
+  </xsl:for-each>
+  </div>
+</xsl:template>
+
+<xsl:template match="page:page">
+   <xsl:apply-templates select="page:body/*"/>
 </xsl:template>
+
+<!-- we are aggretating into a new context: 
+     (another good reason to move to xhtml2) -->
+<xsl:template match="xhtml:h1">
+  <h2><xsl:apply-templates select="@*|node()"/></h2>
+</xsl:template>
+<xsl:template match="xhtml:h2">
+  <h3><xsl:apply-templates select="@*|node()"/></h3>
+</xsl:template>
+<xsl:template match="xhtml:h3">
+  <h4><xsl:apply-templates select="@*|node()"/></h4>
+</xsl:template>
+<xsl:template match="xhtml:h4">
+  <h5><xsl:apply-templates select="@*|node()"/></h5>
+</xsl:template>
+<xsl:template match="xhtml:h5|xhtml:h6">
+  <h6><xsl:apply-templates select="@*|node()"/></h6>
+</xsl:template>
+
 
 <xsl:template match="@*|node()">
   <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>



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


Re: svn commit: r528490 - in /lenya/trunk/src: impl/java/org/apache/lenya/cms/publication/ pubs/blog/ pubs/blog/config/ pubs/default/ pubs/default/config/ pubs/default/java/src/org/apache/lenya/defaultpub/cms/publication/templating/ resources/dev/eclipse/ ...

Posted by Joern Nettingsmeier <ne...@folkwang-hochschule.de>.
nettings@apache.org wrote:
> Author: nettings
>
> TODO:
> * fix NPE during build if src/pubs/[default|blog]/publication.xml is
>   deleted entirely (as a workaround, it's now a null-byte file).
> * get rid of multiple-inheritance templating code (which does not work).
>   currently, that stuff has only been removed from the user-visible
>   configuration. under the hood, it still looks as if we supported it.
>   some weird empty-array semantics and a world of null objects pain...

sorry for this unfinished business, but i've been banging my head 
against it for quite some time, to no avail. anyone?



-- 
jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

Kurt is up in Heaven now.

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