You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by so...@apache.org on 2008/03/08 23:59:02 UTC

svn commit: r635107 [7/7] - in /lenya/branches/revolution/1.3.x: ./ src/cocoon/ src/java/org/apache/cocoon/components/source/ src/java/org/apache/lenya/ac/ src/java/org/apache/lenya/ac/cache/ src/java/org/apache/lenya/ac/file/ src/java/org/apache/lenya...

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/page2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/page2xhtml.xsl?rev=635107&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/page2xhtml.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/page2xhtml.xsl Sat Mar  8 14:58:32 2008
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id: page2xhtml.xsl 170255 2005-05-15 19:58:26Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+    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:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+    xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" 
+    xmlns:dc="http://purl.org/dc/elements/1.1/"
+    xmlns:dcterms="http://purl.org/dc/terms/"
+    xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+    exclude-result-prefixes="page xhtml"
+    >
+    
+<xsl:param name="contenttype"/>
+<!-- {context-prefix}/{publication-id}/{area} -->
+<xsl:param name="root"/>
+
+<xsl:param name="document-id"/>
+
+<!-- i.e. doctypes/xhtml-document -->
+<xsl:param name="document-type"/>
+
+<!-- The rquest url i.e. /lenya/doctypes/xhtml-document_en.html -->
+<xsl:param name="url"/>
+
+<xsl:param name="language"/>
+
+
+<xsl:template match="cmsbody">
+  <html>
+    <head>
+      <link rel="stylesheet" href="{$root}/css/page.css" type="text/css"/>
+      <meta content="Apache Lenya" name="generator"/>
+      <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
+      <title><xsl:value-of select="//lenya:meta/dc:title"/></title>
+    </head>	
+    <body>
+      <div id="page">
+      <table width="100%" cellpadding="0" cellspacing="0" border="0">
+        <tr>
+          <td id="publication-title">
+            <xsl:choose>
+              <xsl:when test="$language = 'de'">
+	        Willkommen zur Default Publikation!
+              </xsl:when>
+              <xsl:otherwise>
+	        Welcome to the Default Publication!
+              </xsl:otherwise>
+	    </xsl:choose>
+          </td>
+          <td id="project-logo"><img src="{$root}/images/project-logo.png" alt="project logo"/></td>
+        </tr>
+      </table>
+      <xsl:apply-templates select="xhtml:div[@id = 'tabs']"/>
+      <table width="100%" border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td valign="top">
+            <xsl:apply-templates select="xhtml:div[@id = 'menu']"/>
+          </td>
+          <td valign="top">
+            <div id="main">
+              <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
+              <xsl:apply-templates select="xhtml:div[@id = 'search']"/>
+              <xsl:apply-templates select="xhtml:html/xhtml:div[@id = 'body']"/>
+            </div>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2" valign="top">
+            <div id="footer">
+              <xsl:apply-templates select="lenya:meta/dcterms:modified"/>
+              <xsl:apply-templates select="lenya:meta/dc:publisher"/>
+            </div>
+          </td>
+        </tr>
+      </table>
+      </div>
+    </body>
+  </html>
+</xsl:template>
+
+<xsl:template match="dcterms:modified">
+  <xsl:variable name="date"><xsl:value-of select="."/></xsl:variable>
+  <i18n:text>last_published</i18n:text>:
+    <xsl:if test="$date!=''">
+    <i18n:date-time src-pattern="yyyy-MM-dd HH:mm:ss" pattern="EEE, d MMM yyyy HH:mm:ss z" value="{$date}"/> 
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="dc:publisher">
+  <xsl:variable name="user"><xsl:value-of select="."/></xsl:variable>
+  <xsl:variable name="user-id"><xsl:value-of select="substring-before($user,'|')"/></xsl:variable>
+  <xsl:variable name="rest"><xsl:value-of select="substring-after($user,'|')"/></xsl:variable>
+  <xsl:variable name="user-name"><xsl:value-of select="substring-before($rest,'|')"/></xsl:variable>
+  <xsl:variable name="user-email"><xsl:value-of select="substring-after($rest,'|')"/></xsl:variable>
+
+  <xsl:if test="$user != ''">
+    <xsl:choose>
+      <xsl:when test="$user-email != ''">
+      / <a>
+          <xsl:attribute name="href"><xsl:value-of select="concat('mailto:',$user-email)"/></xsl:attribute> 
+          <xsl:value-of select="$user-name"/>
+        </a>
+      </xsl:when>
+      <xsl:otherwise>
+       / <xsl:value-of select="$user-name"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:if>
+</xsl:template>
+
+<!-- 1.3 Nav Module Path Correction -->
+<xsl:template match="//xhtml:div[@id != 'body']//*/@href"><xsl:choose>
+<xsl:when test="$contenttype='flat'"><xsl:attribute name="href"><xsl:value-of select="$root"/><xsl:value-of select="."/></xsl:attribute></xsl:when>
+<xsl:otherwise><xsl:copy/></xsl:otherwise>
+</xsl:choose></xsl:template>
+
+<xsl:template match="@*|node()" priority="-1">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet> 

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/resource.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/resource.xsl?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/resource.xsl (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/resource.xsl Sat Mar  8 14:58:32 2008
@@ -75,7 +75,6 @@
 <th class="dark"><i18n:text>Delete</i18n:text></th>
 <th><i18n:text>Live</i18n:text></th>
 <th><i18n:text>Edit</i18n:text></th>
-<th><i18n:text>URL</i18n:text></th>
 <th><i18n:text>Title</i18n:text></th>
 <th><i18n:text>Creator</i18n:text></th>
 <th><i18n:text>When</i18n:text></th>
@@ -110,16 +109,6 @@
 </tr>
 
 <tr>
-<th><i18n:text>URL</i18n:text></th>
-<td colspan="5">
-<xsl:element name="input">
-<xsl:attribute name="type">text</xsl:attribute>
-<xsl:attribute name="name">new.href</xsl:attribute>
-<xsl:attribute name="size">60</xsl:attribute>
-</xsl:element>
-</td>
-</tr>
-<tr>
 <th><i18n:text>Title</i18n:text></th>
 <td colspan="5">
 <xsl:element name="input">
@@ -223,9 +212,6 @@
 <xsl:if test="@revision = ../@edit"><xsl:attribute name="checked"/></xsl:if>
 </xsl:element>
 </td>
-
-<td>
-<xsl:value-of select="@href"/></td>
 <td><xsl:value-of select="@title"/></td>
 <td><xsl:value-of select="@creator"/></td>
 <td><xsl:value-of select="@when"/></td>

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/save.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/save.xsl?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/save.xsl (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/save.xsl Sat Mar  8 14:58:32 2008
@@ -39,7 +39,7 @@
 <xsl:attribute name="action">delete</xsl:attribute>
 </xsl:when>
 <xsl:otherwise>
-<xsl:if test="(@live != $livenew) and (($livenew != 'new') or (newrevision='1'))">
+<xsl:if test="((@live != $livenew) or (string-length(@live) = 0)) and (($livenew != 'new') or ($newrevision='1'))">
 <xsl:attribute name="live"><xsl:value-of select="$livenew"/></xsl:attribute>
 </xsl:if>
 <xsl:if test="(@edit != $editnew) and (newrevision != '1')"><xsl:attribute name="edit"><xsl:value-of select="$editnew"/></xsl:attribute></xsl:if>
@@ -72,7 +72,13 @@
 <xsl:template name="newtranslation">
 <xsl:variable name="language"><xsl:value-of select="/save/form/field[@name='new.language']"/></xsl:variable>
 <xsl:if test="string-length($language) &gt; 0">
-<xsl:call-template name="newrevision">
+<!--
+<xsl:element name="translation">
+<xsl:attribute name="action">new</xsl:attribute>
+<xsl:attribute name="language"><xsl:value-of select="$language"/></xsl:attribute>
+</xsl:element>
+-->
+<xsl:call-template name="newrevisionForNewTranslation">
    <xsl:with-param name="language" select="$language"/>
    <xsl:with-param name="fieldlanguage" select="'new'"/>
 </xsl:call-template>
@@ -103,5 +109,29 @@
 </xsl:if>
 -->
 </xsl:template>
+
+<xsl:template name="newrevisionForNewTranslation">
+<xsl:param name="language"/>
+<xsl:param name="fieldlanguage" select="$language"/>
+<xsl:variable name="href"><xsl:value-of select="/save/form/field[@name=concat($fieldlanguage , '.href')]"/></xsl:variable>
+<xsl:variable name="title"><xsl:value-of select="/save/form/field[@name=concat($fieldlanguage , '.title')]"/></xsl:variable>
+<xsl:variable name="live"><xsl:value-of select="/save/form/field[@name=concat($fieldlanguage , '.live')]"/></xsl:variable>
+
+<xsl:variable name="editrev"><xsl:value-of select="/save/resource/translation[@language = $fieldlanguage]/@edit"/></xsl:variable>
+<xsl:variable name="edithref"><xsl:value-of select="/save/resource/translation[@language = $fieldlanguage]/revision[@revision = $editrev]/@href"/></xsl:variable>
+<xsl:variable name="edittitle"><xsl:value-of select="/save/resource/translation[@language = $fieldlanguage]/revision[@revision = $editrev]/@title"/></xsl:variable>
+<xsl:if test="($href != $edithref) or ($title != $edittitle)">
+<xsl:element name="revision">
+<xsl:attribute name="action">new</xsl:attribute>
+<xsl:attribute name="language"><xsl:value-of select="$language"/></xsl:attribute>
+<xsl:if test="$live = 'new'"><xsl:attribute name="live">true</xsl:attribute></xsl:if>
+<link>
+<xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute>
+<xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
+</link>
+</xsl:element>
+</xsl:if>
+</xsl:template>
+
 
 </xsl:stylesheet> 

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/authoring/index/index_en.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/authoring/index/index_en.xml?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/authoring/index/index_en.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/authoring/index/index_en.xml Sat Mar  8 14:58:32 2008
@@ -53,14 +53,14 @@
     Cocoon.</p>
 
     <p>For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="/default/authoring/concepts.html">Concepts
+    Apache Lenya please see the <a href="/default12/authoring/concepts.html">Concepts
     section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="/default/authoring/features.html">Features
+    refer to the <a href="/default12/authoring/features.html">Features
     section</a>.</p>
 
     <p>If you'd like to get a quick introduction on how to use Apache
     Lenya CMS please go through the <a
-    href="/default/authoring/tutorial.html">tutorial</a>.</p>
+    href="/default12/authoring/tutorial.html">tutorial</a>.</p>
 
     <p>The purpose of this publication is</p>
 

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/live/index/index_en.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/live/index/index_en.xml?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/live/index/index_en.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/content/live/index/index_en.xml Sat Mar  8 14:58:32 2008
@@ -53,14 +53,14 @@
     Cocoon.</p>
 
     <p>For an overview of the concepts and the terminology used in
-    Apache Lenya please see the <a href="/default/authoring/concepts.html">Concepts
+    Apache Lenya please see the <a href="/default12/authoring/concepts.html">Concepts
     section</a>. To see what you can do with Apache Lenya please
-    refer to the <a href="/default/authoring/features.html">Features
+    refer to the <a href="/default12/authoring/features.html">Features
     section</a>.</p>
 
     <p>If you'd like to get a quick introduction on how to use Apache
     Lenya CMS please go through the <a
-    href="/default/authoring/tutorial.html">tutorial</a>.</p>
+    href="/default12/authoring/tutorial.html">tutorial</a>.</p>
 
     <p>The purpose of this publication is</p>
 

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/xslt/page2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/xslt/page2xhtml.xsl?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/xslt/page2xhtml.xsl (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default12/xslt/page2xhtml.xsl Sat Mar  8 14:58:32 2008
@@ -14,9 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!-- $Id$ -->
-
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns="http://www.w3.org/1999/xhtml"
@@ -28,22 +26,15 @@
     xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
     exclude-result-prefixes="page xhtml"
     >
-    
-    
 <!-- {context-prefix}/{publication-id}/{area} -->
 <xsl:param name="root"/>
-
 <xsl:param name="document-id"/>
-
 <!-- i.e. doctypes/xhtml-document -->
 <xsl:param name="document-type"/>
-
 <!-- The rquest url i.e. /lenya/doctypes/xhtml-document_en.html -->
 <xsl:param name="url"/>
-
 <xsl:param name="language"/>
 
-
 <xsl:template match="cmsbody">
   <html>
     <head>
@@ -79,7 +70,9 @@
             <div id="main">
               <xsl:apply-templates select="xhtml:div[@id = 'breadcrumb']"/>
               <xsl:apply-templates select="xhtml:div[@id = 'search']"/>
+              <xsl:apply-templates select="xhtml:div[@id = 'body']"/>
               <xsl:apply-templates select="xhtml:html/xhtml:div[@id = 'body']"/>
+              <xsl:apply-templates select="xhtml:html/xhtml:body"/>
             </div>
           </td>
         </tr>

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default13/content/index/live.xconf
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default13/content/index/live.xconf?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default13/content/index/live.xconf (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/pubs/default13/content/index/live.xconf Sat Mar  8 14:58:32 2008
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <index structure="livemenu">
-<filter property="type">xml</filter>
-<filter property="doctype">xhtml|link</filter>
+<filter property="type">xml|xhtml|link</filter>
 </index>

Modified: lenya/branches/revolution/1.3.x/src/webapp/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/sitemap.xmap?rev=635107&r1=635106&r2=635107&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/sitemap.xmap (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/sitemap.xmap Sat Mar  8 14:58:32 2008
@@ -135,12 +135,12 @@
     </map:transformer>
 
 <!-- Lenya 1.3 BEGIN -->
-    <map:transformer name="create-revision" logger="sitemap.transformer.create-revision"
-          src="org.apache.lenya.cms.content.flat.CreateRevisionTransformer"/>
-    <map:transformer name="resource" logger="sitemap.transformer.resource"
-          src="org.apache.lenya.cms.content.ResourceTransformer"/>
-    <map:transformer name="virtual" logger="sitemap.transformer.virtual"
-          src="org.apache.lenya.cms.cocoon.transformation.VirtualTransformer"/>
+   <!-- TODO: Create Transformers should be implementation-agnostic. -->
+    <map:transformer name="new-resource" logger="sitemap.transformer.create-resource" src="org.apache.lenya.cms.content.flat.CreateResourceTransformer"/>
+    <map:transformer name="create-revision" logger="sitemap.transformer.create-revision" src="org.apache.lenya.cms.content.flat.CreateRevisionTransformer"/>
+    <map:transformer name="resource" logger="sitemap.transformer.resource" src="org.apache.lenya.cms.content.ResourceTransformer"/>
+    <!-- VirtualTransformer is not used in Lemya 1.3 -->
+    <map:transformer name="virtual" logger="sitemap.transformer.virtual" src="org.apache.lenya.cms.cocoon.transformation.VirtualTransformer"/>
 <!-- Lenya 1.3 END -->
 
   </map:transformers>



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