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/06 18:01:42 UTC

svn commit: r526211 [2/2] - in /lenya/branches/trunk-rework-pubconf: ./ src/impl/java/org/apache/lenya/cms/publication/ src/java/org/apache/lenya/cms/cocoon/components/modules/input/ src/java/org/apache/lenya/cms/cocoon/source/ src/java/org/apache/leny...

Modified: lenya/branches/trunk-rework-pubconf/src/modules/kupu/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/kupu/sitemap.xmap?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/kupu/sitemap.xmap (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/kupu/sitemap.xmap Fri Apr  6 09:01:39 2007
@@ -91,55 +91,55 @@
       </map:match>
     </map:pipeline>   
     
-    <map:pipeline>           
-        <map:match pattern="open" type="step">
-          <map:match pattern="*/authoring/**.html">
-            <!-- Check if Kupu is installed -->
-            <map:act type="resource-exists" 
-              src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/kupu/kupumacros.html">
-              <map:act type="reserved-checkout">
-                <map:generate type="serverpages" 
-                  src="fallback://lenya/content/rc/{exception}.xsp">
-                  <map:parameter name="user" value="{user}"/>
-                  <map:parameter name="filename" value="{filename}"/>
-                  <map:parameter name="date" value="{date}"/>
-                  <map:parameter name="message" value="{message}"/>
-                </map:generate>
-                <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
-                <map:call resource="style-cms-page"/>
-                <map:serialize />
-              </map:act>
-              <map:generate 
-                src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/kupu/kupumacros.html"/>
-              <map:transform src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/kupumacros.xsl">
-                <map:parameter name="contentfile" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=content"/>
-                <map:parameter name="context-prefix" value="{request:contextPath}/{page-envelope:publication-id}/modules/kupu"/>
-                <!-- Only used to display the document path of the edited doc  -->
-                <map:parameter name="document-path" value="{page-envelope:document-path}"/>
-                <map:parameter name="save-destination" 
-                  value="{request:requestURI}"/>
-                <map:parameter name="exit-destination" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=exit"/>
-                <map:parameter name="reload-after-save" value="1"/>
-                <map:parameter name="use-css" value="1"/>
-                <map:parameter name="imagedrawer-xsl-uri" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=imagedrawerxsl"/>
-                <map:parameter name="linkdrawer-xsl-uri" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=linkdrawerxsl"/>
-                <map:parameter name="image-libraries-uri" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=image_libraries"/>
-                <map:parameter name="link-libraries-uri" 
-                  value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=link_libraries"/>
-              </map:transform>
-              <map:serialize type="xhtml"/>
-            </map:act>
-            <!-- If Kupu is not installed; Action failed -->
-            <map:generate src="fallback://lenya/resources/misc/kupu/download.xhtml"/>
+    <map:pipeline>
+      
+      <map:match pattern="kupu.open">
+        <!-- Check if Kupu is installed -->
+        <map:act type="resource-exists" 
+          src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/kupu/kupumacros.html">
+          <map:act type="reserved-checkout">
+            <map:generate type="serverpages" 
+              src="fallback://lenya/content/rc/{exception}.xsp">
+              <map:parameter name="user" value="{user}"/>
+              <map:parameter name="filename" value="{filename}"/>
+              <map:parameter name="date" value="{date}"/>
+              <map:parameter name="message" value="{message}"/>
+            </map:generate>
+            <map:transform src="fallback://lenya/xslt/rc/rco-exception.xsl"/>
             <map:call resource="style-cms-page"/>
             <map:serialize />
-          </map:match>
-        </map:match>
+          </map:act>
+          <map:generate 
+            src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/kupu/kupumacros.html"/>
+          <map:transform src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/kupumacros.xsl">
+            <map:parameter name="contentfile" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=content"/>
+            <map:parameter name="context-prefix" value="{request:contextPath}/{page-envelope:publication-id}/modules/kupu"/>
+            <!-- Only used to display the document path of the edited doc  -->
+            <map:parameter name="document-path" value="{page-envelope:document-path}"/>
+            <map:parameter name="save-destination" 
+              value="{request:requestURI}?lenya.event=edit"/>
+            <map:parameter name="exit-destination" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=exit"/>
+            <map:parameter name="reload-after-save" value="1"/>
+            <map:parameter name="use-css" value="1"/>
+            <map:parameter name="imagedrawer-xsl-uri" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=imagedrawerxsl"/>
+            <map:parameter name="linkdrawer-xsl-uri" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=linkdrawerxsl"/>
+            <map:parameter name="image-libraries-uri" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=image_libraries"/>
+            <map:parameter name="link-libraries-uri" 
+              value="{request:requestURI}?lenya.module=kupu&amp;lenya.step=link_libraries"/>
+          </map:transform>
+          <map:serialize type="xhtml"/>
+        </map:act>
+        <!-- If Kupu is not installed; Action failed -->
+        <map:generate src="fallback://lenya/resources/misc/kupu/download.xhtml"/>
+        <map:call resource="style-cms-page"/>
+        <map:serialize />
+      </map:match>
+        
         <!-- Requested by Kupu to load the document into the editor -->    
         <map:match pattern="content" type="step">
           <map:match pattern="*/authoring/**">

Modified: lenya/branches/trunk-rework-pubconf/src/modules/resource/java/src/org/apache/lenya/cms/site/usecases/CreateResource.java
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/resource/java/src/org/apache/lenya/cms/site/usecases/CreateResource.java?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/resource/java/src/org/apache/lenya/cms/site/usecases/CreateResource.java (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/resource/java/src/org/apache/lenya/cms/site/usecases/CreateResource.java Fri Apr  6 09:01:39 2007
@@ -125,7 +125,7 @@
         } else {
             addErrorMessage(MESSAGE_UPLOAD_MISSING_EXTENSION);
         }
-        return extension;
+        return extension.toLowerCase();
     }
 
 }

Modified: lenya/branches/trunk-rework-pubconf/src/modules/sitetree/resources/i18n/cmsui_de.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/sitetree/resources/i18n/cmsui_de.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/sitetree/resources/i18n/cmsui_de.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/sitetree/resources/i18n/cmsui_de.xml Fri Apr  6 09:01:39 2007
@@ -18,7 +18,7 @@
 
 <!-- $Id: cmsui.xml 446564 2006-09-15 10:13:16Z andreas $ -->
 
-<catalogue xml:lang="en" xmlns:xhtml="http://www.w3.org/1999/xhtml">
+<catalogue xml:lang="de" xmlns:xhtml="http://www.w3.org/1999/xhtml">
 
   <!-- Nudge document -->
   <message key="nudge-error-direction-unknown">Die Richtung {0} wird nicht unterstützt!</message>

Modified: lenya/branches/trunk-rework-pubconf/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeMetaData.java
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeMetaData.java?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeMetaData.java (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/sourcerepository/java/src/org/apache/lenya/cms/repository/SourceNodeMetaData.java Fri Apr  6 09:01:39 2007
@@ -124,12 +124,7 @@
         Element[] elements = getElementSet().getElements();
         for (int i = 0; i < elements.length; i++) {
             if (elements[i].getActionOnCopy() == Element.ONCOPY_COPY) {
-                String key = elements[i].getName();
-                removeAllValues(key);
-                String[] values = other.getValues(key);
-                for (int j = 0; j < values.length; j++) {
-                    addValue(key, values[j]);
-                }
+                replaceBy(other, elements[i]);
             } else if (elements[i].getActionOnCopy() == Element.ONCOPY_DELETE) {
                 String key = elements[i].getName();
                 removeAllValues(key);
@@ -137,15 +132,19 @@
         }
     }
 
+    protected void replaceBy(MetaData other, Element element) throws MetaDataException {
+        String key = element.getName();
+        removeAllValues(key);
+        String[] values = other.getValues(key);
+        for (int j = 0; j < values.length; j++) {
+            addValue(key, values[j]);
+        }
+    }
+
     public void forcedReplaceBy(MetaData other) throws MetaDataException {
         Element[] elements = getElementSet().getElements();
         for (int i = 0; i < elements.length; i++) {
-            String key = elements[i].getName();
-            removeAllValues(key);
-            String[] values = other.getValues(key);
-            for (int j = 0; j < values.length; j++) {
-                addValue(key, values[j]);
-            }
+            replaceBy(other, elements[i]);
         }
     }
 

Modified: lenya/branches/trunk-rework-pubconf/src/modules/xhtml/config/menu.xsp
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/xhtml/config/menu.xsp?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/xhtml/config/menu.xsp (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/xhtml/config/menu.xsp Fri Apr  6 09:01:39 2007
@@ -39,8 +39,7 @@
     <menus>
       <menu i18n:attr="name" name="File">
         <block areas="site authoring">
-          <item uc:usecase="sitemanagement.create" href="?doctype=xhtml">
-            <i18n:translate>
+          <item uc:usecase="sitemanagement.create" href="?doctype=xhtml"><i18n:translate>
               <i18n:text>New Document</i18n:text>
               <i18n:param>XHTML</i18n:param>
             </i18n:translate>
@@ -56,10 +55,10 @@
                   String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
                   if ("xhtml".equals(doctype)) {
                       <block areas="authoring">
-                        <item wf:event="edit"><xsp:attribute name="href"><xsp:expr>"?lenya.module=kupu&amp;lenya.step=open"</xsp:expr></xsp:attribute><i18n:text>With Kupu</i18n:text></item>
-                        <item wf:event="edit" uc:usecase="bxe.edit" href="?"><i18n:text>With BXE</i18n:text></item>
-                        <item wf:event="edit" uc:usecase="editors.forms"><xsp:attribute name="href"><xsp:expr>"?form=" + doctype</xsp:expr></xsp:attribute><i18n:text>With Forms</i18n:text></item>
-                        <item wf:event="edit" uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
+                        <item uc:usecase="kupu.edit" href="?"><i18n:text>With Kupu</i18n:text></item>
+                        <item uc:usecase="bxe.edit" href="?"><i18n:text>With BXE</i18n:text></item>
+                        <item uc:usecase="editors.forms"><xsp:attribute name="href"><xsp:expr>"?form=" + doctype</xsp:expr></xsp:attribute><i18n:text>With Forms</i18n:text></item>
+                        <item uc:usecase="editors.oneform" href="?"><i18n:text>With one Form</i18n:text></item>
                       </block>
                   }
               }

Modified: lenya/branches/trunk-rework-pubconf/src/modules/xhtml/xslt/clean-xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/modules/xhtml/xslt/clean-xhtml.xsl?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/modules/xhtml/xslt/clean-xhtml.xsl (original)
+++ lenya/branches/trunk-rework-pubconf/src/modules/xhtml/xslt/clean-xhtml.xsl Fri Apr  6 09:01:39 2007
@@ -31,6 +31,14 @@
     </xsl:copy>
   </xsl:template>
   
+  <!-- Remove tag that disables Firefox spell check in FCK -->
+  <xsl:template match="xhtml:body[@spellcheck]" >
+    <xsl:copy>
+       <xsl:apply-templates select="@*[name()!='spellcheck']" />
+       <xsl:apply-templates />
+    </xsl:copy>
+  </xsl:template>
+
   <!-- Unsupported by the schema -->
   <xsl:template match="@shape|@target|xhtml:u">
     <xsl:apply-templates />

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/ac/usecase-policies.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/ac/usecase-policies.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/ac/usecase-policies.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/ac/usecase-policies.xml Fri Apr  6 09:01:39 2007
@@ -24,6 +24,8 @@
   <usecase id="editors.forms"><role id="edit" method="grant"/></usecase>
   <usecase id="bxe.edit"><role id="edit" method="grant"/></usecase>
   <usecase id="workflow.publish"><role id="edit" method="grant"/></usecase>
+  <usecase id="workflow.deactivate"><role id="edit" method="grant"/></usecase>
+  <usecase id="sitemanagement.delete"><role id="edit" method="grant"/></usecase>
   <usecase id="ac.logout"><role id="edit" method="grant"/></usecase>
   <usecase id="admin.usecases"><role id="edit" method="grant"/></usecase>
   <usecase id="admin.addGroup">

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/menus/entry.xsp
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/menus/entry.xsp?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/menus/entry.xsp (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/config/menus/entry.xsp Fri Apr  6 09:01:39 2007
@@ -51,7 +51,7 @@
       <block>
         <item uc:usecase="workflow.publish" href="?"><i18n:text>Publish</i18n:text></item>
         <item uc:usecase="workflow.deactivate" href="?"><i18n:text>Deactivate</i18n:text></item>
-        <item uc:usecase="workflow.delete" href="?"><i18n:text>Delete</i18n:text></item>
+        <item uc:usecase="sitemanagement.delete" href="?"><i18n:text>Delete</i18n:text></item>
       </block>
       <block>
         <item uc:usecase="ac.logout" href="?"><i18n:text>Logout</i18n:text></item>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/blog/webdav.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/blog/webdav.xmap?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/blog/webdav.xmap (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/blog/webdav.xmap Fri Apr  6 09:01:39 2007
@@ -55,15 +55,7 @@
       <map:match pattern="**/index.webdav.xml">
         <map:select type="request-method">
           <map:when test="PUT">
-            <map:generate type="stream"/>
-            <map:transform src="fallback://lenya/xslt/authoring/edit/addSourceTags.xsl">
-              <map:parameter name="source" value="lenya-document:{page-envelope:document-uuid}"/>
-              <!--
-                <map:parameter name="source" value="content/authoring/entries/{1}.xml"/>
-              -->
-            </map:transform>
-            <map:transform type="write-source"/>
-            <map:serialize type="xml" status-code="204"/> <!-- HTTP status code: 204 No Content -->
+            <map:mount uri-prefix="" src="{fallback:lenya/modules/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/>
           </map:when>
           <map:otherwise> <!-- GET -->
             <map:generate src="lenya-document:{page-envelope:document-uuid}"/>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/config/ac/usecase-policies.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/config/ac/usecase-policies.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/config/ac/usecase-policies.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/config/ac/usecase-policies.xml Fri Apr  6 09:01:39 2007
@@ -313,7 +313,7 @@
     <role id="review" method="grant"/>
     <role id="edit" method="grant"/>
   </usecase>
-  <usecase id="kupu">
+  <usecase id="kupu.edit">
     <role id="admin" method="grant"/>
     <role id="edit" method="grant"/>
   </usecase>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/config/publication.xconf Fri Apr  6 09:01:39 2007
@@ -27,7 +27,8 @@
   <lenya-version>@lenya.version@</lenya-version>
   <lenya-revision>@lenya.revision@</lenya-revision>
   <cocoon-version>2.1.10-dev</cocoon-version>
-  <!-- NOTE: The various languages need to be listed for verification and widget building -->
+
+  <!-- The various languages need to be listed for verification and widget building -->
   <languages>
     <language default="true">en</language>
     <language>de</language>
@@ -35,13 +36,19 @@
     <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 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"/>
@@ -50,9 +57,10 @@
     <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 -->
+  <!-- Modules need to be listed because of the menu and i18n -->
   <modules>
     <module name="editors"/>
     <module name="xhtml"/>
@@ -72,26 +80,24 @@
     <module name="languageselector"/>
     <module name="administration"/>
     <module name="workflow"/>
-    <!-- TODO: The goal is to have a blog module ;-) -->
-    <!--
-    <module name="blog"/>
-    -->
+    <module name="news"/>
   </modules>
 
-  <!-- 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
+  <!-- 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"/>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/example-content/sitetree.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/example-content/sitetree.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/example-content/sitetree.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/example-content/sitetree.xml Fri Apr  6 09:01:39 2007
@@ -63,4 +63,13 @@
     <label xml:lang="en">Search</label>
   </node>
   
+  <node id="news" visibleinnav="true">
+    <label xml:lang="en">News</label>
+    <label xml:lang="de">News</label>
+    <node id="installed" visibleinnav="false">
+      <label xml:lang="en">Lenya installed</label>
+      <label xml:lang="de">Lenya installiert</label>
+    </node>
+  </node>
+  
 </site>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/config/menus/homepage.xsp
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/config/menus/homepage.xsp?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/config/menus/homepage.xsp (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/config/menus/homepage.xsp Fri Apr  6 09:01:39 2007
@@ -45,20 +45,17 @@
                     String doctype = <input:get-attribute module="page-envelope" as="string" name="document-type"/>;
                     if ("homepage".equals(doctype)) {
                         <block areas="authoring">
-                          <item wf:event="edit">
-                             <xsp:attribute name="href">
-                               <xsp:expr>"?lenya.module=kupu&amp;lenya.step=open"</xsp:expr>
-                             </xsp:attribute>
+                          <item uc:usecase="kupu.edit" href="?">
                              <i18n:text>With Kupu</i18n:text>
                           </item>
-                          <item wf:event="edit" uc:usecase="bxe.edit" href="?">
+                          <item uc:usecase="bxe.edit" href="?">
                             <i18n:text>With BXE</i18n:text>
                           </item>
-                          <item wf:event="edit" uc:usecase="editors.forms">
+                          <item uc:usecase="editors.forms">
                             <xsp:attribute name="href"><xsp:expr>"?form=" + doctype</xsp:expr></xsp:attribute>
                             <i18n:text>With Forms</i18n:text>
                           </item>
-                          <item wf:event="edit" uc:usecase="editors.oneform" href="?">
+                          <item uc:usecase="editors.oneform" href="?">
                             <i18n:text>With one Form</i18n:text>
                           </item>
                         </block>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/sitemap.xmap?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/sitemap.xmap (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/sitemap.xmap Fri Apr  6 09:01:39 2007
@@ -37,6 +37,18 @@
           <map:serialize type="xml"/>
         </map:match>
       </map:match>
+      
+      <map:match pattern="news-*_*.xml">
+        <map:select type="resource-exists">
+          <map:when test="site:/{2}/news?format={1}">
+            <map:generate src="site:/{2}/news?format={1}"/>
+          </map:when>
+          <map:otherwise>
+            <map:generate src="fallback://lenya/content/util/empty.xml"/>
+          </map:otherwise>
+        </map:select>
+        <map:serialize type="xml"/>
+      </map:match>
 
       <!-- parametrized doctype matcher -->
       <!-- pattern="{rendertype}" -->
@@ -49,6 +61,7 @@
           <map:parameter name="pubId" value="{page-envelope:publication-id}"/>
           <map:parameter name="contextPath" value="{request:contextPath}"/>
         </map:transform>
+        <map:transform type="cinclude"/>
         <map:serialize type="xml"/>
       </map:match>
 

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl Fri Apr  6 09:01:39 2007
@@ -20,25 +20,30 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.w3.org/1999/xhtml"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
-  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
+  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+  xmlns:ci="http://apache.org/cocoon/include/1.0" 
   >
   
   <xsl:import href="fallback://lenya/modules/xhtml/xslt/xhtml2xhtml.xsl"/>
   
   <xsl:param name="pubId"/>
   <xsl:param name="contextPath"/>
+  <xsl:param name="language"/>
+  <xsl:param name="newsPath"/>
   
   <xsl:template match="/xhtml:html">
     <xsl:copy-of select="lenya:meta"/>
     <html>
       <head>
         <link rel="stylesheet" href="{$contextPath}/{$pubId}/modules/homepage/css/homepage.css" type="text/css"/>
+        <ci:include src="cocoon:/news-header_{$language}.xml"/>
       </head>
       <body>
         <div id="body">
           <xsl:if test="$rendertype = 'edit'">
             <xsl:attribute name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
           </xsl:if>
+          <ci:include src="cocoon:/news-include_{$language}.xml"/>
           <xsl:apply-templates select="xhtml:body/node()"/>
         </div>
       </body>

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/resources/shared/css/page.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/resources/shared/css/page.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/resources/shared/css/page.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/resources/shared/css/page.xml Fri Apr  6 09:01:39 2007
@@ -19,6 +19,8 @@
 
 /* page */
 
+@import url("news.css");
+
 #page {
     padding: 0px;
     margin: 0px;

Modified: lenya/branches/trunk-rework-pubconf/src/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/pubs/default/sitemap.xmap?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/pubs/default/sitemap.xmap (original)
+++ lenya/branches/trunk-rework-pubconf/src/pubs/default/sitemap.xmap Fri Apr  6 09:01:39 2007
@@ -104,6 +104,12 @@
     </map:pipeline>
     
     <map:pipeline type="caching">
+      
+      <map:match pattern="**.rss">
+        <map:generate src="{resource-type:format-rss}"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
       <!-- pattern="meta?docid={docid}&lang={lang}" -->
       <map:match pattern="*/**.html.meta">
         <map:generate type="lenyaMetaData">

Modified: lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap (original)
+++ lenya/branches/trunk-rework-pubconf/src/webapp/global-sitemap.xmap Fri Apr  6 09:01:39 2007
@@ -123,11 +123,18 @@
       <map:match pattern="lenya/**">
         <map:mount uri-prefix="lenya" src="lenya/lenya.xmap" check-reload="true" reload-method="synchron"/>
       </map:match>
-            
+      
 
       <!-- Lenya page transformation for adding a Lenya menu -->
       <!-- lenya-page/{publication-id}/{area}/... -->
       <map:match pattern="lenya-page/*/*/**">
+        
+        <!-- no menu for revisions -->
+        <map:match type="request-parameter" pattern="lenya.revision">
+          <map:generate src="lenya/xslt/util/identity.xsl"/>
+          <map:serialize type="xml"/>
+        </map:match>
+        
         <map:aggregate element="menu" ns="http://apache.org/cocoon/lenya/menubar/1.0">
           <map:part src="cocoon:/menu-xml/{1}/{2}/{3}" strip-root="true"/>
           <map:part src="cocoon:/menu-xml/modules/{1}/{2}.xml" strip-root="true"/>
@@ -138,8 +145,6 @@
         <map:transform src="lenya/xslt/menu/filter-menu.xsl">
           <map:parameter name="tabGroup" value="{usecase:tabGroup:{request-param:lenya.usecase}}"/>
         </map:transform>
-        
-        <map:call resource="i18n"/>
         
         <!-- Disable menu items according to usecase policies -->
         <map:transform type="usecasemenu"/>

Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng (original)
+++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/resources/schemas/publication.rng Fri Apr  6 09:01:39 2007
@@ -148,16 +148,13 @@
       </oneOrMore>
     </element>
     <optional>
-      <element name="templates">
-        <oneOrMore>
-          <element name="template">
-            <attribute name="id">
-              <ref name="simpleNameToken"/>
-            </attribute>
-          </element>
-        </oneOrMore>
+      <element name="template">
+        <attribute name="id">
+          <ref name="simpleNameToken"/>
+        </attribute>
       </element>
     </optional>
+    <!-- FIXME: is template-instantiator optional?-->
     <element name="template-instantiator"><attribute name="name"><data type="string"/></attribute></element>
     <element name="path-mapper">
       <ref name="javaClassName"/>
@@ -187,9 +184,6 @@
         </attribute>
       </element>
     </optional>
-    <element name="link-attribute">
-      <attribute name="xpath"><ref name="XPathExpression"/></attribute>
-    </element>
     <optional>
       <element name="proxies">
         <oneOrMore>

Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xhtml.xsl?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xhtml.xsl (original)
+++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xhtml.xsl Fri Apr  6 09:01:39 2007
@@ -185,7 +185,7 @@
   </xsl:template>
   
   <xsl:template match="menu:menu" mode="nav">
-    <li id="nav{position()}"><xsl:value-of select="@name"/>
+    <li id="nav{position()}"><i18n:text><xsl:value-of select="@name"/></i18n:text>
       <ul id="menu{position()}">
         <xsl:apply-templates select="menu:block"/>
       </ul>
@@ -255,7 +255,7 @@
             </xsl:if>
           </xsl:attribute>
           <xsl:call-template name="checkItem"/>
-          <span><xsl:value-of select="normalize-space(.)"/></span>
+          <span><xsl:apply-templates select="i18n:*|text()"/></span>
         </a></li>
       </xsl:when>
       <xsl:otherwise>
@@ -272,11 +272,21 @@
               </xsl:copy>
             </xsl:for-each>
             <xsl:call-template name="checkItem"/>
-            <span><xsl:value-of select="text()"/></span>
+            <span><xsl:apply-templates select="i18n:*|text()"/></span>
           </a>
         </li>
       </xsl:otherwise>
     </xsl:choose>
+  </xsl:template>
+  
+  
+  <xsl:template match="menu:item/text()">
+    <xsl:value-of select="normalize-space(.)"/>
+  </xsl:template>
+  
+  
+  <xsl:template match="menu:item/i18n:*">
+    <xsl:copy-of select="."/>
   </xsl:template>
   
   

Modified: lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xslt.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xslt.xsl?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xslt.xsl (original)
+++ lenya/branches/trunk-rework-pubconf/src/webapp/lenya/xslt/menu/menu2xslt.xsl Fri Apr  6 09:01:39 2007
@@ -109,6 +109,9 @@
   </xsl:template>
   
   
+  <!-- add only first message as title attribute --> 
+  <xsl:template match="menu:message[preceding-sibling::menu:message]"/>
+  
   <xsl:template match="menu:message">
     <xsl:attribute name="title">
       <xsl:value-of select="."/>

Modified: lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml
URL: http://svn.apache.org/viewvc/lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml?view=diff&rev=526211&r1=526210&r2=526211
==============================================================================
--- lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml (original)
+++ lenya/branches/trunk-rework-pubconf/src/webapp/readme.xml Fri Apr  6 09:01:39 2007
@@ -25,33 +25,47 @@
   <page:head/>
   <page:body>
     <h1>README: Apache Lenya</h1>
+    <h2>Note to developers</h2>
     <p>
-      <em>Note to developers:</em> Please use this file to inform users
+      Please use this new README to inform users
       about changes in the code or behaviour of Lenya. It is located under
       <code>src/webapp/readme.xml</code>. Its contents will be shown on the global 
       welcome page, and also on the introduction page of every publication.
     </p>
+    <h2>Important note for beta testers of Lenya 1.4</h2>
     <p><strong><em>You need to update your custom publication.xconf files!</em></strong></p>
     <p>
       As of revision FIXME, the file <code>$YOURPUB/publication.xml</code>
-      is deprecated and no longer used. Its contents should be moved to
-      <code>$YOURPUB/config/publication.xconf.</code>
+      is no longer used. Its contents should be moved to <code>$YOURPUB/config/publication.xconf.</code>
+      To accomodate this, the format of <code>publication.xconf</code> has changed a bit (see
+      below).<br />
+      Sorry for the breakage, but we were able to eliminate a lot of old ad-hoc code
+      and duplication with this change, and the new xconf file looks a lot nicer and more intuitive.
     </p>
     <p>
-      <em>Most important changes:</em> All elements in publication.xconf must now be
-      in the namespace <code>http://apache.org/cocoon/lenya/publication/1.1</code>,
+      <em>Most important changes:</em> All elements in <code>publication.xconf</code> 
+      must now be in the namespace <code>http://apache.org/cocoon/lenya/publication/1.1</code>,
       and <code>&lt;module/&gt;</code>, <code>&lt;proxy/&gt;</code>, and 
       <code>&lt;resource-type&gt;</code> elements must now be grouped 
       in <code>&lt;modules/&gt;</code>, <code>&lt;proxies/&gt;</code>, 
-      and <code>&lt;resource-types&gt;</code>. See the default publication
+      and <code>&lt;resource-types/&gt;</code>. See the default publication
       for an example.<br />
-      You can use <code>webapp/lenya/resources/schemas/publication.rng</code>
-      to verify that your file is correct.
+      You can use the RNG schema at <code>webapp/lenya/resources/schemas/publication.rng</code>
+      to verify that your file is correct:
+      <blockquote>
+        <code>
+          cd $LENYA_HOME<br />
+          java -jar lib/jing-20030619.jar src/webapp/lenya/resources/schemas/publication.rng $YOURPUB/config/publication.xconf
+        </code>
+      </blockquote>
     </p>
+    <h2>New per-publication <code>readme.xml</code></h2>
     <p>
-      If you want to provide a custom README for your publication, you can
-      put it in <code>$YOURPUP/readme.xsl</code>. 
-      Just copy this file over and modify to your needs.
+      If you want to provide a custom README for your publication (maybe you
+      have used the old &lt;lenya:readme/&gt; in the now gone
+      publication.xml), you can put it in <code>$YOURPUB/readme.xml</code>. 
+      It is now a standard Lenya CMS page in the
+      <code>http://apache.org/cocoon/lenya/cms-page/1.0</code> namespace.
     </p>  
   </page:body>
 </page:page>



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