You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/11/01 18:09:42 UTC

svn commit: r591086 - in /lenya/sandbox/modules/forrest: sitemap.xmap xslt/forrest2xhtml.xsl xslt/forrestDocument202xhtml.xsl

Author: andreas
Date: Thu Nov  1 10:09:41 2007
New Revision: 591086

URL: http://svn.apache.org/viewvc?rev=591086&view=rev
Log:
Improved layout

Added:
    lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl
Removed:
    lenya/sandbox/modules/forrest/xslt/forrest2xhtml.xsl
Modified:
    lenya/sandbox/modules/forrest/sitemap.xmap

Modified: lenya/sandbox/modules/forrest/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/forrest/sitemap.xmap?rev=591086&r1=591085&r2=591086&view=diff
==============================================================================
--- lenya/sandbox/modules/forrest/sitemap.xmap (original)
+++ lenya/sandbox/modules/forrest/sitemap.xmap Thu Nov  1 10:09:41 2007
@@ -85,7 +85,7 @@
       <!-- {format}.xml/{pubId}/{area}/{uuid}/{language} -->
       <map:match pattern="*.xml/*/*/*/*">
         <map:generate src="lenya-document:{4},lang={5}{link:rev}"/>
-        <map:transform src="fallback://lenya/modules/forrest/xslt/forrest2xhtml.xsl">
+        <map:transform src="fallback://lenya/modules/forrest/xslt/{doc-info:{2}:{3}:{4}:{5}:resourceType}2xhtml.xsl">
           <map:parameter name="rendertype" value="{request-param:rendertype}"/>
           <map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>
           <map:parameter name="language" value="{4}"/>

Added: lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl?rev=591086&view=auto
==============================================================================
--- lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl (added)
+++ lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl Thu Nov  1 10:09:41 2007
@@ -0,0 +1,126 @@
+<?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.
+-->
+<!--+
+  | Convert samples file to the HTML page. Uses styles/main.css stylesheet.
+  +-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  xmlns="http://www.w3.org/1999/xhtml">
+  
+  <xsl:preserve-space elements="source"/>
+  
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>Apache Forrest</title><link rel="SHORTCUT ICON" href="favicon.ico"/>
+        <xsl:apply-templates select="document/header/style"/>
+        <xsl:apply-templates select="document/header/script"/>
+      </head>
+      <body>
+        <div id="body">
+          <h1><xsl:value-of select="document/header/title"/></h1>
+          <xsl:choose>
+            <xsl:when test="document/body/row">
+              <table width="100%">
+                <xsl:apply-templates select="document/body/*"/>
+              </table>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:apply-templates select="document/body/*"/>
+            </xsl:otherwise>
+          </xsl:choose>
+          <p class="copyright">
+            Copyright &#169; 1999-2005 <a href="http://www.apache.org/">The Apache
+              Software Foundation</a>. All rights reserved.
+          </p>
+        </div>
+      </body>
+    </html>
+  </xsl:template>
+  
+  
+  <xsl:template match="row">
+    <tr>
+      <xsl:apply-templates select="column"/>
+    </tr>
+  </xsl:template>
+  
+  <xsl:template match="column">
+    <td valign="top">
+      <h4 class="samplesGroup">
+        <xsl:value-of select="@title"/>
+      </h4>
+      <p class="samplesText">
+        <xsl:apply-templates/>
+      </p>
+    </td>
+  </xsl:template>
+  
+  <xsl:template match="section">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+  
+  <xsl:template match="section/title">
+    <xsl:element name="h{3 + count(ancestor::section)}" namespace="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+  
+  
+  <xsl:template match="source">
+    <pre class="source">
+      <xsl:value-of select="."/>
+    </pre>
+  </xsl:template>
+  
+  
+  <xsl:template match="link">
+    <xsl:text> </xsl:text><a href="{@href}">
+      <xsl:apply-templates/></a>
+    <xsl:text> </xsl:text>
+  </xsl:template>
+  <xsl:template match="strong">
+    <xsl:text> </xsl:text>
+    <b>
+      <xsl:apply-templates/>
+    </b>
+    <xsl:text> </xsl:text>
+  </xsl:template>
+  <xsl:template match="anchor"><a name="{@name}">
+    <xsl:apply-templates/></a>
+  </xsl:template>
+  <!-- <xsl:template match="table">
+    <table border="1" cellspacing="3" cellpadding="3">
+    <xsl:apply-templates/>
+    </table>
+    </xsl:template> -->
+  <xsl:template match="para">
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+  <xsl:template match="figure">
+    <img src="{@src}" alt=""/>
+  </xsl:template>
+  <xsl:template match="*|@*|node()|text()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="*|@*|node()|text()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>



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