forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r526996 [2/3] - in /forrest/trunk/main/webapp/resources: chaperon/stylesheets/ stylesheets/ stylesheets/aggregates/ stylesheets/external/
Date Tue, 10 Apr 2007 02:07:19 GMT
Modified: forrest/trunk/main/webapp/resources/stylesheets/faq-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/faq-to-document.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/faq-to-document.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/faq-to-document.xsl Mon Apr  9 19:07:17 2007
@@ -15,85 +15,69 @@
   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:import href="copyover.xsl"/>
-
+  <xsl:import href="copyover.xsl"/>
   <xsl:template match="faqs">
-   <document>
-    <header>
-     <title><xsl:value-of select="@title"/></title>
-    </header>
-    <body>
-      <section>
-       <title>Questions</title>
-        <xsl:apply-templates select="faq|part"/>
-      </section>
-    </body>
-   </document>  
+    <document>
+      <header>
+        <title><xsl:value-of select="@title"/></title>
+      </header>
+      <body>
+        <section>
+          <title>Questions</title>
+          <xsl:apply-templates select="faq|part"/>
+        </section>
+      </body>
+    </document>
   </xsl:template>
-
   <xsl:template match="part" mode="index">
-    <li>
-      <strong>
-      <!-- Rely on <ol> numbering here -->
-      <!--<xsl:number level="multiple" count="faq|part" format="1.1. "/> -->
-       <xsl:apply-templates select="title"/></strong>
-       <ul>
+    <li><strong>
+<!-- Rely on <ol> numbering here -->
+<!--<xsl:number level="multiple" count="faq|part" format="1.1. "/> -->
+      <xsl:apply-templates select="title"/></strong>
+      <ul>
         <xsl:apply-templates select="faq|part" mode="index"/>
-       </ul><br />
-    </li>
+      </ul>
+      <br /></li>
   </xsl:template>
-
   <xsl:template match="faq" mode="index">
-    <li>
-	  <xsl:attribute name="id">
-        <xsl:call-template name="generate-id"/><xsl:text>-menu</xsl:text>
-	  </xsl:attribute>
-      <link>
-        <xsl:attribute name="href">
-          <xsl:text>#</xsl:text><xsl:call-template name="generate-id"/>
-        </xsl:attribute>
-		<!--
+    <li><xsl:attribute name="id">
+        <xsl:call-template name="generate-id"/>
+<xsl:text>-menu</xsl:text>
+      </xsl:attribute><link>
+      <xsl:attribute name="href">
+<xsl:text>#</xsl:text>
+        <xsl:call-template name="generate-id"/>
+      </xsl:attribute>
+<!--
 		  IMHO adding this makes the tightly-packed menu less legible for
 		  little benefit (JT)
 	    <xsl:number level="multiple" count="faq|part" format="1.1. "/>
 		-->
-        <xsl:apply-templates select="question" mode="index"/>
-      </link>
-    </li>
+      <xsl:apply-templates select="question" mode="index"/></link></li>
   </xsl:template>
-
   <xsl:template match="part">
     <xsl:variable name="id">
       <xsl:call-template name="generate-id"/>
     </xsl:variable>
     <section id="{$id}">
-      <title>
-        <xsl:number level="multiple" count="faq|part" format="1.1. "/>
-        <xsl:value-of select="title"/>
-      </title>
+      <title><xsl:number level="multiple" count="faq|part" format="1.1. "/>
+        <xsl:value-of select="title"/></title>
       <xsl:apply-templates select="faq|part"/>
     </section>
   </xsl:template>
-
   <xsl:template match="faq">
     <xsl:variable name="id">
       <xsl:call-template name="generate-id"/>
     </xsl:variable>
-
     <section id="{$id}">
-      <title>
-        <xsl:number level="multiple" count="faq|part" format="1.1. "/>
-        <xsl:apply-templates select="question"/>
-      </title>
+      <title><xsl:number level="multiple" count="faq|part" format="1.1. "/>
+        <xsl:apply-templates select="question"/></title>
       <xsl:apply-templates select="answer"/>
     </section>
   </xsl:template>
-
   <xsl:template name="generate-id">
     <xsl:choose>
       <xsl:when test="@id">
@@ -102,30 +86,25 @@
       <xsl:otherwise>
         <xsl:value-of select="concat(concat(local-name(.), '-'), generate-id(.))"/>
       </xsl:otherwise>
-  </xsl:choose>
+    </xsl:choose>
   </xsl:template>
-
   <xsl:template match="question" mode="index">
     <xsl:apply-templates select="node()[not(local-name()='elaboration')]"/>
   </xsl:template>
-
   <xsl:template match="question">
     <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="answer">
-    <xsl:if test="count(p)>0"> 
+    <xsl:if test="count(p)>0">
       <xsl:apply-templates/>
     </xsl:if>
-    <xsl:if test="count(p)=0"> 
+    <xsl:if test="count(p)=0">
       <p>
         <xsl:apply-templates/>
       </p>
     </xsl:if>
   </xsl:template>
-
   <xsl:template match="title">
     <xsl:apply-templates/>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/faqv10-to-faqv11.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/faqv10-to-faqv11.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/faqv10-to-faqv11.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/faqv10-to-faqv11.xsl Mon Apr  9 19:07:17 2007
@@ -16,28 +16,23 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:preserve-space elements="*" />
-  <!-- faq-v10.dtd to faq-v11.dtd transformation -->
-  
+  <xsl:preserve-space elements="*" />
+<!-- faq-v10.dtd to faq-v11.dtd transformation -->
   <xsl:template match="/">
-        <xsl:apply-templates/>
+    <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="link/@idref">
     <xsl:message terminate="no">The link element has no idref attribute defined in the document-v11.dtd, please fix your document.</xsl:message>
     [[link/@idref: <xsl:value-of select="."/> ]]
   </xsl:template>
-
   <xsl:template match="link/@type | link/@actuate | link/@show |
                        jump/@type | jump/@actuate | jump/@show |
                        fork/@type | fork/@actuate | fork/@show"/>
-
-  <!-- the obligatory copy-everything -->
+<!-- the obligatory copy-everything -->
   <xsl:template match="node() | @*">
     <xsl:copy>
       <xsl:apply-templates select="@*"/>
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv12.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv12.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv12.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv12.xsl Mon Apr  9 19:07:17 2007
@@ -17,12 +17,10 @@
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:preserve-space elements="*" />
-  <!-- faq-v20x.dtd to faq-v12.dtd transformation -->
-
+<!-- faq-v20x.dtd to faq-v12.dtd transformation -->
   <xsl:template match="/">
     <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="faqs">
     <faqs>
       <xsl:attribute name="title">
@@ -31,29 +29,21 @@
       <xsl:apply-templates/>
     </faqs>
   </xsl:template>
-
   <xsl:template match="faqs/title"/>
-
   <xsl:template match="faqsection">
     <part>
       <xsl:apply-templates select="node()|@*"/>
     </part>
   </xsl:template>
-
-  <xsl:template match="a">
-    <link>
-      <xsl:apply-templates select="@*"/>
-      <xsl:apply-templates select="node()"/>
-    </link>
+  <xsl:template match="a"><link>
+    <xsl:apply-templates select="@*"/>
+    <xsl:apply-templates select="node()"/></link>
   </xsl:template>
-
-
-  <!-- the obligatory copy-everything -->
+<!-- the obligatory copy-everything -->
   <xsl:template match="node() | @*">
     <xsl:copy>
       <xsl:apply-templates select="@*"/>
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv13.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv13.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv13.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/faqv20-to-faqv13.xsl Mon Apr  9 19:07:17 2007
@@ -17,12 +17,10 @@
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:preserve-space elements="*" />
-  <!-- faq-v20x.dtd to faq-v13.dtd transformation -->
-
+<!-- faq-v20x.dtd to faq-v13.dtd transformation -->
   <xsl:template match="/">
     <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="faqs">
     <faqs>
       <xsl:attribute name="title">
@@ -31,29 +29,21 @@
       <xsl:apply-templates/>
     </faqs>
   </xsl:template>
-
   <xsl:template match="faqs/title"/>
-
   <xsl:template match="faqsection">
     <part>
       <xsl:apply-templates select="node()|@*"/>
     </part>
   </xsl:template>
-
-  <xsl:template match="a">
-    <link>
-      <xsl:apply-templates select="@*"/>
-      <xsl:apply-templates select="node()"/>
-    </link>
+  <xsl:template match="a"><link>
+    <xsl:apply-templates select="@*"/>
+    <xsl:apply-templates select="node()"/></link>
   </xsl:template>
-
-
-  <!-- the obligatory copy-everything -->
+<!-- the obligatory copy-everything -->
   <xsl:template match="node() | @*">
     <xsl:copy>
       <xsl:apply-templates select="@*"/>
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/generateId.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/generateId.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/generateId.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/generateId.xsl Mon Apr  9 19:07:17 2007
@@ -20,7 +20,7 @@
 imported document-to-html.xsl for details.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <!-- Template that generates an id -->
+<!-- Template that generates an id -->
   <xsl:include href="lm://transform.xml.replaceCharsInString"/>
   <xsl:template name="generate-id">
     <xsl:choose>

Modified: forrest/trunk/main/webapp/resources/stylesheets/howto-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/howto-to-document.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/howto-to-document.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/howto-to-document.xsl Mon Apr  9 19:07:17 2007
@@ -15,14 +15,11 @@
   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:import href="copyover.xsl"/>
-
-  <!-- Processing a raw howto without revisions -->
+  <xsl:import href="copyover.xsl"/>
+<!-- Processing a raw howto without revisions -->
   <xsl:template match="/howto">
     <document>
       <xsl:copy-of select="header"/>
@@ -31,34 +28,30 @@
       </body>
     </document>
   </xsl:template>
-
-  <!-- Processing a howto combined with revisions -->
+<!-- Processing a howto combined with revisions -->
   <xsl:template match="/all">
-   <document>
-    <xsl:copy-of select="howto/header"/>
-     <body>
+    <document>
+      <xsl:copy-of select="howto/header"/>
+      <body>
         <xsl:apply-templates select="howto"/>
         <xsl:apply-templates select="revisions"/>
-     </body>
-   </document>
+      </body>
+    </document>
   </xsl:template>
-  
   <xsl:template match="howto">
     <xsl:if test="normalize-space(header/abstract)!=''">
       <xsl:apply-templates select="header/abstract"/>
     </xsl:if>
-     <xsl:apply-templates select="*[not(name()='header')]"/>
+    <xsl:apply-templates select="*[not(name()='header')]"/>
   </xsl:template>
-  
   <xsl:template match="howto/header/abstract">
     <section id="Overview">
-     <title>Overview</title>
-     <p>
-      <xsl:apply-templates/>
-     </p>
+      <title>Overview</title>
+      <p>
+        <xsl:apply-templates/>
+      </p>
     </section>
   </xsl:template>
-  
   <xsl:template match="purpose | prerequisites | audience | steps | extension | tips | references | feedback">
     <xsl:variable name="title">
       <xsl:choose>
@@ -70,14 +63,12 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-
     <section id="{$title}">
-        <title><xsl:value-of select="$title"/></title>
-     <xsl:apply-templates/>
+      <title><xsl:value-of select="$title"/></title>
+      <xsl:apply-templates/>
     </section>
   </xsl:template>
-
-  <!-- new faqs format - mostly borrowed from other sections -->
+<!-- new faqs format - mostly borrowed from other sections -->
   <xsl:template match="faqs">
     <xsl:variable name="title">
       <xsl:choose>
@@ -92,76 +83,68 @@
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-
     <section id="{$title}">
       <title><xsl:value-of select="$title"/></title>
       <xsl:apply-templates select="faq"/>
       <xsl:apply-templates select="faqsection | part"/>
     </section>
   </xsl:template>
-
-  <!-- an actual faq is composed of a question and answer -->
+<!-- an actual faq is composed of a question and answer -->
   <xsl:template match="faq">
     <section>
       <xsl:apply-templates select="question"/>
       <xsl:apply-templates select="answer"/>
     </section>
   </xsl:template>
-
-  <!-- numbering a faqsection and adding to the title
+<!-- numbering a faqsection and adding to the title
     FIXME: maybe an ID should be written out -->
   <xsl:template match="faqsection | part">
     <section>
-      <title>
-        <xsl:number count="faqsection | part" level="multiple" format="1.1.1 "/>
-        <xsl:value-of select="normalize-space(title)"/>
-      </title>
+      <title><xsl:number count="faqsection | part" level="multiple" format="1.1.1 "/>
+        <xsl:value-of select="normalize-space(title)"/></title>
       <xsl:apply-templates select="faq"/>
       <xsl:apply-templates select="faqsection | part"/>
     </section>
   </xsl:template>
-
-  <!-- numbering the question
+<!-- numbering the question
     FIXME: maybe an ID of questnnn should be written out -->
   <xsl:template match="question">
-    <title>
-      <xsl:number count="faqsection | part" level="multiple" format="1.1.1."/>
+    <title><xsl:number count="faqsection | part" level="multiple" format="1.1.1."/>
       <xsl:number count="faq" level="single" format="1 "/>
-      <xsl:value-of select="normalize-space(.)"/>
-    </title>
+      <xsl:value-of select="normalize-space(.)"/></title>
     <xsl:apply-templates select="answer"/>
   </xsl:template>
-  
-  <!-- borrowed from the current faqs stylesheet -->
+<!-- borrowed from the current faqs stylesheet -->
   <xsl:template match="answer">
-    <xsl:if test="count(p)>0"> 
+    <xsl:if test="count(p)>0">
       <xsl:apply-templates/>
     </xsl:if>
-    <xsl:if test="count(p)=0"> 
+    <xsl:if test="count(p)=0">
       <p>
         <xsl:apply-templates/>
       </p>
     </xsl:if>
   </xsl:template>
-  
   <xsl:template match="revisions">
     <section id="revisions">
-     <title>Revisions</title>
-    <p>
-      Find a problem with this document? Consider contacting the mailing lists or
-      submitting your own revision. For instructions, read the How To Submit a Revision.
-    </p>
+      <title>Revisions</title>
+      <p>
+        Find a problem with this document? Consider contacting the mailing lists
+        or submitting your own revision. For instructions, read the How To
+        Submit a Revision.
+      </p>
       <xsl:if test="revision">
         <ul>
-         <xsl:apply-templates select="revision"/>
+          <xsl:apply-templates select="revision"/>
         </ul>
       </xsl:if>
     </section>
   </xsl:template>
-  
   <xsl:template match="revision">
-  <xsl:variable name="href"><xsl:value-of select="concat(substring-before(@name,'.xml'),'.html')" /></xsl:variable>
-   <li>Revision, <link href="{ $href}"><xsl:value-of select="@date"/></link></li>
+    <xsl:variable name="href">
+      <xsl:value-of select="concat(substring-before(@name,'.xml'),'.html')" />
+    </xsl:variable>
+    <li>Revision, <link href="{ $href}">
+      <xsl:value-of select="@date"/></link></li>
   </xsl:template>
-  
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/html-to-document.xsl Mon Apr  9 19:07:17 2007
@@ -15,311 +15,274 @@
   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:key name="h2s" match="h2" use="generate-id(preceding-sibling::h1[1])"/>
-    <xsl:key name="h3s" match="h3" use="generate-id(preceding-sibling::h2[1])"/>
-    <xsl:key name="h4s" match="h4" use="generate-id(preceding-sibling::h3[1])"/>
-    <xsl:key name="h5s" match="h5" use="generate-id(preceding-sibling::h4[1])"/>
-    <xsl:key name="h6s" match="h6" use="generate-id(preceding-sibling::h5[1])"/>
-
-    <xsl:template match="/">
-     <xsl:choose>
-   	   <xsl:when test="name(child::node())='html'">
-         <xsl:apply-templates/>
-	   </xsl:when>
-	     
-	   <xsl:otherwise>
-	     <document>
-	      <header><title>Error in conversion</title></header>
-	      <body>
-	       <warning>This file is not in a html format, please convert manually.</warning>
-	      </body>
-	     </document>
-	   </xsl:otherwise>
-     </xsl:choose>
-    </xsl:template>
-           
-    <xsl:template match="html">
+  <xsl:key name="h2s" match="h2" use="generate-id(preceding-sibling::h1[1])"/>
+  <xsl:key name="h3s" match="h3" use="generate-id(preceding-sibling::h2[1])"/>
+  <xsl:key name="h4s" match="h4" use="generate-id(preceding-sibling::h3[1])"/>
+  <xsl:key name="h5s" match="h5" use="generate-id(preceding-sibling::h4[1])"/>
+  <xsl:key name="h6s" match="h6" use="generate-id(preceding-sibling::h5[1])"/>
+  <xsl:template match="/">
+    <xsl:choose>
+      <xsl:when test="name(child::node())='html'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
         <document>
-            <xsl:apply-templates/>
+          <header>
+            <title>Error in conversion</title>
+          </header>
+          <body>
+            <warning>
+              This file is not in a html format, please convert manually.
+            </warning>
+          </body>
         </document>
-    </xsl:template>
-
-    <xsl:template match="head">
-        <header>
-            <xsl:apply-templates/>
-        </header>
-    </xsl:template>
-        
-    <xsl:template match="meta">
-        <xsl:text disable-output-escaping = "yes"><![CDATA[ <!-- ]]></xsl:text>
-          <xsl:copy>
-              <xsl:apply-templates select="node()|@*"/>
-          </xsl:copy>
-        <xsl:text disable-output-escaping = "yes"><![CDATA[ --> ]]></xsl:text>
-    </xsl:template>  
-    
-    <!--infer structure from sibling headings-->
-    <xsl:template match="body">
-       <body>
-        <xsl:choose>
-          <xsl:when test="h1">
-            <!-- some paragraphs may be included before the first title... -->
-            <xsl:if test="name(*[1]) != 'h1'">
-              <xsl:apply-templates select="*[1]" mode="next"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="html">
+    <document>
+      <xsl:apply-templates/>
+    </document>
+  </xsl:template>
+  <xsl:template match="head">
+    <header>
+      <xsl:apply-templates/>
+    </header>
+  </xsl:template>
+  <xsl:template match="meta">
+<xsl:text disable-output-escaping = "yes"><![CDATA[ <!-- ]]></xsl:text>
+    <xsl:copy>
+      <xsl:apply-templates select="node()|@*"/>
+    </xsl:copy>
+<xsl:text disable-output-escaping = "yes"><![CDATA[ --> ]]></xsl:text>
+  </xsl:template>
+<!--infer structure from sibling headings-->
+  <xsl:template match="body">
+    <body>
+      <xsl:choose>
+        <xsl:when test="h1">
+<!-- some paragraphs may be included before the first title... -->
+          <xsl:if test="name(*[1]) != 'h1'">
+            <xsl:apply-templates select="*[1]" mode="next"/>
+          </xsl:if>
+          <xsl:call-template name="process_h1"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <section>
+            <xsl:if test="a/@name">
+              <xsl:attribute name="id">
+                <xsl:value-of select="a/@name"/>
+              </xsl:attribute>
             </xsl:if>
+            <title/>
+            <xsl:apply-templates/>
             <xsl:call-template name="process_h1"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <section>
-              <xsl:if test="a/@name">
-                <xsl:attribute name="id"><xsl:value-of select="a/@name"/></xsl:attribute>
-              </xsl:if>
-              <title/>
-              <xsl:apply-templates/>
-              <xsl:call-template name="process_h1"/>
-            </section>
-          </xsl:otherwise>
-        </xsl:choose>
-      </body>
-    </xsl:template>
-    
-    <xsl:template name="process_h1">
-       <xsl:for-each select="h1">
-         <section>
-           <xsl:if test="a/@name">
-             <xsl:attribute name="id"><xsl:value-of select="a/@name"/></xsl:attribute>
-           </xsl:if>
-           <title><xsl:apply-templates/></title>
-           <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
-           <xsl:for-each select="key('h2s',generate-id(.))">
-             <section>
-               <title><xsl:apply-templates/></title>
-               <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
-               <xsl:for-each select="key('h3s',generate-id(.))">
-                 <section>
-                   <title><xsl:apply-templates/></title>
-                   <xsl:apply-templates select="following-sibling::*[1]"
+          </section>
+        </xsl:otherwise>
+      </xsl:choose>
+    </body>
+  </xsl:template>
+  <xsl:template name="process_h1">
+    <xsl:for-each select="h1">
+      <section>
+        <xsl:if test="a/@name">
+          <xsl:attribute name="id">
+            <xsl:value-of select="a/@name"/>
+          </xsl:attribute>
+        </xsl:if>
+        <title><xsl:apply-templates/></title>
+        <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
+        <xsl:for-each select="key('h2s',generate-id(.))">
+          <section>
+            <title><xsl:apply-templates/></title>
+            <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
+            <xsl:for-each select="key('h3s',generate-id(.))">
+              <section>
+                <title><xsl:apply-templates/></title>
+                <xsl:apply-templates select="following-sibling::*[1]"
                                         mode="next"/>
-                   <xsl:for-each select="key('h4s',generate-id(.))">
-                     <section>
-                       <title><xsl:apply-templates/></title>
-                       <xsl:apply-templates select="following-sibling::*[1]"
+                <xsl:for-each select="key('h4s',generate-id(.))">
+                  <section>
+                    <title><xsl:apply-templates/></title>
+                    <xsl:apply-templates select="following-sibling::*[1]"
                                             mode="next"/>
-                       <xsl:for-each select="key('h5s',generate-id(.))">
-                         <section>
-                           <title><xsl:apply-templates/></title>
-                           <xsl:apply-templates select="following-sibling::*[1]"
+                    <xsl:for-each select="key('h5s',generate-id(.))">
+                      <section>
+                        <title><xsl:apply-templates/></title>
+                        <xsl:apply-templates select="following-sibling::*[1]"
                                                 mode="next"/>
-                           <xsl:for-each select="key('h6s',generate-id(.))">
-                             <section>
-                               <title><xsl:apply-templates/></title>
+                        <xsl:for-each select="key('h6s',generate-id(.))">
+                          <section>
+                            <title><xsl:apply-templates/></title>
                             <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
-                             </section>
-                           </xsl:for-each>
-                         </section>
-                       </xsl:for-each>
-                     </section>
-                   </xsl:for-each>
-                 </section>
-               </xsl:for-each>
-             </section>
-           </xsl:for-each>
-         </section>
-       </xsl:for-each>
-    </xsl:template>
-    
-    <!--process each sibling in order until the next heading level-->
-
-    <xsl:template match="*" mode="next">
-       <xsl:if test="not( translate( local-name(.),'123456','' ) = 'h' )">
-         <xsl:apply-templates select="."/>
-         <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
-       </xsl:if>
-    </xsl:template>
-      
-    <xsl:template match="P|p">
+                          </section>
+                        </xsl:for-each>
+                      </section>
+                    </xsl:for-each>
+                  </section>
+                </xsl:for-each>
+              </section>
+            </xsl:for-each>
+          </section>
+        </xsl:for-each>
+      </section>
+    </xsl:for-each>
+  </xsl:template>
+<!--process each sibling in order until the next heading level-->
+  <xsl:template match="*" mode="next">
+    <xsl:if test="not( translate( local-name(.),'123456','' ) = 'h' )">
+      <xsl:apply-templates select="."/>
+      <xsl:apply-templates select="following-sibling::*[1]" mode="next"/>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="P|p">
+    <p>
+      <xsl:if test="@class">
+        <xsl:attribute name="class">
+          <xsl:value-of select="@class"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+  <xsl:template match="img">
+    <xsl:choose>
+      <xsl:when test="name(..)='section'">
+        <figure alt="{@alt}" src= "{@src}"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <img alt="{@alt}" src= "{@src}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="blockquote">
+    <xsl:choose>
+      <xsl:when test="name(..)='p'"><code>
+        <xsl:value-of select="." /></code>
+      </xsl:when>
+      <xsl:otherwise>
+        <source>
+          <xsl:value-of select="." />
+        </source>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- convert a to link -->
+  <xsl:template match="a"><link>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/></link>
+  </xsl:template>
+  <xsl:template match="@valign | @align"/>
+  <xsl:template match="center">
+    <xsl:choose>
+      <xsl:when test="name(..)='p'">
+        <xsl:apply-templates/>
+      </xsl:when>
+      <xsl:otherwise>
         <p>
-          <xsl:if test="@class">
-            <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute> 
-          </xsl:if>
           <xsl:apply-templates/>
         </p>
-    </xsl:template>
-    
-    <xsl:template match="img">
-       <xsl:choose>
-    	<xsl:when test="name(..)='section'">
-          <figure alt="{@alt}" src= "{@src}"/>
-    	</xsl:when>
-    	<xsl:otherwise>
-          <img alt="{@alt}" src= "{@src}"/>
-    	</xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-    
-    <xsl:template match="blockquote">
-      <xsl:choose>
-    	<xsl:when test="name(..)='p'">
-    	  <code>
-    	    <xsl:value-of select="." />
-    	  </code> 
-    	</xsl:when>
-      
-    	<xsl:otherwise>
-    	  <source>
-    	    <xsl:value-of select="." />
-    	  </source> 
-    	</xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-
-    <!-- convert a to link -->
-    <xsl:template match="a">
-      <link>
-        <xsl:copy-of select="@*"/>
-        <xsl:apply-templates/>
-      </link>
-    </xsl:template>
-
-    <xsl:template match="@valign | @align"/>
-        
-    <xsl:template match="center">
-      <xsl:choose>
-    	<xsl:when test="name(..)='p'">
-    	    <xsl:apply-templates/>
-    	</xsl:when>
-      
-    	<xsl:otherwise>
-    	  <p>
-    	    <xsl:apply-templates/>
-    	  </p> 
-    	</xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-
-    <xsl:template match="ol">
-      <xsl:choose>
-    	<xsl:when test="name(..)='p'">
-    	   <xsl:text disable-output-escaping="yes"><![CDATA[</p>]]></xsl:text>
-    	    <ol>
-    	     <xsl:apply-templates/>
-    	    </ol>
-    	   <xsl:text disable-output-escaping="yes"><![CDATA[<p>]]></xsl:text>
-    	</xsl:when>
-      	<xsl:otherwise>
-    	    <ol>
-    	     <xsl:apply-templates/>
-    	    </ol>
-    	</xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-    
-    <xsl:template match="ul">
-      <xsl:choose>
-    	<xsl:when test="name(..)='p'">
-    	   <xsl:text disable-output-escaping="yes"><![CDATA[</p>]]></xsl:text>
-    	    <ul>
-    	     <xsl:apply-templates/>
-    	    </ul>
-    	   <xsl:text disable-output-escaping="yes"><![CDATA[<p>]]></xsl:text>
-    	</xsl:when>
-      	<xsl:otherwise>
-    	    <ul>
-    	     <xsl:apply-templates/>
-    	    </ul>
-    	</xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-        
-    <xsl:template match="b">
-      <strong>
-        <xsl:value-of select = "."/>
-      </strong>
-    </xsl:template>
-    
-    <xsl:template match="i">
-      <em>
-        <xsl:value-of select = "."/>
-      </em>
-    </xsl:template>
-
-    <xsl:template match="u">
-      <u>
-        <xsl:value-of select = "."/>
-      </u>
-    </xsl:template>
-    
-    <xsl:template match="table">
-      <xsl:copy>
-        <xsl:copy-of select="@*"/>
-        <xsl:apply-templates/>
-      </xsl:copy>    
-    </xsl:template>
-    
-            
-    <xsl:template match="br">
-      <xsl:choose>
-	    <xsl:when test="normalize-space(text())">
-	    	    
-		  <xsl:choose>
-		    <xsl:when test="name(..)='p'">
-		        <xsl:apply-templates/>
-		      <br/> 
-		    </xsl:when>
-	  	    <xsl:otherwise>
-		      <p>
-	            <xsl:apply-templates/>
-		      </p>
-		    </xsl:otherwise>
-	       </xsl:choose>
-	      
-	    </xsl:when>
-  	    <xsl:otherwise>
-	      <br/>
-	    </xsl:otherwise>
-       </xsl:choose>
-    </xsl:template>
-    
-    <!-- Strip -->
-    <xsl:template match="font|big">
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="ol">
+    <xsl:choose>
+      <xsl:when test="name(..)='p'">
+<xsl:text disable-output-escaping="yes"><![CDATA[</p>]]></xsl:text>
+        <ol>
+          <xsl:apply-templates/>
+        </ol>
+<xsl:text disable-output-escaping="yes"><![CDATA[<p>]]></xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <ol>
+          <xsl:apply-templates/>
+        </ol>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="ul">
+    <xsl:choose>
+      <xsl:when test="name(..)='p'">
+<xsl:text disable-output-escaping="yes"><![CDATA[</p>]]></xsl:text>
+        <ul>
+          <xsl:apply-templates/>
+        </ul>
+<xsl:text disable-output-escaping="yes"><![CDATA[<p>]]></xsl:text>
+      </xsl:when>
+      <xsl:otherwise>
+        <ul>
+          <xsl:apply-templates/>
+        </ul>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="b"><strong>
+    <xsl:value-of select = "."/></strong>
+  </xsl:template>
+  <xsl:template match="i"><em>
+    <xsl:value-of select = "."/></em>
+  </xsl:template>
+  <xsl:template match="u">
+    <u>
+      <xsl:value-of select = "."/>
+    </u>
+  </xsl:template>
+  <xsl:template match="table">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
       <xsl:apply-templates/>
-    </xsl:template>
-
-
-    <xsl:template match="span">
-		  <xsl:choose>
-		    <xsl:when test="contains(@style,'bold')">
-		       <strong>
-		        <xsl:apply-templates/>
-		       </strong>
-		    </xsl:when>
-		    <xsl:when test="contains(@style,'italic')">
-		       <em>
-		        <xsl:apply-templates/>
-		       </em>
-		    </xsl:when>
-		    <xsl:when test="contains(@style,'underline')">
-		       <u>
-		        <xsl:apply-templates/>
-		       </u>
-		    </xsl:when>
-	  	    <xsl:otherwise>
-	  	        <!-- Strip -->
-	            <xsl:apply-templates/>
-		    </xsl:otherwise>
-	    </xsl:choose>
-    </xsl:template>
-
-    <xsl:template match="@*|*|text()|processing-instruction()|comment()">
-      <xsl:copy>
-        <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
-      </xsl:copy>
-    </xsl:template>
-
-
+    </xsl:copy>
+  </xsl:template>
+  <xsl:template match="br">
+    <xsl:choose>
+      <xsl:when test="normalize-space(text())">
+        <xsl:choose>
+          <xsl:when test="name(..)='p'">
+            <xsl:apply-templates/>
+            <br/>
+          </xsl:when>
+          <xsl:otherwise>
+            <p>
+              <xsl:apply-templates/>
+            </p>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+      <xsl:otherwise>
+        <br/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+<!-- Strip -->
+  <xsl:template match="font|big">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="span">
+    <xsl:choose>
+      <xsl:when test="contains(@style,'bold')"><strong>
+        <xsl:apply-templates/></strong>
+      </xsl:when>
+      <xsl:when test="contains(@style,'italic')"><em>
+        <xsl:apply-templates/></em>
+      </xsl:when>
+      <xsl:when test="contains(@style,'underline')">
+        <u>
+          <xsl:apply-templates/>
+        </u>
+      </xsl:when>
+      <xsl:otherwise>
+<!-- Strip -->
+        <xsl:apply-templates/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/html-to-htmlbody.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/html-to-htmlbody.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/html-to-htmlbody.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/html-to-htmlbody.xsl Mon Apr  9 19:07:17 2007
@@ -20,21 +20,16 @@
 class="content">, making raw HTML suitable for merging with the Forrest tabs
 and menu.
 -->
-
 <xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   version="1.0">
-
   <xsl:import href="copyover.xsl"/>
   <xsl:template match="/*[local-name()='html']">
-	  <xsl:apply-templates select="*[local-name()='body']"/>
+    <xsl:apply-templates select="*[local-name()='body']"/>
   </xsl:template>
-
   <xsl:template match="/*[local-name()='html']/*[local-name()='body']">
     <div class="content">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
-
 </xsl:stylesheet>
-

Modified: forrest/trunk/main/webapp/resources/stylesheets/linkmap-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/linkmap-to-document.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/linkmap-to-document.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/linkmap-to-document.xsl Mon Apr  9 19:07:17 2007
@@ -16,58 +16,51 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-   <xsl:output method="xml" 
+  <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 Table of Contents</title>
-       </header>
-       <body>
-         <p>This is a map of the complete site and its structure.</p>
-
+  <xsl:template match="/">
+    <document>
+      <header>
+        <title>Site Linkmap Table of Contents</title>
+      </header>
+      <body>
+        <p>
+          This is a map of the complete site and its structure.
+        </p>
 <!-- FIXME: FOR-731 workaround for a side-effect of the workaround for FOR-675
          <xsl:apply-templates select="*[not(self::site)]" />        
 -->
-         <xsl:apply-templates select="*" />        
-       </body>
-     </document>       
-   </xsl:template>     
-
-     <xsl:template match="*">
-        <xsl:if test="@label">
+        <xsl:apply-templates select="*" />
+      </body>
+    </document>
+  </xsl:template>
+  <xsl:template match="*">
+    <xsl:if test="@label">
+      <ul>
+        <li><a>
+          <xsl:if test="@href!=''">
+            <xsl:attribute name="href">
+              <xsl:value-of select="@href"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:value-of select="@label"/>
+<!-- force site element name to be on same line as label --></a>&#160;&#160;___________________&#160;&#160;<em>
+          <xsl:value-of select="name(.)" /></em>
+          <xsl:if test="@description">
+<!-- allow description to flow to next line in a small window -->
+<xsl:text>&#160;: </xsl:text>
+            <xsl:value-of select="normalize-space(@description)"/>
+          </xsl:if></li>
+        <xsl:if test="*">
           <ul>
-            <li>
-              <a>
-                <xsl:if test="@href!=''">
-                  <xsl:attribute name="href">
-                    <xsl:value-of select="@href"/>
-                  </xsl:attribute>
-                </xsl:if>
-                <xsl:value-of select="@label"/>
-              <!-- force site element name to be on same line as label -->
-              </a>&#160;&#160;___________________&#160;&#160;<em><xsl:value-of select="name(.)" /></em>
-              <xsl:if test="@description">
-                <!-- allow description to flow to next line in a small window -->
-                <xsl:text>&#160;: </xsl:text>
-                <xsl:value-of select="normalize-space(@description)"/>
-              </xsl:if>
-            </li>
-
-            <xsl:if test="*">
-              <ul> 
-                <xsl:apply-templates/>        
-              </ul>
-            </xsl:if>
+            <xsl:apply-templates/>
           </ul>
         </xsl:if>
-            
-     </xsl:template>
-
+      </ul>
+    </xsl:if>
+  </xsl:template>
 </xsl:stylesheet>
-

Modified: forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/lucene-search-to-xdoc.xsl Mon Apr  9 19:07:17 2007
@@ -21,40 +21,34 @@
   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 -->
+<!-- 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
+<!-- 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
+<!-- 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. -->
+<!-- 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 -->
+<!-- FIXME: i18n stuff here -->
         <title>Search Results</title>
       </header>
       <body>
         <xsl:if test="not(search:hits)">
           <note>
-            <xsl:text>Your search for </xsl:text>
+<xsl:text>Your search for </xsl:text>
             <code>
-              <xsl:value-of select="@query-string"/>
+            <xsl:value-of select="@query-string"/>
             </code>
-            <xsl:text> returned no results. Check that you spelled your
+<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>
@@ -62,35 +56,31 @@
         <xsl:apply-templates/>
       </body>
     </document>
-    
   </xsl:template>
-  
   <xsl:template match="search:hits">
     <xsl:apply-templates/>
   </xsl:template>
-
-  <!-- Displays the search hit as a paragraph. -->
+<!-- Displays the search hit as a paragraph. -->
   <xsl:template match="search:hit">
     <p>
-      <!-- FIXME: Score should be displayed in some graphical manner
+<!-- 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>
+<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
+<!-- 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>
@@ -106,90 +96,76 @@
       </xsl:choose>
       -->
     </xsl:variable>
-
     <xsl:variable name="linktext">
       <xsl:choose>
-        <!-- If a field for the document title exists, use its
+<!-- 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 -->
+<!-- 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>
+<!-- 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
+<!-- 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:text> (</xsl:text>
     <xsl:apply-templates/>
-    <xsl:text>) </xsl:text>
+<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>
+<!-- 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 -->
+<!-- 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
+<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
+<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:text> to </xsl:text>
             <xsl:value-of select="$endindex + 1"/>
           </xsl:otherwise>
         </xsl:choose>
-        <xsl:text> of </xsl:text>
+<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: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: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 -->
+<!-- Display "next page" link, if appropriate -->
         <xsl:if test="@has-next = 'true'">
-          <xsl:text>&#160;</xsl:text>
+<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"/>
@@ -198,32 +174,27 @@
       </xsl:if>
     </footer>
   </xsl:template>
-
-  <!-- Convenience template, constructs a link to jump to a specific
+<!-- 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: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>

Modified: forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/lucene-update-to-xdoc.xsl Mon Apr  9 19:07:17 2007
@@ -21,11 +21,9 @@
   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>
@@ -33,25 +31,25 @@
       </header>
       <body>
         <p>
-          <xsl:text>Lucene has created an index in a directory named </xsl:text>
+<xsl:text>Lucene has created an index in a directory named </xsl:text>
           <code>
-            <xsl:value-of select="@directory"/>
+          <xsl:value-of select="@directory"/>
           </code>
-          <xsl:text> below your servlet container's context
+<xsl:text> below your servlet container's context
           root. </xsl:text>
-          <xsl:text>It used the analyzer class </xsl:text>
+<xsl:text>It used the analyzer class </xsl:text>
           <code>
-            <xsl:value-of select="@analyzer"/>
+          <xsl:value-of select="@analyzer"/>
           </code>
-          <xsl:text> for this purpose.</xsl:text>
+<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
+<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>
+<xsl:text>, just in case you're interested.</xsl:text>
         </p>
         <section>
           <title>Index creation time breakdown</title>
@@ -60,19 +58,18 @@
       </body>
     </document>
   </xsl:template>
-
   <xsl:template match="lucene:document">
     <p>
-      <xsl:text>The document </xsl:text>
+<xsl:text>The document </xsl:text>
       <strong>
-        <xsl:value-of select="@url"/>
+      <xsl:value-of select="@url"/>
       </strong>
-      <xsl:text> was indexed in </xsl:text>
+<xsl:text> was indexed in </xsl:text>
       <strong>
-        <xsl:value-of select="@elapsed-time"/>
-        <xsl:text>ms</xsl:text>
+      <xsl:value-of select="@elapsed-time"/>
+<xsl:text>ms</xsl:text>
       </strong>
-      <xsl:text>.</xsl:text>
+<xsl:text>.</xsl:text>
     </p>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/normalizehrefs.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/normalizehrefs.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/normalizehrefs.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/normalizehrefs.xsl Mon Apr  9 19:07:17 2007
@@ -19,18 +19,15 @@
 Stylesheet to normalize the paths of href attributes, e.g.
 href="somedir/../someotherdir/index.html" ==> href="someotherdir/index.html"
 -->
-
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
-
   <xsl:include href="../../skins/common/xslt/html/pathutils.xsl" />
   <xsl:include href="copyover.xsl" />
-  
   <xsl:template match="@href">
     <xsl:if test="normalize-space(.)!=''">
       <xsl:attribute name="href">
-      <xsl:call-template name="normalize">
-        <xsl:with-param name="path" select="."/>
-      </xsl:call-template>
+        <xsl:call-template name="normalize">
+          <xsl:with-param name="path" select="."/>
+        </xsl:call-template>
       </xsl:attribute>
     </xsl:if>
   </xsl:template>

Modified: forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/page-to-html.xsl Mon Apr  9 19:07:17 2007
@@ -15,143 +15,134 @@
   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: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: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.
+      <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>
-   </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; 
+  </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>
- 
+      <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>
-
+    <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>

Modified: forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl Mon Apr  9 19:07:17 2007
@@ -27,56 +27,51 @@
 filename-noext: return the file part of a path without its last extension
 
 -->
-
 <!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
 Examples:
 '' -> ''
 'foo/index.html' -> 'foo/'
 -->
-<xsl:template name="dirname">
-  <xsl:param name="path" />
-  <xsl:if test="contains($path, '/')">
-    <xsl:value-of select="concat(substring-before($path, '/'), '/')" />
-    <xsl:call-template name="dirname">
-      <xsl:with-param name="path"
-        select="substring-after($path, '/')" />
-    </xsl:call-template>
-  </xsl:if>
-</xsl:template>
-
-<!-- Normalized (..'s eliminated) version of 'dirname' -->
-<xsl:template name="dirname-nz">
-  <xsl:param name="path" />
-  <xsl:call-template name="normalize">
-    <xsl:with-param name="path">
+  <xsl:template name="dirname">
+    <xsl:param name="path" />
+    <xsl:if test="contains($path, '/')">
+      <xsl:value-of select="concat(substring-before($path, '/'), '/')" />
       <xsl:call-template name="dirname">
-        <xsl:with-param name="path" select="$path" />
+        <xsl:with-param name="path"
+        select="substring-after($path, '/')" />
       </xsl:call-template>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
-
+    </xsl:if>
+  </xsl:template>
+<!-- Normalized (..'s eliminated) version of 'dirname' -->
+  <xsl:template name="dirname-nz">
+    <xsl:param name="path" />
+    <xsl:call-template name="normalize">
+      <xsl:with-param name="path">
+        <xsl:call-template name="dirname">
+          <xsl:with-param name="path" select="$path" />
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
 <!-- Returns the filename part of a path.  Equivalent to Unix 'basename'
 Examples:
 'index.html'  ->  'index.html' 
 'foo/bar/'  ->  '' 
 'foo/bar/index.html'  ->  'index.html' 
 -->
-<xsl:template name="filename">
-  <xsl:param name="path"/>
-  <xsl:choose>
-    <xsl:when test="contains($path, '/')">
-      <xsl:call-template name="filename">
-        <xsl:with-param name="path" select="substring-after($path, '/')"/>
-      </xsl:call-template>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="$path"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
+  <xsl:template name="filename">
+    <xsl:param name="path"/>
+    <xsl:choose>
+      <xsl:when test="contains($path, '/')">
+        <xsl:call-template name="filename">
+          <xsl:with-param name="path" select="substring-after($path, '/')"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$path"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
 <!-- Returns the last extension of a filename in a path.
 Examples:
 'index.html'  ->  '.html' 
@@ -85,124 +80,115 @@
 'foo/bar/index.html'  ->  '.html' 
 'foo/bar/index'  ->  '' 
 -->
-<xsl:template name="ext">
-  <xsl:param name="path"/>
-  <xsl:param name="subflag"/> <!-- Outermost call? -->
-  <xsl:choose>
-    <xsl:when test="contains($path, '.')">
-      <xsl:call-template name="ext">
-        <xsl:with-param name="path" select="substring-after($path, '.')"/>
-        <xsl:with-param name="subflag" select="'sub'"/>
-      </xsl:call-template>
-    </xsl:when>
-    <!-- Handle extension-less filenames by returning '' -->
-    <xsl:when test="not($subflag) and not(contains($path, '.'))">
-      <xsl:text/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:value-of select="concat('.', $path)"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
+  <xsl:template name="ext">
+    <xsl:param name="path"/>
+    <xsl:param name="subflag"/>
+<!-- Outermost call? -->
+    <xsl:choose>
+      <xsl:when test="contains($path, '.')">
+        <xsl:call-template name="ext">
+          <xsl:with-param name="path" select="substring-after($path, '.')"/>
+          <xsl:with-param name="subflag" select="'sub'"/>
+        </xsl:call-template>
+      </xsl:when>
+<!-- Handle extension-less filenames by returning '' -->
+      <xsl:when test="not($subflag) and not(contains($path, '.'))">
+<xsl:text/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="concat('.', $path)"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
 <!-- Returns a filename of a path stripped of its last extension.
 Examples:
 'foo/bar/index.dtdx.html' -> 'index.dtdx'
 -->
-<xsl:template name="filename-noext">
-  <xsl:param name="path"/>
-  <xsl:variable name="filename">
-    <xsl:call-template name="filename">
-      <xsl:with-param name="path" select="$path"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:variable name="ext">
-    <xsl:call-template name="ext">
-      <xsl:with-param name="path" select="$filename"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
-</xsl:template>
-
+  <xsl:template name="filename-noext">
+    <xsl:param name="path"/>
+    <xsl:variable name="filename">
+      <xsl:call-template name="filename">
+        <xsl:with-param name="path" select="$path"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:variable name="ext">
+      <xsl:call-template name="ext">
+        <xsl:with-param name="path" select="$filename"/>
+      </xsl:call-template>
+    </xsl:variable>
+    <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
+  </xsl:template>
 <!-- Returns a path with the filename stripped of its last extension.
 Examples:
 'foo/bar/index.dtdx.html' -> 'foo/bar/index.dtdx'
 -->
-<xsl:template name="path-noext">
-  <xsl:param name="path"/>
-  <xsl:variable name="ext">
-    <xsl:call-template name="ext">
-      <xsl:with-param name="path" select="$path"/>
-    </xsl:call-template>
-  </xsl:variable>
-  <xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))"/>
-</xsl:template>
-
-<!-- Normalized (..'s eliminated) version of 'path-noext' -->
-<xsl:template name="path-noext-nz">
-  <xsl:param name="path" />
-  <xsl:call-template name="normalize">
-    <xsl:with-param name="path">
-      <xsl:call-template name="path-noext">
-        <xsl:with-param name="path" select="$path" />
+  <xsl:template name="path-noext">
+    <xsl:param name="path"/>
+    <xsl:variable name="ext">
+      <xsl:call-template name="ext">
+        <xsl:with-param name="path" select="$path"/>
       </xsl:call-template>
-    </xsl:with-param>
-  </xsl:call-template>
-</xsl:template>
-
+    </xsl:variable>
+    <xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))"/>
+  </xsl:template>
+<!-- Normalized (..'s eliminated) version of 'path-noext' -->
+  <xsl:template name="path-noext-nz">
+    <xsl:param name="path" />
+    <xsl:call-template name="normalize">
+      <xsl:with-param name="path">
+        <xsl:call-template name="path-noext">
+          <xsl:with-param name="path" select="$path" />
+        </xsl:call-template>
+      </xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
 <!-- Returns a path with any fragment identifier ('#...') stripped off
 Examples:
 'foo/bar/index.dtdx.html#blah' -> 'foo/bar/index.dtdx.html'
 -->
-<xsl:template name="path-nofrag">
-  <xsl:param name="path"/>
-  <xsl:if test="not(contains($path, '#'))">
-    <xsl:value-of select="$path"/>
-  </xsl:if>
-  <xsl:if test="contains($path, '#')">
-    <xsl:value-of select="substring-before($path, '#')"/>
-  </xsl:if>
-</xsl:template>
-
-
-
+  <xsl:template name="path-nofrag">
+    <xsl:param name="path"/>
+    <xsl:if test="not(contains($path, '#'))">
+      <xsl:value-of select="$path"/>
+    </xsl:if>
+    <xsl:if test="contains($path, '#')">
+      <xsl:value-of select="substring-before($path, '#')"/>
+    </xsl:if>
+  </xsl:template>
 <!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
 Examples:
 'foo/bar/../baz/index.html' -> foo/baz/index.html'
 -->
-<xsl:template name="normalize">
-  <xsl:param name="path"/>
-    <!-- replace all \  with / -->
-  <xsl:variable name="path-" select="translate($path, '\', '/')"/>
-  <xsl:choose>
-      <!-- process relative refs here -->
-    <xsl:when test="contains($path-, '/../')">
-       <!--  put part before /../ into $pa: "foo/bar" -->
-      <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
-        <!-- put part after first occurrence /../ into $th: "baz/index.html" -->
-      <xsl:variable name="th" select="substring-after($path-, '/../')"/>
-        <!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
-      <xsl:variable name="pa-">
-        <xsl:call-template name="dirname">
-          <xsl:with-param name="path" select="$pa"/>
-        </xsl:call-template>
-      </xsl:variable>
-      <!-- recombine pieces thus eliminating one .. and one dir step before it
+  <xsl:template name="normalize">
+    <xsl:param name="path"/>
+<!-- replace all \  with / -->
+    <xsl:variable name="path-" select="translate($path, '\', '/')"/>
+    <xsl:choose>
+<!-- process relative refs here -->
+      <xsl:when test="contains($path-, '/../')">
+<!--  put part before /../ into $pa: "foo/bar" -->
+        <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
+<!-- put part after first occurrence /../ into $th: "baz/index.html" -->
+        <xsl:variable name="th" select="substring-after($path-, '/../')"/>
+<!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
+        <xsl:variable name="pa-">
+          <xsl:call-template name="dirname">
+            <xsl:with-param name="path" select="$pa"/>
+          </xsl:call-template>
+        </xsl:variable>
+<!-- recombine pieces thus eliminating one .. and one dir step before it
               and recurse into this template to eliminate more /../
-      -->  
-      <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
-      <xsl:call-template name="normalize">
-        <xsl:with-param name="path" select="$pa-th"/>
-      </xsl:call-template>
-    </xsl:when>
-
-    <xsl:otherwise>
-      <xsl:value-of select="$path-"/>
-    </xsl:otherwise>
-  </xsl:choose>
-
-</xsl:template>
-
+      -->
+        <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
+        <xsl:call-template name="normalize">
+          <xsl:with-param name="path" select="$pa-th"/>
+        </xsl:call-template>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$path-"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
 <!--
 Uncomment this to test.
 Usage: saxon pathutils.xsl pathutils.xsl path=foo/bar
@@ -242,5 +228,4 @@
   </xsl:message>
 </xsl:template>
 -->
-
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/pluginBuildFiles-to-pluginDescriptor.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/pluginBuildFiles-to-pluginDescriptor.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/pluginBuildFiles-to-pluginDescriptor.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/pluginBuildFiles-to-pluginDescriptor.xsl Mon Apr  9 19:07:17 2007
@@ -17,31 +17,43 @@
 -->
 <xsl:stylesheet xmlns:dir="http://apache.org/cocoon/directory/2.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-    
-    <xsl:param name="type" select="FIXME"/>
-    
-    <xsl:template match="/">
-      <plugins>
-        <xsl:attribute name="type"><xsl:value-of select="$type"/></xsl:attribute>
-        <xsl:apply-templates select="/dir:directory/dir:directory/dir:file[@name='build.xml']/dir:xpath"/>
-      </plugins>
-    </xsl:template>
-    
-    <xsl:template match="project">
-      <xsl:if test="property[@name='publish']/@value='true'">
-        <plugin>
-            <xsl:attribute name="name"><xsl:value-of select="property[@name='plugin-name']/@value"/></xsl:attribute>
-            <xsl:attribute name="type"><xsl:value-of select="property[@name='type']/@value"/></xsl:attribute>
-            <xsl:attribute name="author"><xsl:value-of select="property[@name='author']/@value"/></xsl:attribute>
-            <xsl:attribute name="website"><xsl:value-of select="property[@name='websiteURL']/@value"/></xsl:attribute>
-            <xsl:attribute name="url"><xsl:value-of select="property[@name='downloadURL']/@value"/></xsl:attribute>
-            <xsl:attribute name="version"><xsl:value-of select="property[@name='plugin-version']/@value"/></xsl:attribute>
-            <forrestVersion><xsl:value-of select="property[@name='forrest.version']/@value"/></forrestVersion>
-                   
-            <description>
-              <xsl:value-of select="property[@name='description']/@value"/>
-            </description>
-        </plugin>       
-      </xsl:if>
-    </xsl:template>
+  <xsl:param name="type" select="FIXME"/>
+  <xsl:template match="/">
+    <plugins>
+      <xsl:attribute name="type">
+        <xsl:value-of select="$type"/>
+      </xsl:attribute>
+      <xsl:apply-templates select="/dir:directory/dir:directory/dir:file[@name='build.xml']/dir:xpath"/>
+    </plugins>
+  </xsl:template>
+  <xsl:template match="project">
+    <xsl:if test="property[@name='publish']/@value='true'">
+      <plugin>
+        <xsl:attribute name="name">
+          <xsl:value-of select="property[@name='plugin-name']/@value"/>
+        </xsl:attribute>
+        <xsl:attribute name="type">
+          <xsl:value-of select="property[@name='type']/@value"/>
+        </xsl:attribute>
+        <xsl:attribute name="author">
+          <xsl:value-of select="property[@name='author']/@value"/>
+        </xsl:attribute>
+        <xsl:attribute name="website">
+          <xsl:value-of select="property[@name='websiteURL']/@value"/>
+        </xsl:attribute>
+        <xsl:attribute name="url">
+          <xsl:value-of select="property[@name='downloadURL']/@value"/>
+        </xsl:attribute>
+        <xsl:attribute name="version">
+          <xsl:value-of select="property[@name='plugin-version']/@value"/>
+        </xsl:attribute>
+        <forrestVersion>
+          <xsl:value-of select="property[@name='forrest.version']/@value"/>
+        </forrestVersion>
+        <description>
+          <xsl:value-of select="property[@name='description']/@value"/>
+        </description>
+      </plugin>
+    </xsl:if>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl?view=diff&rev=526996&r1=526995&r2=526996
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/plugins-to-xdoc.xsl Mon Apr  9 19:07:17 2007
@@ -15,12 +15,9 @@
   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:param name="pluginDocsVersion"/>
-
   <xsl:template match="pluginList">
     <document>
       <header>
@@ -30,66 +27,62 @@
         <section id="introduction">
           <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
+            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
 <!-- See FOR-963 regarding the reasons for this full URL. -->
             <a>
-              <xsl:attribute name="href">
-                <xsl:text>http://forrest.apache.org/pluginDocs/plugins_</xsl:text>
-                <xsl:value-of select="$pluginDocsVersion"/>
-                <xsl:text>/usingPlugins.html</xsl:text>
-              </xsl:attribute>
-              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
-          functional, in most cases they are usable, but use them with
-          caution as they are not considered stable. You would need to
-          keep up-to-date with the dev@ mailing list.</p>
-          
-          <note>If you have created a plugin that is not listed
-            here please let us know.</note>
-    
-          <note>The minimum version of Forrest is for latest version of
-          the plugin, there may be an earlier versions of the plugin for
-          earlier versions of Forrest. If you do not define a version 
-          number for the plugin it will always use the latest version
-          compatible with your version of Forrest. However, be aware
-          that if you are using a development version of forrest, you
-          will also be using development versions of the plugins.</note>
-          
+            <xsl:attribute name="href">
+<xsl:text>http://forrest.apache.org/pluginDocs/plugins_</xsl:text>
+              <xsl:value-of select="$pluginDocsVersion"/>
+<xsl:text>/usingPlugins.html</xsl:text>
+            </xsl:attribute>
+            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 functional, in most
+            cases they are usable, but use them with caution as they are not
+            considered stable. You would need to keep up-to-date with the dev@
+            mailing list.
+          </p>
+          <note>
+            If you have created a plugin that is not listed here please let us
+            know.
+          </note>
+          <note>
+            The minimum version of Forrest is for latest version of the plugin,
+            there may be an earlier versions of the plugin for earlier versions
+            of Forrest. If you do not define a version number for the plugin it
+            will always use the latest version compatible with your version of
+            Forrest. However, be aware that if you are using a development
+            version of forrest, you will also be using development versions of
+            the plugins.
+          </note>
           <section>
             <title>Released Plugins</title>
             <xsl:apply-templates select="plugins[@type='released']"/>
           </section>
-          
           <section>
             <title>Whiteboard Plugins</title>
             <warning>
-              See <a href="#introduction">introduction</a>
-              for notes about plugins in development.
+              See <a href="#introduction">introduction</a> for notes about
+              plugins in development.
             </warning>
-            
             <div class="frame warning">
               <div class="label">Warning</div>
               <div class="content">Plugins in this section may not automatically
@@ -103,14 +96,12 @@
       </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.
+        Input plugins enable Forrest to work with source documents in different
+        formats.
       </p>
       <xsl:choose>
         <xsl:when test="plugin[@type='input']">
@@ -120,16 +111,16 @@
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <p>No plugins of this type available.</p>
+          <p>
+            No plugins of this type available.
+          </p>
         </xsl:otherwise>
       </xsl:choose>
     </section>
-
     <section>
       <title>Output Plugins</title>
       <p>
-        Output plugins enable Forrest to produce
-        documents in different formats.
+        Output plugins enable Forrest to produce documents in different formats.
       </p>
       <xsl:choose>
         <xsl:when test="plugin[@type='output']">
@@ -139,16 +130,16 @@
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <p>No plugins of this type available.</p>
+          <p>
+            No plugins of this type available.
+          </p>
         </xsl:otherwise>
       </xsl:choose>
     </section>
-
     <section>
       <title>Internal Plugins</title>
       <p>
-        Internal plugins change the core behaviour
-        of Forrest.
+        Internal plugins change the core behaviour of Forrest.
       </p>
       <xsl:choose>
         <xsl:when test="plugin[@type='internal']">
@@ -158,17 +149,16 @@
           </xsl:apply-templates>
         </xsl:when>
         <xsl:otherwise>
-          <p>No plugins of this type available.</p>
+          <p>
+            No plugins of this type available.
+          </p>
         </xsl:otherwise>
       </xsl:choose>
     </section>
   </xsl:template>
-
   <xsl:template match="plugin">
     <section>
-      <title>
-        <xsl:value-of select="@name" />
-      </title>
+      <title><xsl:value-of select="@name" /></title>
       <table>
         <tr>
           <th width="25%">Description</th>
@@ -187,45 +177,36 @@
             </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>
+          <td><a>
+            <xsl:attribute name="href">
               <xsl:value-of select="@website" />
-            </a>
+            </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>
+          <td><a>
+            <xsl:attribute name="href">
               <xsl:value-of select="@url" />
-            </a>
+            </xsl:attribute>
+            <xsl:value-of select="@url" /></a>
           </td>
         </tr>
-
         <tr>
           <th width="25%">Latest Plugin version</th>
           <td>
             <xsl:value-of select="@version" />
           </td>
         </tr>
-
         <tr>
           <th width="25%">
             Minimum Forrest version required *



Mime
View raw message