forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject svn commit: rev 43467 - in forrest/trunk: . src/core/context src/core/context/resources/stylesheets
Date Tue, 07 Sep 2004 11:23:36 GMT
Author: nicolaken
Date: Tue Sep  7 04:23:34 2004
New Revision: 43467

Added:
   forrest/trunk/src/core/context/resources/stylesheets/linkmap2document.xsl   (contents,
props changed)
Modified:
   forrest/trunk/src/core/context/linkmap.xmap
   forrest/trunk/src/core/context/sitemap.xmap
   forrest/trunk/status.xml
Log:
Requesting linkmap.html Forrest now renderes the site.xml file as a table of contents.

Modified: forrest/trunk/src/core/context/linkmap.xmap
==============================================================================
--- forrest/trunk/src/core/context/linkmap.xmap	(original)
+++ forrest/trunk/src/core/context/linkmap.xmap	Tue Sep  7 04:23:34 2004
@@ -53,7 +53,12 @@
          </map:when>  
        </map:select>
      </map:pipeline>
-
+      <map:match pattern="linkmap.xml">
+        <map:generate src="cocoon://abs-linkmap" />
+        <map:transform src="{forrest:stylesheets}/linkmap2document.xsl"/>
+        <map:serialize type="xml" />
+      </map:match>
+      
      <map:pipeline>
       <!-- site.xml with @href's appended to be context-relative. -->
       <map:match pattern="abs-linkmap">
@@ -61,7 +66,6 @@
         <map:transform src="{forrest:stylesheets}/absolutize-linkmap.xsl" />
         <map:serialize type="xml" />
       </map:match>
-
 
       <!-- Linkmap for regular pages -->
       <map:match pattern="**linkmap-*">

Added: forrest/trunk/src/core/context/resources/stylesheets/linkmap2document.xsl
==============================================================================
--- (empty file)
+++ forrest/trunk/src/core/context/resources/stylesheets/linkmap2document.xsl	Tue Sep  7 04:23:34
2004
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+   <xsl:output method="xml" 
+               version="1.0" 
+               omit-xml-declaration="no" 
+               indent="yes"
+               doctype-public="-//APACHE//DTD Documentation V1.2//EN"
+               doctype-system="http://forrest.apache.org/dtd/document-v12.dtd" />
+   
+   <xsl:template match="/">
+     <document>
+       <header>
+         <title>Site Linkmap</title>
+       </header>
+       <body>
+        <section>
+          <title>Table of Contents</title>
+           <xsl:apply-templates select="*[not(self::site)]" />        
+        </section>
+       </body>
+     </document>       
+   </xsl:template>     
+
+     <xsl:template match="*">
+     
+        <xsl:if test="*">
+         <ul> 
+	     <xsl:apply-templates/>        
+         </ul>
+        </xsl:if>
+        <li><a href="{@href}"><xsl:value-of select="name(.)" /></a></li>
+
+     </xsl:template>
+
+</xsl:stylesheet>
+

Modified: forrest/trunk/src/core/context/sitemap.xmap
==============================================================================
--- forrest/trunk/src/core/context/sitemap.xmap	(original)
+++ forrest/trunk/src/core/context/sitemap.xmap	Tue Sep  7 04:23:34 2004
@@ -382,6 +382,11 @@
      
       <!-- Body content -->
       <map:match pattern="**.xml">
+     
+        <map:match pattern="linkmap.xml">
+          <map:mount uri-prefix="" src="linkmap.xmap" check-reload="yes" />
+        </map:match>
+              
         <map:match pattern="changes.xml">
           <map:mount uri-prefix="" src="status.xmap" check-reload="yes" />
         </map:match>

Modified: forrest/trunk/status.xml
==============================================================================
--- forrest/trunk/status.xml	(original)
+++ forrest/trunk/status.xml	Tue Sep  7 04:23:34 2004
@@ -63,6 +63,8 @@
          <link href="site:upgrading_06">upgrading to v0.6</link>
          </action>
 
+         <action dev="NKB" type="add" context="core">Requesting linkmap.html Forrest
now renderes the site.xml file as a table of contents.</action>
+
          <action dev="NKB" type="add" context="core">Now the *.ihtml and *.cwiki extensions
are deprecated. To get the same functionality it is recommended to switch to *.html and *.jspwiki.
With this it's now possible to have a site in simple html, edited with any html editor. The
*.jspwiki extension was put to make it clear what the format is about.</action>
 
          <action dev="NKB" type="add" context="core">New project sitemap extension
mechanism. Now it's possible to add a project sitemap that plugs into the processing at the
beginning. If the requested url is resolved by it, it will serve the file directly. If the
requested url with the extension changed to xml is matched, then Forrest will use that result
as the intermediate format and render it. This should make Forrest updates not collide with
project-specific sitemaps. See doc: 

Mime
View raw message