forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r190309 - in /forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html: document2html.xsl site2xhtml.xsl
Date Sun, 12 Jun 2005 18:29:11 GMT
Author: thorsten
Date: Sun Jun 12 11:29:10 2005
New Revision: 190309

URL: http://svn.apache.org/viewcvs?rev=190309&view=rev
Log:
Needed to update the xsl dir of leather to enable views

Modified:
    forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/document2html.xsl
    forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl

Modified: forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/document2html.xsl
URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/document2html.xsl?rev=190309&r1=190308&r2=190309&view=diff
==============================================================================
--- forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/document2html.xsl
(original)
+++ forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/document2html.xsl
Sun Jun 12 11:29:10 2005
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 2002-2004 The Apache Software Foundation
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -26,8 +27,6 @@
   <xsl:template match="document">
     <div id="content">
 
-      <div id="skinconf-pdflink"/>
-
       <xsl:if test="normalize-space(header/title)!=''">
         <h1><xsl:value-of select="header/title"/></h1>
       </xsl:if>
@@ -54,9 +53,9 @@
           <xsl:value-of select="header/abstract"/>
         </div>
       </xsl:if>
-
+<div id="content-main">
       <xsl:apply-templates select="body"/>
-
+</div>
       <xsl:if test="header/authors">
         <p align="right">
           <font size="-2">
@@ -82,9 +81,14 @@
   <xsl:template match="@id">
     <xsl:apply-imports/>
   </xsl:template>
-
+  <!-- Generate a <a name="..."> tag for an @id -->
+  <xsl:template match="@id">
+    <xsl:if test="normalize-space(.)!=''">
+      <a name="{.}"><xsl:text> </xsl:text></a>
+    </xsl:if>
+  </xsl:template>
   <xsl:template match="section">
-    <a name="{generate-id()}"/>
+    <a name="{generate-id()}"><xsl:text> </xsl:text></a>
     <xsl:apply-templates select="@id"/>
 
     <xsl:variable name = "level" select = "count(ancestor::section)+1" />
@@ -126,62 +130,6 @@
 
   </xsl:template>  
   
-  
-  <!--xsl:template match="section"-->
-    <!-- count the number of section in the ancestor-or-self axis to compute
-         the title element name later on -
-    <xsl:variable name="sectiondepth" select="count(ancestor-or-self::section)"/>
-    <a name="{generate-id()}"/>
-    <xsl:apply-templates select="@id"/-->
-    <!-- generate a title element, level 1 -> h2, level 2 -> h3 and so on... -
-    <xsl:element name="{concat('h',$sectiondepth + 1)}">
-      <xsl:value-of select="title"/>
-      <xsl:if test="$notoc='true' and $sectiondepth = 3">
-        <span style="float: right"><a href="#{@id}-menu">^</a></span>
-      </xsl:if>
-    </xsl:element>
-
-    <xsl:apply-templates select="*[not(self::title)]"/>
-  </xsl:template-->
-  
-  <!-- Generates the "printer friendly version" link -->
-  <!--xsl:template name="printlink">
-    <xsl:if test="$disable-print-link = 'false'"> 
-    <div class="printlink">
-	  <a href="javascript:void(window.print())">
-        <img class="skin" src="{$skin-img-dir}/printer.gif" alt="Print this Page"/>
-	  </a>
-	</div>
-    </xsl:if>
-  </xsl:template-->
-
-  <!-- Generates the PDF link -->
-  <!--xsl:template name="pdflink">
-    <xsl:if test="$dynamic-page='false'">
-      <xsl:if test="not($config/disable-pdf-link) or $disable-pdf-link = 'false'">

-      <div class="printlink">
-        <a href="{$filename-noext}.pdf">
-          <img class="skin" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/>
-        </a>
-  	  </div>
-      </xsl:if>
-    </xsl:if>
-  </xsl:template-->
-  
-
-  <!-- Generates the XML link -->
-  <!--xsl:template name="xmllink">
-    <xsl:if test="$dynamic-page='false'">
-      <xsl:if test="$disable-xml-link = 'false'">
-      <div class="printlink">
-        <a href="{$filename-noext}.xml">
-          <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="xml"/>
-        </a>
-      </div>
-      </xsl:if>
-    </xsl:if>
-  </xsl:template-->
-
   <xsl:template match="figure">
     <xsl:apply-templates select="@id"/>
     <div style="text-align: center;">
@@ -195,5 +143,21 @@
       </img>
     </div>
   </xsl:template>
-
+  <xsl:template match="note | warning | fixme">
+    <xsl:apply-templates select="@id"/>
+    <div class="frame {local-name()}">
+      <div class="label">
+        <xsl:choose>
+          <!-- FIXME: i18n Transformer here -->
+          <xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
+          <xsl:when test="local-name() = 'note'">Note</xsl:when>
+          <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
+          <xsl:otherwise>Fixme (<xsl:value-of select="@author"/>)</xsl:otherwise>
+        </xsl:choose>
+      </div>
+      <div class="content">
+        <xsl:apply-templates/>
+      </div>
+    </div>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl?rev=190309&r1=190308&r2=190309&view=diff
==============================================================================
--- forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl
(original)
+++ forrest/branches/locationmap_branch/main/webapp/skins/leather-dev/xslt/html/site2xhtml.xsl
Sun Jun 12 11:29:10 2005
@@ -41,9 +41,9 @@
   
 
   <xsl:import href="../../../common/xslt/html/site2xhtml.xsl"/>
-  <xsl:variable name="request" value="substring-before($filename,'.html')"/>
+  <xsl:variable name="request" select="substring-before($filename,'.html')"/>
 
-	<xsl:include href="cocoon:/prepare.include.dyn:evaluate($request)"/>
+  <xsl:include href="cocoon:/prepare.include.dyn:evaluate($request)"/>
   <xsl:include href="cocoon:/prepare.xhtml.dyn:evaluate($request)"/>
     
   <xsl:template match="/">



Mime
View raw message