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/01/25 09:04:56 UTC

svn commit: r615137 [2/2] - in /lenya/branches/revolution/1.3.x: ./ src/java/org/apache/lenya/cms/publication/ src/targets/ src/webapp/lenya/modules/authoring/ src/webapp/lenya/modules/cache/ src/webapp/lenya/modules/edit/ src/webapp/lenya/modules/file...

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/home/page2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/home/page2xhtml.xsl?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/home/page2xhtml.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/home/page2xhtml.xsl Fri Jan 25 00:04:53 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> 

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/homepage/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/homepage/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/homepage/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/homepage/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,15 @@
+<module id="homepage" name="Homepage">
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+   </version>
+   <dependencies>
+      <resourcePath>/xml</resourcePath>
+      <required id="navigation">For menus.</required>
+      <recommended id="cache">Improve performance by storing homepage for anonymous people.</recommended>
+   </dependencies>
+   <description>Alternate layout for homepage.</description>
+   <usage>
+   </usage>
+   <!-- Concept was originally xml/homepage Resource type.  This should be child of /xml/xhtml and inherit xmap from live/xml/xhtml allowing removal of special case in live/module.xmap. Will require change to migration (flat) module.  -->
+</module>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/link/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/link/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/link/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/link/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,15 @@
+<module id="link" name="Link">
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+      <content>flat</content>
+   </version>
+   <dependencies>
+      <resourcePath>/</resourcePath>
+      <required id="form">?Because.</required>
+      <recommended id="edit">For editing</recommended>
+   </dependencies>
+   <description>Link Resource Type</description>
+   <usage>
+   </usage>
+</module>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/live/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/live/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/live/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/live/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,16 @@
+<module id="live" name="Live">
+   <version>
+      <minimum>1.2</minimum>
+      <created>1.3</created>
+      <content>all</content>
+   </version>
+   <dependencies>
+      <required id="navigation">Creates nevigation elements</required>
+      <required id="xhtml">For document</required>  
+      <recommended id="cache">Use file cache for anonymous.</recommended>
+      <optional id="homepage">Redirects index* if available.</optional>
+   </dependencies>
+   <description>Main entry point as in Lenya 1.2.</description>
+   <usage>
+   </usage>
+</module>
\ No newline at end of file

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/module.xml?rev=615137&r1=615136&r2=615137&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/module.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/module.xml Fri Jan 25 00:04:53 2008
@@ -1,5 +1,9 @@
 <module id="nav" name="Navigation">
-<version>Flat</version>
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+      <content>flat</content>
+   </version>
 <description>Handles navigation framework for flat storage using SitetreeGenerator.</description>
 <usage>
 <map:generate src="module://nav/{navigation-element}/{index}/{resource-fullid}"/>

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xml?rev=615137&r1=615136&r2=615137&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xml Fri Jan 25 00:04:53 2008
@@ -1,5 +1,13 @@
 <module id="navigation" name="Navigation">
-<version>1.3</version>
-<content>Hierarchical</content>
-<description>Handles backwards-compatible navigation framework for hierarchical storage.  Passes to "nav" Module if flat content.</description>
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+      <content>hierarchical</content>
+   </version>
+   <dependencies>
+      <recommended id="nav">Handles flat content</recommended>
+   </dependencies>
+   <description>Handles backwards-compatible navigation framework for hierarchical storage.  Passes to "nav" Module if flat content.</description>
+   <usage>
+   </usage>
 </module>

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,14 @@
+<module id="text" name="Text">
+   <version>
+      <minimum>1.2</minimum>
+      <created>1.3</created>
+<maximum>0<maximum>
+   </version>
+   <dependencies>
+      <resourcePath>/</resourcePath>
+   </dependencies>
+   <description>Text Resource Type</description>
+   <usage>
+This will be the base resource type for non-XML text resources such as CSS and JavaScript files.
+   </usage>
+</module>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,9 @@
+<module id="xhtml" name="XHTML">
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+   </version>
+   <description>XHTML Resource Type</description>
+   <usage>
+   </usage>
+</module>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,9 @@
+<module id="xinha" name="Xinha" internal="true">
+   <version>
+      <minimum>1.3</minimum>
+      <created>1.3</created>
+   </version>
+   <description>Xinha Javascript XHTML Editor</description>
+   <usage>
+   </usage>
+</module>
\ No newline at end of file

Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/form2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/form2xhtml.xsl?rev=615137&r1=615136&r2=615137&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/form2xhtml.xsl (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/form2xhtml.xsl Fri Jan 25 00:04:53 2008
@@ -52,6 +52,14 @@
 </xsl:if>
 </xsl:template>
 
+<!--  Remove Xinha fields -->
+<xsl:template match="field[@name = 'Dialog1']" mode="rest" priority="2"/>
+<xsl:template match="field[@name = 'Dialog2']" mode="rest" priority="2"/>
+<xsl:template match="field[@name = 'Dialog3']" mode="rest" priority="2"/>
+<xsl:template match="field[@name = 'Dialog4']" mode="rest" priority="2"/>
+<xsl:template match="field[@name = 'Dialog5']" mode="rest" priority="2"/>
+<xsl:template match="field[@name = 'Dialog6']" mode="rest" priority="2"/>
+
 <!-- Unescape HTML entities -->
 <xsl:template match="text()" mode="rest">
     <xsl:value-of disable-output-escaping="yes" select="."/>

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/module.xml?rev=615137&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xml/module.xml Fri Jan 25 00:04:53 2008
@@ -0,0 +1,13 @@
+<module id="xml" name="XML">
+   <version>
+      <minimum>1.2</minimum>
+      <created>1.3</created>
+   </version>
+   <dependencies>
+      <resourcePath>/</resourcePath>
+      <required id="form">Because.</required>
+   </dependencies>
+   <description>XML Resource Type</description>
+   <usage>
+   </usage>
+</module>
\ No newline at end of file



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