forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From diwa...@apache.org
Subject svn commit: r307241 [2/2] - in /forrest/trunk/main/webapp/resources/stylesheets: ./ aggregates/
Date Sat, 08 Oct 2005 02:51:12 GMT
Added: forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,229 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+<!-- Generates a Forrest document from a Lucene search result. -->
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0" 
+  xmlns:xlink="http://www.w3.org/1999/xlink"
+  version="1.0">
+
+  <!-- The HTTP request parameter to pass in the query string -->
+  <xsl:param name="query-string-param" select="'queryString'"/>
+
+  <!-- The HTTP request parameter to pass in the page length (number
+  of hits displayed per search result page) -->
+  <xsl:param name="page-length-param" select="'pageLength'"/>
+
+  <!-- The HTTP request parameter to pass in the start index (the
+  index of the first item in a hit list that is actually being
+  displayed) -->
+  <xsl:param name="start-index-param" select="'startIndex'"/>
+
+  <!-- The URL of the search page. -->
+  <xsl:param name="search-url" select="'lucene-search.html'"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="search:results">
+    <document>
+      <header>
+        <!-- FIXME: i18n stuff here -->
+        <title>Search Results</title>
+      </header>
+      <body>
+        <xsl:if test="not(search:hits)">
+          <note>
+            <xsl:text>Your search for </xsl:text>
+            <code>
+              <xsl:value-of select="@query-string"/>
+            </code>
+            <xsl:text> returned no results. Check that you spelled your
+            search terms correctly, or choose more generic terms to
+            broaden your search.</xsl:text>
+          </note>
+        </xsl:if>
+        <xsl:apply-templates/>
+      </body>
+    </document>
+    
+  </xsl:template>
+  
+  <xsl:template match="search:hits">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <!-- Displays the search hit as a paragraph. -->
+  <xsl:template match="search:hit">
+    <p>
+      <!-- FIXME: Score should be displayed in some graphical manner
+      (stars, color codes, whatever) -->
+      <strong>
+        <xsl:text>Score </xsl:text>
+        <xsl:value-of select="@score"/>
+        <xsl:text>: </xsl:text>
+      </strong>
+      <xsl:apply-templates select="." mode="create-link"/>
+      <xsl:apply-templates select="search:field[@name= 'author']"/>
+      <xsl:apply-templates select="search:field[@name= 'abstract']"/>
+    </p>
+  </xsl:template>
+  
+  <!-- Renders the url attribute of a search hit as a Forrest
+  link. -->
+  <xsl:template match="search:hit" mode="create-link">
+    <xsl:variable name="mangledlink">
+      <xsl:value-of select="concat(substring-before(@uri, '.'), '.html')"/>
+      <!--
+      <xsl:choose>
+        <xsl:when test="substring(@uri,string-length(@uri)-3) = '.xml'">
+          <xsl:text>site:</xsl:text>
+          <xsl:value-of select="substring(@uri, 1, string-length(@uri)-4)"/>
+        </xsl:when>
+        <xsl:when test="substring(@uri,string-length(@uri)-5) = '.ehtml'">
+          <xsl:text>site:</xsl:text>
+          <xsl:value-of select="substring(@uri, 1, string-length(@uri)-6)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="@uri"/>
+        </xsl:otherwise>
+      </xsl:choose>
+      -->
+    </xsl:variable>
+
+    <xsl:variable name="linktext">
+      <xsl:choose>
+        <!-- If a field for the document title exists, use its
+        contents as the link text. -->
+        <xsl:when test="search:field[@name = 'title']">
+          <xsl:value-of select="search:field[@name = 'title']"/>
+        </xsl:when>
+        <!-- Otherwise, use the mangled link as determined above -->
+        <xsl:otherwise>
+          <xsl:value-of select="$mangledlink"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <!-- Create the link -->
+    <link>
+      <xsl:attribute name="href">
+        <xsl:value-of select="$mangledlink"/>
+      </xsl:attribute>
+      <xsl:value-of select="$linktext"/>
+    </link>
+  </xsl:template>
+
+  <!-- If a document's author is known, displays the author's name in
+  parentheses -->
+  <xsl:template match="search:field[@name = 'author' and text() != '']">
+    <xsl:text> (</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>) </xsl:text>
+  </xsl:template>
+
+  <!-- If a abstract exists for a document, displays it with emphasis -->
+  <xsl:template match="search:field[@name = 'abstract' and text() != '']">
+    <em>
+      <xsl:apply-templates/>
+    </em>
+  </xsl:template>
+
+  <!-- Creates a document footer, to be used for navigation -->
+  <xsl:template match="search:navigation">
+    <xsl:variable name="startindex" select="../@start-index"/>
+    <xsl:variable name="hitcount" select="count(../search:hits/search:hit)"/>
+    <xsl:variable name="endindex" select="$startindex + $hitcount - 1"/>
+    <xsl:variable name="totalhitcount" select="@total-count"/>
+
+    <footer>
+      <xsl:if test="$totalhitcount != 0">
+        <xsl:choose>
+          <xsl:when test="../@page-length = 1">
+            <xsl:text>Displaying hit </xsl:text>
+            <!-- A zero-based index might be confusing to users, so we
+            simply add 1 to the real index values -->
+            <xsl:value-of select="$startindex + 1"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:text>Displaying hits </xsl:text>
+            <!-- A zero-based index might be confusing to users, so we
+            simply add 1 to the real index values -->
+            <xsl:value-of select="$startindex + 1"/>
+            <xsl:text> to </xsl:text>
+            <xsl:value-of select="$endindex + 1"/>
+          </xsl:otherwise>
+        </xsl:choose>
+        <xsl:text> of </xsl:text>
+        <xsl:value-of select="$totalhitcount"/>
+        <xsl:text> total hits for query </xsl:text>
+        <code>
+          <xsl:value-of select="../@query-string"/>
+        </code>
+        <xsl:text>.</xsl:text>
+
+        <!-- Display "previous page" link, if appropriate -->
+        <xsl:if test="@has-previous = 'true'">
+          <xsl:text>&#160;</xsl:text>
+          <xsl:call-template name="nav-link">
+            <xsl:with-param name="linktext">Previous page</xsl:with-param>
+            <xsl:with-param name="start-index" select="@previous-index"/>
+          </xsl:call-template>
+        </xsl:if>
+
+        <!-- Display "next page" link, if appropriate -->
+        <xsl:if test="@has-next = 'true'">
+          <xsl:text>&#160;</xsl:text>
+          <xsl:call-template name="nav-link">
+            <xsl:with-param name="linktext">Next page</xsl:with-param>
+            <xsl:with-param name="startindex" select="@next-index"/>
+          </xsl:call-template>
+        </xsl:if>
+      </xsl:if>
+    </footer>
+  </xsl:template>
+
+  <!-- Convenience template, constructs a link to jump to a specific
+  item in the hit list. -->
+  <xsl:template name="nav-link">
+    <xsl:param name="context" select="."/>
+    <xsl:param name="linktext"/>
+    <xsl:param name="startindex"/>
+
+    <link>
+      <xsl:attribute name="href">
+        <xsl:value-of select="$search-url"/>
+        <xsl:text>?</xsl:text>
+        <xsl:value-of select="$query-string-param"/>
+        <xsl:text>=</xsl:text>
+        <xsl:value-of select="$context/../@query-string"/>
+        <xsl:text>&amp;</xsl:text>
+        <xsl:value-of select="$start-index-param"/>
+        <xsl:text>=</xsl:text>
+        <xsl:value-of select="$startindex"/>
+        <xsl:text>&amp;</xsl:text>
+        <xsl:value-of select="$page-length-param"/>
+        <xsl:text>=</xsl:text>
+        <xsl:value-of select="$context/../@page-length"/>
+      </xsl:attribute>
+      <xsl:value-of select="$linktext"/>
+    </link>
+
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+<!-- Creates a Forrest document containing status information from a
+     Lucene index creation or update. -->
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
+  version="1.0">
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="lucene:index">
+    <document>
+      <header>
+        <title>Lucene Index Creation Report</title>
+      </header>
+      <body>
+        <p>
+          <xsl:text>Lucene has created an index in a directory named </xsl:text>
+          <code>
+            <xsl:value-of select="@directory"/>
+          </code>
+          <xsl:text> below your servlet container's context
+          root. </xsl:text>
+          <xsl:text>It used the analyzer class </xsl:text>
+          <code>
+            <xsl:value-of select="@analyzer"/>
+          </code>
+          <xsl:text> for this purpose.</xsl:text>
+        </p>
+        <p>
+          <xsl:value-of select="count(lucene:document)"/>
+          <xsl:text> documents were indexed. </xsl:text>
+          <xsl:text>The index was created with a merge factor
+          of </xsl:text>
+          <xsl:value-of select="@merge-factor"/>
+          <xsl:text>, just in case you're interested.</xsl:text>
+        </p>
+        <section>
+          <title>Index creation time breakdown</title>
+          <xsl:apply-templates/>
+        </section>
+      </body>
+    </document>
+  </xsl:template>
+
+  <xsl:template match="lucene:document">
+    <p>
+      <xsl:text>The document </xsl:text>
+      <strong>
+        <xsl:value-of select="@url"/>
+      </strong>
+      <xsl:text> was indexed in </xsl:text>
+      <strong>
+        <xsl:value-of select="@elapsed-time"/>
+        <xsl:text>ms</xsl:text>
+      </strong>
+      <xsl:text>.</xsl:text>
+    </p>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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">
+
+  <xsl:param name="contextPath" select="string('/cocoon')"/>
+
+ <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>
+    <table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
+      <tr>
+        <td width="50%">
+          <h2><xsl:value-of select="document/header/title"/></h2>
+        </td>
+        <td width="25%">
+          <xsl:apply-templates select="document/header/tab"/>
+        </td>
+      </tr>
+    </table>
+
+    <p>
+     <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>
+
+    <p class="copyright">
+      Copyright &#169; 1999-2005 <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+      All rights reserved.
+    </p>
+   </body>
+  </html>
+ </xsl:template>
+
+ <xsl:template match="style">
+  <link type="text/css" rel="stylesheet" href="{@href}"/>
+ </xsl:template>
+ 
+ <xsl:template match="script">
+  <script type="text/javascript" src="{@href}"/>
+ </xsl:template>
+ 
+ <xsl:template match="tab">
+  <a href="{@href}"><i><xsl:value-of select="@title"/></i></a>&#160;
+ </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:choose> <!-- stupid test for the hierarchy depth -->
+   <xsl:when test="../../../section">
+    <h5><xsl:value-of select="title"/></h5>
+   </xsl:when>
+   <xsl:when test="../../section">
+    <h4><xsl:value-of select="title"/></h4>
+   </xsl:when>
+   <xsl:when test="../section">
+    <h4 class="samplesGroup"><xsl:value-of select="title"/></h4>
+   </xsl:when>
+  </xsl:choose>
+  <p>
+   <xsl:apply-templates select="*[name()!='title']"/>
+  </p>
+ </xsl:template>
+
+ <xsl:template match="source">
+  <div style="background: #b9d3ee; border: thin; border-color: black; border-style: solid; padding-left: 0.8em; 
+              padding-right: 0.8em; padding-top: 0px; padding-bottom: 0px; margin: 0.5ex 0px; clear: both;">
+  <pre>
+   <xsl:value-of select="."/>
+  </pre>
+  </div>
+ </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="*|@*|node()|text()" priority="-1">
+  <xsl:copy><xsl:apply-templates select="*|@*|node()|text()"/></xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+  Copyright 2002-2005 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.
+  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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:template match="pluginList">
+    <document>
+      <header>
+        <title>Plugins Index</title>
+      </header>
+      <body>
+        <section>
+          <title>Plugins Index</title>
+          <p>
+            Plugins are a way of extending Forrest to
+            satisfy site-specific needs. If a site requires one or 
+            more plugins then the site designer will 
+            have named them in the <code>project.required.plugins</code> property 
+            in the projects <code>forrest.properties</code> file. When Forrest 
+            builds the site it will automatically discover the plugin and install 
+            it.For more information on how to use plugins see
+            <a href="http://forrest.apache.org/pluginDocs/plugins_0_70/usingPlugins.html">
+              Extending Forrest with Plugins
+            </a>.
+          </p>
+          <p>
+            This page lists all plugins that have been
+            recognised by the Apache Forrest project. There are two
+            sections to this page, the first is the released plugins,
+            The second is the whiteboard plugins. Any
+            plugins in the released section have been verified as
+            working in the versions of Forrest specified. However,
+            this verification does not imply that the plugins are mature,
+            merely that they work as documented. See the plugin 
+            documentation for how mature they are and the features they 
+            support.
+          </p>
+          
+          <p>The second section lists plugins in the whiteboard, that is
+          plugins that may change considerably in how they work before
+          their first official release. These plugins may not be fully
+          funcitonal, in most cases they are usable, but use them with
+          caution as they are not considered stable.</p>
+          
+          <div class="frame note">
+            <div class="label">Note</div>
+            <div class="content">If you have created a plugin that is not listed
+            here please let us know.</div>
+          </div>
+          
+          <section>
+            <title>Released Plugins</title>
+            <xsl:apply-templates select="plugins[@type='released']"/>
+          </section>
+          
+          <section>
+            <title>Whiteboard Plugins</title>
+            
+            <div class="frame warning">
+              <div class="label">Warning</div>
+              <div class="content">Plugins in this section may not automatically
+              deploy when you run Forrest as they are still in development.
+              You may need to perform some manual installation steps to use 
+              them. See the plugin documentation for more details.</div>
+            </div>
+            <xsl:apply-templates select="plugins[@type='whiteboard']"/>
+          </section>
+        </section>
+      </body>
+    </document>
+  </xsl:template>
+  
+  <xsl:template match="plugins">
+    <section>
+      <title>Input Plugins</title>
+      <p>
+        Input plugins enable Forrest to work with
+        source documents in different formats.
+      </p>
+      <xsl:apply-templates
+        select="plugin[@type='input']">
+        <xsl:sort select="@name" />
+      </xsl:apply-templates>
+    </section>
+
+    <section>
+      <title>Output Plugins</title>
+      <p>
+        Output plugins enable Forrest to produce
+        documents in different formats.
+      </p>
+      <xsl:apply-templates
+        select="plugin[@type='output']">
+        <xsl:sort select="@name" />
+      </xsl:apply-templates>
+    </section>
+
+    <section>
+      <title>Internal Plugins</title>
+      <p>
+        Internal plugins change the core behaviour
+        of Forrest.
+      </p>
+      <xsl:apply-templates
+        select="plugin[@type='internal']">
+        <xsl:sort select="@name" />
+      </xsl:apply-templates>
+    </section>
+  </xsl:template>
+
+  <xsl:template match="plugin">
+    <section>
+      <title>
+        <xsl:value-of select="@name" />
+      </title>
+      <table>
+        <tr>
+          <th width="25%">Description</th>
+          <td>
+            <xsl:choose>
+              <xsl:when test="description/p">
+                <xsl:apply-templates
+                  select="description" />
+              </xsl:when>
+              <xsl:otherwise>
+                <p>
+                  <xsl:apply-templates
+                    select="description" />
+                </p>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+        </tr>
+
+        <tr>
+          <th width="25%">Author</th>
+          <td>
+            <xsl:value-of select="@author" />
+          </td>
+        </tr>
+
+        <tr>
+          <th width="25%">Website</th>
+          <td>
+            <a>
+              <xsl:attribute name="href">
+                <xsl:value-of select="@website" />
+              </xsl:attribute>
+              <xsl:value-of select="@website" />
+            </a>
+          </td>
+        </tr>
+
+        <tr>
+          <th width="25%">Download URL:</th>
+          <td>
+            <a>
+              <xsl:attribute name="href">
+                <xsl:value-of select="@url" />
+              </xsl:attribute>
+              <xsl:value-of select="@url" />
+            </a>
+          </td>
+        </tr>
+
+        <tr>
+          <th width="25%">Plugin version</th>
+          <td>
+            <xsl:value-of select="@version" />
+          </td>
+        </tr>
+
+        <tr>
+          <th width="25%">
+            Minimum Forrest version required
+          </th>
+          <td>
+            <xsl:value-of select="forrestVersion" />
+          </td>
+        </tr>
+      </table>
+    </section>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/profile-to-html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/profile-to-html.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/profile-to-html.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/profile-to-html.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,287 @@
+<?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.
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:profile="http://apache.org/cocoon/profiler/1.0">
+
+  <xsl:param name="sort"/>
+  <xsl:param name="key"/>
+  <xsl:param name="result"/>
+  <xsl:param name="component"/>
+
+  <xsl:template match="/">
+    <html>
+      <head>
+        <title>Cocoon2 profile information [<xsl:value-of select="profile:profilerinfo/@date"/>]</title>
+      </head>
+      <body>
+        <xsl:choose>
+          <xsl:when test="$component!=''">
+            <xsl:apply-templates
+              select="profile:profilerinfo/profile:pipeline/profile:result/profile:component[@index=$component]"
+              mode="fragment"/>
+          </xsl:when>
+          <xsl:when test="$result!=''">
+            <xsl:apply-templates select="profile:profilerinfo/profile:pipeline/profile:result" mode="result"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates select="profile:profilerinfo" mode="pipelines"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </body>
+    </html>
+  </xsl:template>
+
+  <xsl:template match="profile:profilerinfo" mode="pipelines">
+    <p>
+      Sort results by <a href="?sort=uri">uri</a>,
+      <a href="?sort=count">count</a>, <a href="?sort=time">time</a>.
+    </p>
+    <p>
+      Start at the section which matches the original request, then follow the
+      processing. The right-hand columns are the times (in milliseconds) for 
+      each occasion that a component was processed. The far right column is
+      the initial occasion.
+    </p>
+
+    <table noshade="noshade" border="0" cellspacing="1" cellpadding="0">
+      <xsl:choose>
+        <xsl:when test="$sort = 'uri'">
+          <xsl:apply-templates select="profile:pipeline">
+            <xsl:sort select="@uri"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$sort = 'time'">
+          <xsl:apply-templates select="profile:pipeline">
+            <xsl:sort select="@time" data-type="number"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:when test="$sort = 'count'">
+          <xsl:apply-templates select="profile:pipeline">
+            <xsl:sort select="@count" data-type="number"/>
+          </xsl:apply-templates>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="profile:pipeline">
+    <xsl:if test="position() mod 5 = 1">
+      <tr bgcolor="#FFC0C0">
+       <th></th>
+       <th>Component</th>
+       <th>Average</th>
+       <th colspan="10">Last Results</th>
+      </tr>
+    </xsl:if>
+    <tr bgcolor="#C0C0FF">
+     <td colspan="3">
+       <font face="verdana"><strong><xsl:value-of select="@uri"/></strong></font>
+       (<xsl:value-of select="@count"/> results,
+       total time: <xsl:value-of select="@processingTime"/>,
+       average time: <xsl:value-of select="profile:average/@time"/>)
+     </td>
+     <xsl:for-each select="profile:result">
+      <td>
+       <a href="?key={../@key}&amp;result={@index}">
+        <xsl:value-of select="@index"/>
+       </a>
+      </td>
+     </xsl:for-each>
+    </tr>
+
+    <xsl:for-each select="profile:average/profile:component">
+      <xsl:variable name="bgcolor">
+       <xsl:if test="position() mod 2 = 0">#D0D0D0</xsl:if>
+       <xsl:if test="position() mod 2 = 1">#E0E0E0</xsl:if>
+      </xsl:variable>
+      <tr bgcolor="{$bgcolor}">
+
+       <xsl:variable name="pos" select="position()"/>
+       <td>
+        <xsl:value-of select="$pos"/>
+       </td>
+       <td>
+         <xsl:value-of select="@role"/>
+         <xsl:text>&#160;</xsl:text>
+         <xsl:if test="@source">
+           <i>src=</i><xsl:value-of select="@source"/>
+         </xsl:if>
+       </td>
+
+       <xsl:for-each select="../../profile:average/profile:component[position()=$pos]">
+        <th>
+         <xsl:value-of select="@time"/>
+        </th>
+       </xsl:for-each>
+
+       <xsl:for-each select="../../profile:result/profile:component[position()=$pos]">
+        <td>
+          <xsl:value-of select="@time"/>
+        </td>
+       </xsl:for-each>
+
+      </tr>
+    </xsl:for-each>
+
+       <xsl:variable name="pos" select="count(profile:average/profile:component)"/>
+      <tr>
+       <td>
+        <xsl:value-of select="$pos+1"/>
+       </td>
+       <td>
+        TOTAL
+       </td>
+
+        <th>
+         <xsl:value-of select="profile:average/@time"/>
+        </th>
+
+       <xsl:for-each select="profile:result">
+        <td>
+         <xsl:value-of select="@time"/>
+        </td>
+       </xsl:for-each>
+
+      </tr>
+  </xsl:template>
+
+  <xsl:template match="profile:result" mode="result">
+    <h1><xsl:value-of select="profile:environmentinfo/profile:uri"/></h1>
+    <table>
+      <tr bgcolor="#FFC0C0">
+        <th></th>
+        <th>Component</th>
+        <th colspan="3">Results</th>
+      </tr>
+      <tr bgcolor="#C0C0FF">
+        <td colspan="2">
+          <font face="verdana"><strong><xsl:value-of select="profile:environmentinfo/profile:uri"/></strong></font>
+        </td>
+        <td>Total Time</td>
+        <td>Setup Time</td>
+        <td>Processing Time</td>
+        <td/>
+      </tr>
+
+      <xsl:for-each select="profile:component">
+        <xsl:variable name="bgcolor">
+          <xsl:if test="position() mod 2 = 0">#D0D0D0</xsl:if>
+          <xsl:if test="position() mod 2 = 1">#E0E0E0</xsl:if>
+        </xsl:variable>
+        <tr bgcolor="{$bgcolor}">
+
+          <xsl:variable name="pos" select="position()"/>
+          <td>
+            <xsl:value-of select="$pos"/>
+          </td>
+          <td>
+            <xsl:value-of select="@role"/>
+            <xsl:text>&#160;</xsl:text>
+            <xsl:if test="@source">
+              <i>src=</i><xsl:value-of select="@source"/>
+            </xsl:if>
+          </td>
+
+          <td>
+            <xsl:value-of select="@time"/>
+          </td>
+
+          <td>
+            <xsl:value-of select="@setup"/>
+          </td>
+
+          <td>
+            <xsl:value-of select="@processing"/>
+          </td>
+
+          <td>
+            <xsl:if test="position() != last()">
+              <!-- FIXME: hard-coded filename -->
+              <a href="cprofile.xml?key={$key}&amp;result={$result}&amp;component={@index}&amp;fragmentonly=true">[XML]</a>
+<!-- Forrest doesn't enable this cocoon-view
+              &#160;&#160;
+              <a href="profile.xml?key={$key}&amp;result={$result}&amp;component={@index}&amp;fragmentonly=true&amp;cocoon-view=pretty-content">[XML as HTML]</a>
+-->
+            </xsl:if>
+          </td>
+        </tr>
+      </xsl:for-each>
+    </table>
+    <xsl:apply-templates select="profile:environmentinfo"/>
+  </xsl:template>
+
+  <xsl:template match="profile:environmentinfo">
+   <xsl:apply-templates select="profile:request-parameters"/>
+   <xsl:apply-templates select="profile:session-attributes"/>
+  </xsl:template>
+
+  <xsl:template match="profile:request-parameters">
+    <table>
+      <tr bgcolor="#C0C0FF">
+       <th colspan="2">
+        Request parameters
+       </th>
+      </tr>
+      <tr bgcolor="#FFC0C0">
+        <th>Name</th>
+        <th>Value</th>
+      </tr>
+      <xsl:for-each select="profile:parameter">
+        <xsl:variable name="bgcolor">
+          <xsl:if test="position() mod 2 = 0">#D0D0D0</xsl:if>
+          <xsl:if test="position() mod 2 = 1">#E0E0E0</xsl:if>
+        </xsl:variable>
+
+        <tr bgcolor="{$bgcolor}">
+          <td><xsl:value-of select="@name"/></td>
+          <td><xsl:value-of select="@value"/></td>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="profile:session-attributes">
+    <table>
+      <tr bgcolor="#C0C0FF">
+       <th colspan="2">
+        Session attributes
+       </th>
+      </tr>
+      <tr bgcolor="#FFC0C0">
+        <th>Name</th>
+        <th>Value</th>
+      </tr>
+      <xsl:for-each select="profile:attribute">
+        <xsl:variable name="bgcolor">
+          <xsl:if test="position() mod 2 = 0">#D0D0D0</xsl:if>
+          <xsl:if test="position() mod 2 = 1">#E0E0E0</xsl:if>
+        </xsl:variable>
+
+        <tr bgcolor="{$bgcolor}">
+          <td><xsl:value-of select="@name"/></td>
+          <td><xsl:value-of select="@value"/></td>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/profile-to-html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/profile-to-page.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/profile-to-page.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/profile-to-page.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/profile-to-page.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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" 
+                xmlns:profile="http://apache.org/cocoon/profiler/1.0">
+
+ <xsl:param name="key"/>
+ <xsl:param name="result"/>
+ <xsl:param name="component"/>
+
+ <xsl:template match="/">
+  <document>
+   <header>
+   <title>Forrest Profiler</title>
+    <tab title="Back" href="index.html"/>
+   </header>
+   <body>
+    <xsl:choose>
+     <xsl:when test="$component!=''">
+      <xsl:apply-templates
+          select="profile:profilerinfo/profile:pipeline/profile:result/profile:component[@index=$component]"
+          mode="fragment"/>
+     </xsl:when>
+     <xsl:when test="$result!=''">
+      <xsl:apply-templates select="profile:profilerinfo/profile:pipeline/profile:result" mode="result"/>
+     </xsl:when>
+     <xsl:when test="$key!=''">
+      <xsl:apply-templates select="profile:profilerinfo/profile:pipeline" mode="results"/>
+     </xsl:when>
+     <xsl:otherwise>
+      <xsl:apply-templates select="profile:profilerinfo" mode="pipelines"/>
+     </xsl:otherwise>
+    </xsl:choose>
+
+   </body>
+  </document>
+ </xsl:template>
+
+ <xsl:template match="profile:profilerinfo" mode="pipelines">
+
+  <row>
+   <column title="Overview">
+
+    <table width="100%" cellspacing="0" cellpadding="5" align="left">
+     <font size="+0" face="arial,helvetica,sanserif" color="#000000">
+
+      <tr>
+       <td align="left"><b>URI</b></td>
+       <td align="left"><b>Average(Total time)</b></td>
+       <td align="left" colspan="10"><b>Last Results(Total time)</b></td>
+      </tr>
+
+      <xsl:for-each select="profile:pipeline">
+
+       <tr bgcolor="#FFFFFF">
+        <td>
+         <a href="?key={@key}">
+          <font face="verdana"><strong><xsl:value-of select="@uri"/></strong></font>
+         </a>
+        </td>
+        <td>
+         <a href="?key={@key}">
+          <xsl:value-of select="profile:average/@time"/> ms
+         </a>
+        </td>
+        <xsl:for-each select="profile:result">
+         <td>
+          <a href="?key={../@key}&amp;result={@index}">
+           <xsl:value-of select="@time"/> ms
+          </a>
+         </td>
+        </xsl:for-each>
+       </tr>
+
+      </xsl:for-each>
+
+     </font>
+    </table>
+
+   </column>
+  </row>
+
+ </xsl:template>
+
+ <xsl:template match="profile:pipeline" mode="results">
+
+  <row>
+   <column title="{@uri}">
+
+    <table width="100%" cellspacing="0" cellpadding="5" align="left">
+     <font size="+0" face="arial,helvetica,sanserif" color="#000000">
+ 
+      <tr>
+       <td align="left"><b>NN</b></td>
+       <td align="left"><b>Components(Role)</b></td>
+       <td align="left"><b>Average time</b></td>
+       <td align="left"><b>Lastest times</b></td>
+      </tr>
+
+      <xsl:for-each select="profile:average/profile:component">
+       <tr>
+
+        <xsl:variable name="pos" select="position()"/>
+        <td width="1%">
+         <xsl:value-of select="$pos"/>
+        </td>
+        <td width="10%">
+         <xsl:value-of select="@role"/>
+         <xsl:if test="@source">
+          (<xsl:value-of select="@source"/>)
+         </xsl:if>
+        </td>
+
+        <xsl:for-each select="../../profile:average/profile:component[position()=$pos]">
+         <td>
+          <xsl:value-of select="@time"/> ms
+         </td>
+        </xsl:for-each>
+ 
+        <xsl:for-each select="../../profile:result/profile:component[position()=$pos]">
+         <td>
+          <a href="?key={../../@key}&amp;result={../@index}&amp;component={@index}">
+           <xsl:value-of select="@time"/> ms
+          </a>
+         </td>
+        </xsl:for-each>
+
+       </tr>
+      </xsl:for-each>
+
+      <tr>
+       <td></td>
+       <td><b>Total time</b></td>
+       <td><b><xsl:value-of select="profile:result/@time"/> ms</b></td>
+       <xsl:for-each select="profile:result">
+        <td>
+         <b>
+          <xsl:value-of select="@time"/> ms
+         </b>
+        </td>
+       </xsl:for-each>
+      </tr>
+
+     </font>
+    </table>
+
+   </column>
+  </row>
+
+ </xsl:template>
+
+ <xsl:template match="profile:result" mode="result">
+
+  <row>
+   <column title="{../@uri}">
+
+    <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2"  width="100%" align="center">
+
+     <tr>
+      <td align="left"><b>Components</b></td>
+      <td align="left"><b>Total time</b></td>
+      <td align="left"><b>Setup time</b></td>
+      <td align="left"><b>Processing time</b></td>
+     </tr>
+
+
+     <xsl:for-each select="profile:component">
+      <tr>
+       <td>
+        <a href="?key={../../@key}&amp;result={../@index}&amp;component={@index}">
+         <xsl:value-of select="@role"/>
+         <xsl:if test="@source">
+          (<xsl:value-of select="@source"/>)
+         </xsl:if>
+        </a>
+       </td>
+       <td>
+        <xsl:value-of select="@time"/> ms
+       </td>
+       <td>
+        <xsl:value-of select="@setup"/> ms
+       </td>
+       <td>
+        <xsl:value-of select="@processing"/> ms
+       </td>
+      </tr>
+     </xsl:for-each>
+
+    </table>
+
+   </column>
+
+  </row>
+
+  <row>
+
+   <column title="Request parameters">
+
+    <table width="100%" cellspacing="0" cellpadding="5" align="center">
+     <font size="+0" face="arial,helvetica,sanserif" color="#000000">
+
+      <tr>
+       <td align="left"><b>Name</b></td>
+       <td align="left"><b>Value</b></td>
+      </tr>
+
+      <xsl:for-each select="profile:environmentinfo/profile:request-parameters/profile:parameter">
+       <tr>
+        <td><xsl:value-of select="@name"/></td>
+        <td><xsl:value-of select="@value"/></td>
+       </tr>
+      </xsl:for-each>
+
+      <tr>
+       <td>&#160;</td>
+       <td>&#160;</td>
+      </tr>
+
+     </font>
+    </table>
+    
+   </column>
+
+  </row>
+
+  <row>
+
+   <column title="Session attributes">
+
+    <table width="100%" cellspacing="0" cellpadding="5" align="center">
+     <font size="+0" face="arial,helvetica,sanserif" color="#000000">
+
+      <tr>
+       <td align="left"><b>Name</b></td>
+       <td align="left"><b>Value</b></td>
+      </tr>
+  
+      <xsl:for-each select="profile:environmentinfo/profile:session-attributes/profile:attribute">
+       <tr>
+        <td><xsl:value-of select="@name"/></td>
+        <td><xsl:value-of select="@value"/></td>
+       </tr>
+      </xsl:for-each>
+
+      <tr>
+       <td>&#160;</td>
+       <td>&#160;</td>
+      </tr>
+
+     </font>
+    </table>
+
+   </column>
+  </row>
+
+ </xsl:template>
+
+ <xsl:template match="profile:component" mode="fragment">
+
+  <row>
+   <column>
+    <xsl:attribute name="title">
+     <xsl:value-of select="@role"/>
+     <xsl:if test="@source">
+      (<xsl:value-of select="@source"/>)
+     </xsl:if>
+    </xsl:attribute>
+
+    <xsl:choose>
+     <xsl:when test="profile:fragment">
+       <xsl:apply-templates/>
+     </xsl:when>
+     <xsl:otherwise>
+      <b>Fragment not available!</b>
+     </xsl:otherwise>
+    </xsl:choose>
+
+   </column>
+  </row>
+
+ </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/profile-to-page.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/project-to-text.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/project-to-text.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/project-to-text.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/project-to-text.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+
+<!--+
+    | Replace element for the value on the project descriptor 
+    | xmlns:for has to be replaced for the final version
+    +-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:for="http://apache.org/forrest" version="1.0">
+
+  <xsl:import href="copyover.xsl"/>
+
+  <xsl:template match="for:*">
+    <xsl:param name="config" select="//skinconfig"/>
+    <xsl:choose>
+
+      <!-- If we have nested for:* elements in the XML we're
+           transforming, recursively call ourselves
+           with a narrowed scope for the skinconfig. -->
+
+      <xsl:when test="*">
+        <xsl:variable name="ln" select="local-name()"/>
+        <xsl:apply-templates>
+          <xsl:with-param name="config" select="$config/*[local-name() = $ln]"/>
+        </xsl:apply-templates>
+      </xsl:when>
+
+      <!-- Ah ha!  No more for:* children in the XML document being
+           transformed so we just select the value of this node from skinconfig
+           (ie.  $config). Note that the node we select from skinconfig may
+           have nested elements and we'll get the values of all of them.  -->
+
+      <xsl:otherwise>
+        <xsl:variable name="ln" select="local-name()"/>
+        <xsl:value-of select="$config/*[local-name() = $ln]"/>
+      </xsl:otherwise>
+
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/project-to-text.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/projectnavigation-to-site.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/projectnavigation-to-site.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/projectnavigation-to-site.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/projectnavigation-to-site.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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"
+                encoding="ISO-8859-1"
+                doctype-system="book-cocoon-v10.dtd"
+                doctype-public="-//APACHE//DTD Cocoon Documentation Book V1.0//EN" />
+
+    <!-- book to project -->
+    <xsl:template match="project">
+        <book software="{@name}"
+            copyright="{@name}"
+            title="{title}">
+
+        <xsl:for-each select = "//menu">
+          <menu label="{@name}">
+            <xsl:for-each select = "item">
+             <menu-item  label="{@name}" href="{@href}"/>
+            </xsl:for-each>
+          </menu> 
+        </xsl:for-each>
+
+        </book>
+    </xsl:template>
+
+    <xsl:template match="menu"/>
+
+    <xsl:template match="item"/>
+
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/projectnavigation-to-site.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/rss-to-document.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/rss-to-document.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/rss-to-document.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/rss-to-document.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,39 @@
+<?xml version='1.0'?>
+<!--
+  Copyright 2002-2005 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.
+  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:template match="rss">
+  <document>
+    <header>
+      <title><xsl:value-of select="channel/title"/></title>
+    </header>
+    <body>
+      <xsl:apply-templates select="channel/item"/>
+    </body>
+  </document>
+</xsl:template>
+
+<xsl:template match="item">
+  <section>
+    <title><xsl:value-of select="title" disable-output-escaping="yes"/></title>
+    <p><link href="{link}"><xsl:value-of select="link"/></link></p>
+    <p><xsl:value-of select="description" disable-output-escaping="yes"/></p>
+  </section>
+</xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/rss-to-document.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/rssissues-to-document.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/rssissues-to-document.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/rssissues-to-document.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/rssissues-to-document.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<!--
+  Copyright 2002-2005 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.
+  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:template match="rss">
+  <document>
+    <header>
+      <title>Open issues for the next release</title>
+    </header>
+    <body>
+      <note>These are the top 25 open issues for the next release that are scheduled in our
+       <link href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=12310000">issue tracking system</link>
+       (see 
+       <link href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?pid=12310000&amp;resolutionIds=-1&amp;tempMax=1000&amp;reset=true">all</link> open issues).
+      The listing below is regenerated on each Forrest run.</note>
+      <xsl:apply-templates select="channel/item"/>
+    </body>
+  </document>
+</xsl:template>
+
+<xsl:template match="item">
+  <section>
+    <title><xsl:value-of select="title" disable-output-escaping="yes"/></title>
+    <p><link href="{link}"><xsl:value-of select="link"/></link></p>
+    <p><xsl:value-of select="description" disable-output-escaping="yes"/></p>
+  </section>
+</xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/rssissues-to-document.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/site-to-book.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/site-to-book.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/site-to-book.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/site-to-book.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+
+<!--
+Stylesheet for generating book.xml from a suitably hierarchical site.xml file.
+The project info is currently hardcoded, but since it isn't used anyway that
+isn't a major problem.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:f="http://apache.org/forrest/linkmap/1.0" exclude-result-prefixes="f">
+
+  <xsl:param name="path"/>
+  <xsl:output doctype-system="book-cocoon-v10.dtd" doctype-public="-//APACHE//DTD Cocoon Documentation Book V1.0//EN"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  <xsl:template match="f:site">
+    <book software="Forrest"
+      title="Apache Forrest"
+      copyright="Copyright 2002-2005 The Apache Software Foundation or its licensors, as applicable.">
+      <xsl:apply-templates/>
+    </book>
+  </xsl:template>
+
+  <xsl:template match="*/*">
+    <xsl:choose>
+      <!-- No label, abandon the whole subtree -->
+      <xsl:when test="not(@label)">
+      </xsl:when>
+      <!-- Below here, everything has a label, and is therefore considered "for display" -->
+
+      <!-- No children -> must be a menu item -->
+      <!-- Has children, but they are not for display -> menu item -->
+      <xsl:when test="count(*) = 0 or count(*) > 0 and (not(*/@label))">
+        <menu-item>
+          <xsl:copy-of select="@*"/> 
+        </menu-item>
+      </xsl:when>
+      <!-- Anything else is considered a menu -->
+      <xsl:otherwise>
+        <menu>
+          <xsl:copy-of select="@*"/> 
+          <xsl:apply-templates/>
+        </menu>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/site-to-book.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/site-to-site-normalizetabs.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/site-to-site-normalizetabs.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/site-to-site-normalizetabs.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/site-to-site-normalizetabs.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+<!--
+Stylesheet to inherit @tab attributes if a node doesn't have one itself. Eg, given as input:
+
+<site href="">
+  <index href="index.html"/>
+  <community href="community/" tab="community">
+    <faq href="faq.html">
+      <how_can_I_help href="#help"/>
+    </faq>
+    <howto tab="howto">
+      <cvs href="cvs-howto.html"/>
+    </howto>
+  </community>
+</site>
+
+Output would be:
+
+<site href="">
+  <index href="index.html"/>
+  <community tab="community" href="community/">
+    <faq tab="community" href="faq.html">
+      <how_can_I_help tab="community" href="#help"/>
+    </faq>
+    <howto tab="howto">
+      <cvs tab="howto" href="cvs-howto.html"/>
+    </howto>
+  </community>
+</site>
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:l="http://apache.org/forrest/linkmap/1.0">
+
+  <!-- Return a value for a node's @tab, either using an existing @tab or the first ancestor's -->
+  <xsl:template name="gettab">
+    <xsl:param name="node"/>
+    <xsl:choose>
+      <xsl:when test="$node/@tab">
+        <xsl:value-of select="$node/@tab"/>
+      </xsl:when>
+      <xsl:when test="$node/..">
+        <xsl:call-template name="gettab">
+          <xsl:with-param name="node" select="$node/.."/>
+        </xsl:call-template>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="//*">
+    <xsl:variable name="newtab">
+      <xsl:call-template name="gettab">
+        <xsl:with-param name="node" select="."/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:copy>
+      <!-- <xsl:if test="not(normalize-space($newtab)='')"> -->
+        <xsl:attribute name="tab">
+          <xsl:value-of select="$newtab"/>
+        </xsl:attribute>
+        <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/site-to-site-normalizetabs.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+<!--
+This stylesheet selects a set of nodes with @tab equal to that of a node whose @href matches an input parameter.  Could
+probably be done with 2 lines of XQuery.
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:l="http://apache.org/forrest/linkmap/1.0">
+
+  <xsl:param name="path" select="'index'"/>
+
+  <xsl:variable name="tab">
+    <xsl:value-of select="string(//*[starts-with(@href, $path)]/@tab)"/>
+  </xsl:variable>
+
+  <xsl:template match="/*">
+  <!--
+    <xsl:message>## path is <xsl:value-of select="$path"/></xsl:message>
+    <xsl:message>## tab is <xsl:value-of select="$tab"/></xsl:message>
+    -->
+    <xsl:copy>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+  <!-- Ignore external references, as they are only useful for link mapping, not
+  creating menus -->
+  <xsl:template match="l:external-refs"/>
+
+  <xsl:template match="*">
+    <xsl:choose>
+      <!-- Take out the first test to not duplicate other tabs' content in first menu -->
+      <xsl:when test="$tab='' or @tab=$tab">
+        <xsl:copy>
+          <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-templates select="*"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/text-to-document.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/text-to-document.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/text-to-document.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/text-to-document.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+
+<!--+
+    | Transforms TextGenerator output to document format.
+    +-->
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <xsl:param name="filename"/>
+
+  <xsl:template match="/">
+    <document>
+      <header>
+        <title>
+          <xsl:value-of select="$filename"/>
+        </title>
+      </header>
+      <body>
+        <source>
+          <!-- &#13; is System.getProperty("line.separator") -->
+	  <xsl:value-of select="translate(node(),'&#13;',' ')"/>
+        </source>
+      </body>
+    </document>
+  </xsl:template>
+ 
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/text-to-document.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/webapp/resources/stylesheets/xdoc-to-lucene.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/xdoc-to-lucene.xsl?rev=307241&view=auto
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/xdoc-to-lucene.xsl (added)
+++ forrest/trunk/main/webapp/resources/stylesheets/xdoc-to-lucene.xsl Fri Oct  7 19:51:03 2005
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 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.
+  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.
+-->
+<!-- Transforms a Forrest document into a result tree fragment
+     suitable for use by the LuceneIndexTransformer. 
+
+     Note: the result document generated by this stylesheet CANNOT be
+     transformed by the LuceneIndexTransformer directly. Aggregation is
+     required to assemble several of the lucene:document elements
+     (which this stylesheet generates) into one lucene:index root
+     element. -->
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
+  version="1.0">
+
+  <!-- The URL of the document which the indexing information stems
+  from -->
+  <xsl:param name="document-url"/>
+
+  <!-- Creates a lucene:document element, and assigns the url
+  attribute as passed in via top-level param -->
+  <xsl:template match="/">
+    <lucene:document url="{$document-url}">
+      <xsl:apply-templates select="document/header" mode="store"/>
+      <contents>
+        <xsl:apply-templates/>
+      </contents>
+    </lucene:document>
+  </xsl:template>
+
+  <!-- Copies document header, title, and version, and instructs
+  Lucene to store the contents of these elements (in addition to
+  indexing them) -->
+  <xsl:template match="/document/header/title |
+                       /document/header/subtitle |
+                       /document/header/abstract |
+                       /document/header/version"
+                mode="store">
+    <xsl:element name="{name(.)}">
+      <xsl:attribute name="lucene:store">true</xsl:attribute>
+      <xsl:apply-templates/>
+    </xsl:element>
+  </xsl:template>
+
+  <!-- Copies authors/person, and instructs
+  Lucene to store the contents of the person element and to index the
+  email and name attributes -->
+  <xsl:template match="/document/header/authors/person"
+                mode="store">
+    <author>
+      <xsl:attribute name="lucene:store">true</xsl:attribute>
+      <xsl:value-of select="@name"/>
+    </author>
+  </xsl:template>
+
+  <!-- Everything else from document/header should be ignored -->
+  <xsl:template match="/document/header/notice |
+                       /document/header/type"
+                mode="store">
+  </xsl:template>
+
+  <!-- Copies an element and its attributes (text content is handled
+  by implicit default template) -->
+  <xsl:template match="*">
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+</xsl:stylesheet>

Propchange: forrest/trunk/main/webapp/resources/stylesheets/xdoc-to-lucene.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message