You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by mi...@apache.org on 2005/10/02 15:51:20 UTC

svn commit: r293114 - in /lenya/trunk/src/modules/opendocument: sitemap.xmap xslt/opendocument2xhtml.xsl

Author: michi
Date: Sun Oct  2 06:50:47 2005
New Revision: 293114

URL: http://svn.apache.org/viewcvs?rev=293114&view=rev
Log:
sitemap and XSLT to generate XHTML added

Added:
    lenya/trunk/src/modules/opendocument/sitemap.xmap
    lenya/trunk/src/modules/opendocument/xslt/opendocument2xhtml.xsl

Added: lenya/trunk/src/modules/opendocument/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/opendocument/sitemap.xmap?rev=293114&view=auto
==============================================================================
--- lenya/trunk/src/modules/opendocument/sitemap.xmap (added)
+++ lenya/trunk/src/modules/opendocument/sitemap.xmap Sun Oct  2 06:50:47 2005
@@ -0,0 +1,54 @@
+<?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: doctypes.xmap 179488 2005-06-02 02:29:39Z gregor $ -->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:pipelines>
+
+    <map:pipeline>
+      <!-- View Revision? -->
+      <map:match pattern="*.xml">
+        <map:match type="step" pattern="view-revision">
+          <map:generate type="serverpages" src="fallback://lenya/content/rc/view.xsp">
+          </map:generate>
+          <map:transform src="fallback://lenya/xslt/rc/toDoc.xsl"/>
+          <map:transform src="fallback://lenya/modules/links/xslt/links2xhtml.xsl">
+            <map:parameter name="rendertype" value="{1}"/>
+            <map:parameter name="nodeid" value="{page-envelope:document-name}"/>
+            <map:parameter name="language" value="{page-envelope:document-language}"/>
+          </map:transform>
+          <map:serialize type="xml"/>
+        </map:match>
+      </map:match>
+
+      <!-- parametrized doctype matcher -->
+      <!-- pattern="{rendertype}" -->
+      <map:match pattern="*.xml">
+      <!--
+        <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/{page-envelope:area}/{page-envelope:document-path}"/>
+	-->
+        <map:generate src="zip://content.xml@../../pubs/{page-envelope:publication-id}/content/{page-envelope:area}/doctypes/opendocument/index.odt"/>
+        <map:transform src="fallback://lenya/modules/opendocument/xslt/opendocument2xhtml.xsl"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+    
+  </map:pipelines>
+</map:sitemap>

Added: lenya/trunk/src/modules/opendocument/xslt/opendocument2xhtml.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/opendocument/xslt/opendocument2xhtml.xsl?rev=293114&view=auto
==============================================================================
--- lenya/trunk/src/modules/opendocument/xslt/opendocument2xhtml.xsl (added)
+++ lenya/trunk/src/modules/opendocument/xslt/opendocument2xhtml.xsl Sun Oct  2 06:50:47 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:default="http://apache.org/lenya/pubs/default/1.0"
+  xmlns="http://www.w3.org/1999/xhtml"
+>
+
+  <!-- default parameter value -->
+  <xsl:param name="rendertype" select="''"/>
+
+<xsl:template match="/">
+  <div id="body">
+    <h1>OpenDocument</h1>
+  </div>
+</xsl:template>
+
+  <xsl:template match="default:links">
+    <div id="body">
+      <h1><xsl:value-of select="default:title"/></h1>
+      <ul>
+        <xsl:apply-templates select="default:link"/>
+      </ul>
+    </div>
+  </xsl:template>
+
+  <xsl:template match="default:link">
+    <li>
+      <a href="{@href}"><xsl:value-of select="."/></a>
+    </li>
+  </xsl:template>
+  
+</xsl:stylesheet>



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