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/28 23:27:02 UTC
svn commit: r616087 [3/3] - in /lenya/branches/revolution/1.3.x: ./ lib/
src/java/org/apache/lenya/cms/cocoon/components/modules/input/
src/java/org/apache/lenya/cms/cocoon/components/source/impl/
src/java/org/apache/lenya/cms/content/ src/java/org/apa...
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/addSourceTags.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/addSourceTags.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/addSourceTags.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/addSourceTags.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+ 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: addSourceTags.xsl 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:param name="source"/>
+
+<xsl:template match="/">
+ <open>
+ <source:write xmlns:source="http://apache.org/cocoon/source/1.0">
+ <source:source><xsl:value-of select="$source"/></source:source>
+ <source:fragment>
+ <xsl:copy-of select="."/>
+ </source:fragment>
+ </source:write>
+ <content>
+ <xsl:copy-of select="."/>
+ </content>
+ </open>
+</xsl:template>
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/removeSourceTags.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/removeSourceTags.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/removeSourceTags.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/edit/removeSourceTags.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ 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: removeSourceTags.xsl 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="/">
+ <xsl:copy-of select="/open/content/*"/>
+</xsl:template>
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/document-does-not-exist.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/document-does-not-exist.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/document-does-not-exist.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/document-does-not-exist.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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: document-does-not-exist.xsl 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ >
+
+ <xsl:import href="../util/page-util.xsl"/>
+
+ <xsl:param name="documentid"/>
+ <xsl:param name="documenturl"/>
+
+ <xsl:template match="/">
+
+ <page:page>
+ <page:title>404: Page not found</page:title>
+ <page:body>
+ <div class="lenya-box">
+ <div class="lenya-box-title">The requested document does not exist</div>
+ <div class="lenya-box-body">
+ <p>
+ The requested document '<xsl:value-of select="$documenturl"/>' with
+ document-id '<xsl:value-of select="$documentid"/>' does not exist.
+ </p>
+ </div>
+ </div>
+ </page:body>
+ </page:page>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+ 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: missing-language.xsl 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ >
+
+ <xsl:import href="../util/page-util.xsl"/>
+
+ <xsl:variable name="language"><xsl:value-of select="/missing-language/current-language"/></xsl:variable>
+
+ <xsl:template match="/">
+
+ <page:page>
+ <page:title>Document not available for this language</page:title>
+ <page:body>
+ <div class="lenya-box">
+ <div class="lenya-box-title">The requested document is not available for language "<xsl:value-of select="$language"/>"</div>
+ <div class="lenya-box-body">
+ <p>
+ The requested document is not available for language "<xsl:value-of select="$language"/>". The following languages are available:
+ </p>
+ <ul>
+ <xsl:apply-templates select="missing-language/available-languages/available-language"/>
+ </ul>
+ </div>
+ </div>
+ </page:body>
+ </page:page>
+ </xsl:template>
+
+ <xsl:template match="available-languages/available-language">
+ <li>
+ <a><xsl:attribute name="href"><xsl:value-of select="url"/></xsl:attribute><xsl:value-of select="language"/></a>
+ </li>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsp
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsp?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsp (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/exception/missing-language.xsp Mon Jan 28 14:26:58 2008
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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: missing-language.xsp 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsp:page
+ language="java"
+ xmlns:xsp="http://apache.org/xsp"
+ xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+ >
+
+ <xsp:structure>
+ <xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
+ <xsp:include>org.apache.lenya.cms.publication.DocumentException</xsp:include>
+ <xsp:include>org.apache.lenya.cms.publication.xsp.DocumentLanguagesHelper</xsp:include>
+ </xsp:structure>
+
+ <missing-language>
+
+ <current-language><input:get-attribute module="page-envelope" as="string" name="document-language"/></current-language>
+ <available-languages>
+ <xsp:logic>
+ Document doc = (Document) <input:get-attribute module="page-envelope" as="object" name="document"/>;
+ DocumentLanguagesHelper helper = new DocumentLanguagesHelper(objectModel);
+ try {
+ String[] availableLanguages = doc.getLanguages();
+ String language = null;
+ for (int i = 0; i < availableLanguages.length; i++) {
+ language = availableLanguages[i];
+ <xsp:content>
+ <available-language>
+ <language><xsp:expr>language</xsp:expr></language>
+ <url><xsp:expr>helper.getUrl(language)</xsp:expr></url>
+ </available-language>
+ </xsp:content>
+ }
+ } catch (DocumentException e) {}
+ </xsp:logic>
+ </available-languages>
+
+ </missing-language>
+</xsp:page>
\ No newline at end of file
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/module.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/module.xml?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/module.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/module.xml Mon Jan 28 14:26:58 2008
@@ -0,0 +1,3 @@
+<module id="lenya" name="Lenya Global Resources" minimum="1.3" created="1.3">
+ <description>Files needed by GlobalModules collected from dispersed locations in Lenya 1.2.</description>
+</module>
\ No newline at end of file
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/toDoc.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/toDoc.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/toDoc.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/toDoc.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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: toDoc.xsl 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0" >
+
+
+
+<xsl:template match="rc:backup">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="* | @*">
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
+
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/view.xsp
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/view.xsp?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/view.xsp (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/rc/view.xsp Mon Jan 28 14:26:58 2008
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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: view.xsp 155115 2005-02-24 01:10:26Z gregor $ -->
+
+ <xsp:page
+ language="java"
+ xmlns:xsp="http://apache.org/xsp"
+ xmlns:input="http://apache.org/cocoon/xsp/input/1.0"
+ >
+
+ <xsp:structure>
+ <xsp:include>org.apache.lenya.cms.rc.RevisionController</xsp:include>
+ <xsp:include>org.apache.lenya.cms.rc.RCEnvironment</xsp:include>
+ <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
+ <xsp:include>org.apache.lenya.xml.DOMParserFactory</xsp:include>
+ </xsp:structure>
+
+ <rc:backup xmlns:rc="http://apache.org/cocoon/lenya/rc/1.0">
+
+ <xsp:logic>
+
+ String rollbackTime=request.getParameter("rollbackTime");
+
+ Publication publication = (Publication)<input:get-attribute module="page-envelope" as="object" name="publication"/>;
+ String rootDir=publication.getEnvironment().getPublicationPath();
+ String servletContextPath = publication.getServletContext().getCanonicalPath();
+
+ String contextPath = Publication.CONTENT_PATH;
+ String area = <input:get-attribute module="page-envelope" as="string" name="area"/>;
+ String documentPath = <input:get-attribute module="page-envelope" as="string" name="document-path"/>;
+ String filename = "/" + contextPath + "/" + area + "/" + documentPath;
+ RCEnvironment rcEnvironment = RCEnvironment.getInstance(publication.getServletContext().getAbsolutePath());
+ String rcmlDirectory = rcEnvironment.getRCMLDirectory();
+ rcmlDirectory=rootDir+rcmlDirectory;
+ String backupDirectory = rcEnvironment.getBackupDirectory();
+ backupDirectory=rootDir+backupDirectory;
+
+ RevisionController rc = new RevisionController(rcmlDirectory, backupDirectory, rootDir);
+ String backupFilename = rc.getBackupFilename(new Long(rollbackTime).longValue(), filename);
+
+ DOMParserFactory dpf=new DOMParserFactory();
+ org.w3c.dom.Document doc=null;
+ try {
+ doc = dpf.getDocument(backupFilename);
+ } catch (Exception e) {
+ <rc:exception>rollback: Unable to get view file, caught exception: <xsp:expr>e.toString()</xsp:expr></rc:exception>
+ }
+ org.w3c.dom.Element rootE= (org.w3c.dom.Element)doc.getDocumentElement();
+ </xsp:logic>
+
+ <xsp:expr>rootE</xsp:expr>
+ </rc:backup>
+</xsp:page>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/system/error2html.xslt
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/system/error2html.xslt?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/system/error2html.xslt (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/system/error2html.xslt Mon Jan 28 14:26:58 2008
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+
+<!-- CVS $Id: error2html.xslt 433543 2006-08-22 06:22:54Z crossley $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:error="http://apache.org/cocoon/error/2.1">
+
+ <xsl:param name="contextPath"/>
+
+ <!-- let sitemap override default page title -->
+ <xsl:param name="pageTitle" select="//error:notify/error:title"/>
+
+ <xsl:template match="error:notify">
+ <html>
+ <head>
+ <title>
+ <xsl:value-of select="$pageTitle"/>
+ </title>
+ <link href="{$contextPath}/styles/main.css" type="text/css" rel="stylesheet"/>
+ <style>
+ h1 { color: #336699; text-align: left; margin: 0px 0px 30px 0px; padding: 0px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
+ p.message { padding: 10px 30px 10px 30px; font-weight: bold; font-size: 130%; border-width: 1px; border-style: dashed; border-color: #336699; }
+ p.description { padding: 10px 30px 20px 30px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #336699;}
+ p.topped { padding-top: 10px; border-width: 1px 0px 0px 0px; border-style: solid; border-color: #336699; }
+ pre { font-size: 120%; }
+ </style>
+ <script src="{$contextPath}/scripts/main.js" type="text/javascript"/>
+ </head>
+ <body>
+ <xsl:apply-templates select="." mode="onload"/>
+ <h1><xsl:value-of select="$pageTitle"/></h1>
+
+ <p class="message">
+ <xsl:value-of select="error:message"/>
+ </p>
+
+ <p class="description">
+ <xsl:value-of select="error:description"/>
+ </p>
+
+ <xsl:apply-templates select="error:extra"/>
+
+ <p class="topped">
+ If you need help and this information is not enough, you
+ are invited to read the
+ <a href="http://cocoon.apache.org/2.1/faq/">Cocoon FAQ</a>.<br/>
+ If you still don't find the answers you need,
+ can send a mail to the
+ <a href="http://cocoon.apache.org/community/mail-lists.html">
+ Cocoon mailing lists</a>,
+ remembering to:
+ </p>
+
+ <ul>
+ <li>specify the version of Cocoon you're using, or we'll assume that you
+ are talking about the latest released version;</li>
+ <li>specify the platform-operating system-version-servlet container version;</li>
+ <li>send any pertinent error message;</li>
+ <li>send pertinent log snippets;</li>
+ <li>send pertinent sitemap snippets;</li>
+ <li>send pertinent parts of the page that give you problems.</li>
+ </ul>
+
+ <p>
+ For more detailed technical information, take a look at the log
+ files in the log directory of Cocoon, which is placed by default in
+ the <code>WEB-INF/logs/</code> folder of your cocoon webapp context.<br/>
+ If the logs don't give you enough information, you might want to increase the
+ log level by changing the Logging configuration which is by default the
+ <code>WEB-INF/logkit.xconf</code> file.
+ </p>
+
+ <p>
+ If you think you found a bug, please report it to
+ <a href="http://issues.apache.org/jira/browse/COCOON">Apache Cocoon issue tracker</a>;
+ a message will automatically be sent to the developer mailing list and you'll
+ be kept in contact automatically with the further progress on that bug.
+ </p>
+
+ <p>
+ Thanks, and sorry for the trouble if this is our fault.
+ </p>
+
+ <p class="topped">
+ The <a href="http://cocoon.apache.org/">Apache Cocoon</a> Project
+ </p>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="error:notify" mode="onload">
+ <xsl:attribute name="onload">
+ <xsl:for-each select="error:extra[contains(@error:description,'stacktrace')]">
+ <xsl:text>toggle('</xsl:text>
+ <xsl:value-of select="@error:description"/>
+ <xsl:text>');</xsl:text>
+ </xsl:for-each>
+ </xsl:attribute>
+ </xsl:template>
+
+ <xsl:template match="error:extra">
+ <xsl:choose>
+ <xsl:when test="contains(@error:description,'stacktrace')">
+ <p class="stacktrace">
+ <span class="description"><xsl:value-of select="@error:description"/></span>
+ <span class="switch" id="{@error:description}-switch" onclick="toggle('{@error:description}')">[hide]</span>
+ <pre id="{@error:description}">
+ <xsl:value-of select="translate(.,' ','')"/>
+ </pre>
+ </p>
+ </xsl:when>
+ <xsl:otherwise>
+ <p class="extra">
+ <span class="description"><xsl:value-of select="@error:description"/>: </span>
+ <xsl:value-of select="."/>
+ </p>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/empty.xml
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/empty.xml?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/empty.xml (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/empty.xml Mon Jan 28 14:26:58 2008
@@ -0,0 +1,24 @@
+<?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: empty.xml 413285 2006-06-10 11:10:23Z thorsten $ -->
+
+<!-- This is a simple xml file that can bes used in pipelines where all the -->
+<!-- work is done in the xsl and they just need a dummy xml to start the -->
+<!-- pipeline. -->
+
+ <empty></empty>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/page2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/page2xhtml.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/page2xhtml.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/page2xhtml.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+ 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 57523 2004-11-12 14:30:53Z michi $ -->
+
+<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:i18n="http://apache.org/cocoon/i18n/2.1"
+ exclude-result-prefixes="page xhtml i18n"
+ >
+
+<xsl:param name="contextprefix"/>
+
+<xsl:template match="page:page">
+ <html>
+ <head>
+ <title><xsl:value-of select="page:title"/></title>
+ <link rel="stylesheet" type="text/css" href="{$contextprefix}/lenya/css/default.css" title="default css"/>
+ <!-- the following line is a fix for an Internet Explorer incompatibility -->
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
+<xsl:if test="count(xhtml:script) > 0">
+ <script><xsl:copy-of select="xhtml:script/@*|xhtml:script/node()" /> </script>
+</xsl:if>
+ </head>
+ <body>
+
+ <table width="100%" border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td class="lenya-header">
+ <h1><xsl:value-of select="page:title"/></h1>
+ </td>
+ <td class="lenya-project-logo">
+ <img src="{$contextprefix}/lenya/images/project-logo-small.png" alt="Apache Lenya Project Logo"/>
+ </td>
+ </tr>
+ </table>
+ <div class="lenya-page-subtitle">
+ Open Source Content Management System
+ </div>
+ <table class="lenya-body" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <xsl:if test="//xhtml:div[@class = 'lenya-sidebar']">
+ <td class="lenya-sidebar">
+ <xsl:copy-of select="//xhtml:div[@class = 'lenya-sidebar']/node()"/>
+ </td>
+ </xsl:if>
+ <td class="lenya-content">
+ <xsl:copy-of select="page:body/node()[local-name() != 'div' or not(@class = 'lenya-sidebar')]"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+</xsl:template>
+
+
+<xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/strip_namespaces.xsl
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/strip_namespaces.xsl?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/strip_namespaces.xsl (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/lenya/util/strip_namespaces.xsl Mon Jan 28 14:26:58 2008
@@ -0,0 +1,40 @@
+<?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: strip_namespaces.xsl 161164 2005-04-13 07:56:27Z edith $ -->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="*">
+ <!-- remove element prefix (if any) -->
+ <xsl:element name="{local-name()}">
+ <!-- process attributes -->
+ <xsl:for-each select="@*">
+ <!-- remove attribute prefix (if any) -->
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="comment()">
+ <xsl:copy/>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/README.txt
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/README.txt?rev=616087&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/README.txt (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/nav/README.txt Mon Jan 28 14:26:58 2008
@@ -0,0 +1,31 @@
+<module id="nav" name="Navigation">
+ <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}"/>
+
+This Module strips irrelevant information, so:
+module://nav/menu/live/myPath/myDoc_xx.html
+BECOMES:
+menu/live/myPath/myDoc
+
+It tries to pass this to a file named nav.xmap in a Module named {navigation-element}.
+If that does not exist, it generates the index.
+It then tries to transform using a file named nav.xsl in a Module named {navigation-element}.
+If that does not exist, it transforms using a file named {navigation-element}.xsl from this Module.
+
+These XSL should start with;
+<xsl:param name="current"/>
+<xsl:variable name="language"><xsl:value-of select="/index/@language"/></xsl:variable>
+<xsl:variable name="currentfull">/<xsl:value-of select="$current"/></xsl:variable>
+
+$currentfull contains the currently selected fullid.
+$language contains the current language.
+
+The results are specific to the Navigation Element. Later XSL would usually add a prefix to anchor tags.
+</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=616087&r1=616086&r2=616087&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 Mon Jan 28 14:26:58 2008
@@ -1,12 +1,7 @@
-<module id="nav" name="Navigation">
- <version>
- <minimum>1.3</minimum>
- <created>1.3</created>
- <content>flat</content>
- </version>
+<module id="nav" name="Navigation" minimum="1.3" created="1.3" content="flat">
<description>Handles navigation framework for flat storage using SitetreeGenerator.</description>
<usage>
-<map:generate src="module://nav/{navigation-element}/{index}/{resource-fullid}"/>
+See README.txt for example code.
This Module strips irrelevant information, so:
module://nav/menu/live/myPath/myDoc_xx.html
@@ -17,14 +12,6 @@
If that does not exist, it generates the index.
It then tries to transform using a file named nav.xsl in a Module named {navigation-element}.
If that does not exist, it transforms using a file named {navigation-element}.xsl from this Module.
-
-These XSL should start with;
-<xsl:param name="current"/>
-<xsl:variable name="language"><xsl:value-of select="/index/@language"/></xsl:variable>
-<xsl:variable name="currentfull">/<xsl:value-of select="$current"/></xsl:variable>
-
-$currentfull contains the currently selected fullid.
-$language contains the current language.
The results are specific to the Navigation Element. Later XSL would usually add a prefix to anchor tags.
</usage>
Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xmap?rev=616087&r1=616086&r2=616087&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xmap (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/navigation/module.xmap Mon Jan 28 14:26:58 2008
@@ -61,8 +61,10 @@
</map:match>
<!-- Sitetree -->
<map:match pattern="sitetree/**">
- <map:generate src="module:///../../content/{page-envelope:area}/sitetree.xml"/>
- <map:transform type="i18n">
+<!-- WARNING: Need different Paths for Global and Publication Modules. -->
+ <map:generate src="module:///../../pubs/{publication:publication}/content/{page-envelope:area}/sitetree.xml"/>
+<!-- <map:generate src="module:///../../content/{page-envelope:area}/sitetree.xml"/> -->
+ <map:transform type="i18n">
<map:parameter name="locale" value="{page-envelope:document-language}"/>
</map:transform>
<map:call resource="finish">
Modified: 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=616087&r1=616086&r2=616087&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/text/module.xml Mon Jan 28 14:26:58 2008
@@ -1,9 +1,4 @@
-<module id="text" name="Text">
- <version>
- <minimum>1.2</minimum>
- <created>1.3</created>
-<maximum>0<maximum>
- </version>
+<module id="text" name="Text" minimum="1.2" created="1.3">
<dependencies>
<resourcePath>/</resourcePath>
</dependencies>
Modified: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xmap
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xmap?rev=616087&r1=616086&r2=616087&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xmap (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xmap Mon Jan 28 14:26:58 2008
@@ -11,8 +11,8 @@
</map:match>
<!-- Step: View Revision from Lenya 1.2 -->
<map:match type="step" pattern="view-revision">
- <map:generate type="serverpages" src="module:///../../../../content/rc/view.xsp"/>
- <map:transform src="module:///../../../../xslt/rc/toDoc.xsl"/>
+ <map:generate type="serverpages" src="module://lenya/rc/view.xsp"/>
+ <map:transform src="module://lenya/rc/toDoc.xsl"/>
<map:transform src="module:///xhtml.xsl">
<map:parameter name="nodeid" value="{page-envelope:document-node-id}"/>
</map:transform>
Modified: 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=616087&r1=616086&r2=616087&view=diff
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml (original)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xhtml/module.xml Mon Jan 28 14:26:58 2008
@@ -1,9 +1,4 @@
-<module id="xhtml" name="XHTML">
- <version>
- <minimum>1.3</minimum>
- <created>1.3</created>
- </version>
+<module id="xhtml" name="XHTML" minimum="1.3" created="1.3" content="hierarchical">
+ <required id="lenya">Required files.</required>
<description>XHTML Resource Type</description>
- <usage>
- </usage>
</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org