forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r527037 [2/6] - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher: ./ resources/stylesheets/ resources/stylesheets/common/ resources/stylesheets/common/css/ resources/stylesheets/common/images/ resources/sty...
Date Tue, 10 Apr 2007 05:33:34 GMT
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/document2fo.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/document2fo.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/document2fo.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/document2fo.xsl Mon Apr  9 22:33:31 2007
@@ -15,71 +15,54 @@
   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"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
-
-  <!-- left, justify, right -->
-  <xsl:variable name="text-align" select="string(//skinconfig/pdf/page/@text-align)"/> 
-  
-  <!-- print URL of external links -->
+<!-- left, justify, right -->
+  <xsl:variable name="text-align" select="string(//skinconfig/pdf/page/@text-align)"/>
+<!-- print URL of external links -->
   <xsl:variable name="show-external-urls" select="//skinconfig/pdf/show-external-urls"/>
-  
-  <!-- Get the section depth to use when generating the minitoc (default is 2) -->
+<!-- Get the section depth to use when generating the minitoc (default is 2) -->
   <xsl:variable name="toc-max-depth" select="number(//skinconfig/toc/@max-depth)"/>
-
-  <!-- The page size to be used -->
+<!-- The page size to be used -->
   <xsl:variable name="pagesize"
                 select="string(//skinconfig/pdf/page/@size)"/>
-
-  <!-- The page orientation ("portrait" or "landscape") -->
+<!-- The page orientation ("portrait" or "landscape") -->
   <xsl:variable name="pageorientation"
                 select="string(//skinconfig/pdf/page/@orientation)"/>
-
-  <!-- Double-sided printing toggle -->
+<!-- Double-sided printing toggle -->
   <xsl:variable name="doublesided"
                 select="string(//skinconfig/pdf/margins/@double-sided)"/>
-
-  <!-- The top page margin -->
+<!-- The top page margin -->
   <xsl:variable name="topmargin"
                 select="string(//skinconfig/pdf/margins/top)"/>
-
-  <!-- The bottom page margin -->
+<!-- The bottom page margin -->
   <xsl:variable name="bottommargin"
                 select="string(//skinconfig/pdf/margins/bottom)"/>
-
-  <!-- The inner page margin (always the left margin if
+<!-- The inner page margin (always the left margin if
   double-sided printing is off, alternating between left and right if
   it's on) -->
   <xsl:variable name="innermargin"
                 select="string(//skinconfig/pdf/margins/inner)"/>
-
-  <!-- The outer page margin (always the right margin if
+<!-- The outer page margin (always the right margin if
   double-sided printing is off, alternating between right and left if
   it's on)-->
   <xsl:variable name="outermargin"
                 select="string(//skinconfig/pdf/margins/outer)"/>
-
   <xsl:param name="numbersections" select="'true'"/>
-  
-  <!-- page breaks after TOC and each page if an aggregate document -->
+<!-- page breaks after TOC and each page if an aggregate document -->
   <xsl:variable name="page-break-top-sections" select="'true'"/>
-
-  <!-- page numbering format -->
+<!-- page numbering format -->
   <xsl:variable name="page-numbering-format" select="string(//skinconfig/pdf/page-numbering-format)"/>
-
-  <!-- Section depth at which we stop numbering and just indent -->
+<!-- Section depth at which we stop numbering and just indent -->
   <xsl:param name="numbering-max-depth" select="'3'"/>
   <xsl:param name="imagesdir" select="."/>
   <xsl:param name="xmlbasedir"/>
   <xsl:include href="pdfoutline.xsl"/>
   <xsl:include href="footerinfo.xsl"/>
-
-
-  <!-- Determine page height for various page sizes (US Letter portrait
+<!-- Determine page height for various page sizes (US Letter portrait
   is the default) -->
-  <!-- FIXME: JJP:would this be better of a file? -->
+<!-- FIXME: JJP:would this be better of a file? -->
   <xsl:variable name="pageheight">
     <xsl:choose>
       <xsl:when test="$pageorientation = 'landscape'">
@@ -119,8 +102,7 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-
-  <!-- Determine page width for various page sizes (US Letter portrait
+<!-- Determine page width for various page sizes (US Letter portrait
   is the default) -->
   <xsl:variable name="pagewidth">
     <xsl:choose>
@@ -161,11 +143,9 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>
-
   <xsl:template match="/">
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
       <fo:layout-master-set>
-
         <fo:simple-page-master master-name="first-page"
           page-height="{$pageheight}"
           page-width="{$pagewidth}"
@@ -181,7 +161,6 @@
             extent=".5in"
             display-align="before"/>
         </fo:simple-page-master>
-
         <fo:simple-page-master master-name="even-page"
           page-height="{$pageheight}"
           page-width="{$pagewidth}"
@@ -217,7 +196,6 @@
             extent=".5in"
             display-align="before"/>
         </fo:simple-page-master>
-
         <fo:simple-page-master master-name="odd-page"
           page-height="{$pageheight}"
           page-width="{$pagewidth}"
@@ -237,7 +215,6 @@
             extent=".5in"
             display-align="before"/>
         </fo:simple-page-master>
-
         <fo:page-sequence-master master-name="book">
           <fo:repeatable-page-master-alternatives>
             <fo:conditional-page-master-reference
@@ -252,19 +229,16 @@
           </fo:repeatable-page-master-alternatives>
         </fo:page-sequence-master>
       </fo:layout-master-set>
-
       <xsl:apply-templates select="/site/document" mode="outline"/>
-
       <fo:page-sequence master-reference="book">
         <xsl:apply-templates select="/site/document"/>
       </fo:page-sequence>
-
     </fo:root>
   </xsl:template>
-
   <xsl:template match="document">
-    <fo:title><xsl:value-of select="header/title"/></fo:title>
-
+    <fo:title>
+      <xsl:value-of select="header/title"/>
+    </fo:title>
     <fo:static-content flow-name="first-footer">
       <fo:block
         border-top="0.25pt solid"
@@ -272,7 +246,7 @@
         text-align="center">
         <xsl:apply-templates select="footer"/>
       </fo:block>
-      <!-- don't list page number on first page if it's contents is just the TOC -->
+<!-- don't list page number on first page if it's contents is just the TOC -->
       <xsl:if test="not($toc-max-depth > 0 and $page-break-top-sections)">
         <xsl:call-template name="insertPageNumber">
           <xsl:with-param name="text-align">start</xsl:with-param>
@@ -280,7 +254,6 @@
       </xsl:if>
       <xsl:call-template name="info"/>
     </fo:static-content>
-
     <fo:static-content flow-name="even-header">
       <fo:block
         font-size="70%"
@@ -289,7 +262,6 @@
         <xsl:value-of select="header/title"/>
       </fo:block>
     </fo:static-content>
-
     <fo:static-content flow-name="even-footer">
       <fo:block
         border-top="0.25pt solid"
@@ -302,7 +274,6 @@
       </xsl:call-template>
       <xsl:call-template name="info"/>
     </fo:static-content>
-
     <fo:static-content flow-name="odd-header">
       <fo:block
         font-size="70%"
@@ -311,7 +282,6 @@
         <xsl:value-of select="header/title"/>
       </fo:block>
     </fo:static-content>
-
     <fo:static-content flow-name="odd-footer">
       <fo:block
         border-top="0.25pt solid"
@@ -324,7 +294,6 @@
       </xsl:call-template>
       <xsl:call-template name="info"/>
     </fo:static-content>
-
     <fo:flow flow-name="xsl-region-body">
       <fo:block
         padding-before="24pt"
@@ -332,23 +301,18 @@
         font-size="24pt"
         font-weight="bold"
         id="{generate-id()}">
-
         <xsl:value-of select="header/title"/>
       </fo:block>
-
       <fo:block
         text-align="{$text-align}"
         padding-before="18pt"
         padding-after="18pt">
         <xsl:apply-templates/>
       </fo:block>
-      
-      <!-- Total number of pages calculation... -->
+<!-- Total number of pages calculation... -->
       <fo:block id="term"/>
-
     </fo:flow>
   </xsl:template>
-
   <xsl:template match="abstract">
     <fo:block
       font-size="12pt"
@@ -362,7 +326,6 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="notice">
     <fo:block
       font-size="10pt"
@@ -375,38 +338,30 @@
       padding-before="6pt"
       padding-after="6pt">
       <xsl:call-template name="insertPageBreaks"/>
-      <!-- insert i18n stuff here -->
+<!-- insert i18n stuff here -->
       NOTICE: <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="anchor">
     <fo:block id="{@id}"/>
     <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="section">
-
     <xsl:param name="level">0</xsl:param>
-
     <xsl:variable name="size">
-      <!-- 14pt for level 1 12pt for level 2 -->
+<!-- 14pt for level 1 12pt for level 2 -->
       <xsl:value-of select="14-number($level)"/>
     </xsl:variable>
-
     <xsl:variable name="background-color" select="//skinconfig/colors/color[@name='body']/@value"/>
     <xsl:variable name="heading-color" select="//skinconfig/colors/color[@name='subheading']/@value"/>
     <xsl:variable name="heading-type" select="//skinconfig/headings/@type"/>
-
     <fo:block
       font-family="serif"
       font-size="{$size}pt"
       font-weight="bold"
       space-before="12pt"
       space-after="4pt">
-      
       <xsl:call-template name="insertPageBreaks"/>
-    
       <xsl:if test="$heading-type = 'boxed'">
         <xsl:attribute name="background-color">
           <xsl:value-of select="$heading-color"/>
@@ -422,24 +377,22 @@
           </xsl:otherwise>
         </xsl:choose>
       </xsl:attribute>
-
       <xsl:if test="$numbersections = 'true' and number($level) &lt; $numbering-max-depth+1">
         <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
-        <xsl:text>. </xsl:text>
+<xsl:text>. </xsl:text>
       </xsl:if>
-
-      <!-- For sections 4  or more nestings deep, indent instead of number -->
+<!-- For sections 4  or more nestings deep, indent instead of number -->
       <xsl:if test="number($level) &gt; $numbering-max-depth+1">
         <xsl:attribute name="start-indent">
-          <xsl:value-of select="4+number($level)"/><xsl:text>pt</xsl:text>
+          <xsl:value-of select="4+number($level)"/>
+<xsl:text>pt</xsl:text>
         </xsl:attribute>
       </xsl:if>
-
       <xsl:value-of select="title"/>
     </fo:block>
     <xsl:if test="$heading-type = 'underlined'">
-      <!-- The non-breaking space in this block is required, otherwise
-      the block won't be rendered at all. --> 
+<!-- The non-breaking space in this block is required, otherwise
+      the block won't be rendered at all. -->
       <fo:block
         font-family="serif"
         font-size="{10 div (number($level) +1 )}pt"
@@ -452,15 +405,12 @@
       </xsl:apply-templates>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="title">
-    <!-- do nothing as titles are handled in their parent templates -->
+<!-- do nothing as titles are handled in their parent templates -->
   </xsl:template>
-
   <xsl:template match="subtitle">
     <xsl:param name="level">0</xsl:param>
     <xsl:variable name="size" select="16-(number($level)*1.5)"/>
-
     <fo:block
       font-weight="bold"
       font-size="{$size}pt">
@@ -468,14 +418,13 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="authors">
     <fo:block
       space-before="20pt"
       font-weight="bold"
       font-size="9pt">
       <xsl:call-template name="insertPageBreaks"/>
-      <!-- insert i18n stuff here -->
+<!-- insert i18n stuff here -->
       by
       <xsl:for-each select="person">
         <xsl:value-of select="@name"/>
@@ -483,7 +432,6 @@
       </xsl:for-each>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="p">
     <xsl:choose>
       <xsl:when test="ancestor::li and not(preceding-sibling::*)">
@@ -505,7 +453,6 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template match="source">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name='code']/@value"/>
     <fo:block
@@ -521,8 +468,6 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
-
   <xsl:template match="ol|ul">
     <fo:list-block
       provisional-distance-between-starts="18pt"
@@ -531,7 +476,6 @@
       <xsl:apply-templates/>
     </fo:list-block>
   </xsl:template>
-
   <xsl:template match="ol/li">
     <fo:list-item>
       <xsl:if test="not(following-sibling::li[1])">
@@ -552,8 +496,7 @@
       </fo:list-item-body>
     </fo:list-item>
   </xsl:template>
-
-  <!-- Emulate browser handling of these invalid combinations that our DTD
+<!-- Emulate browser handling of these invalid combinations that our DTD
   unfortunately allows -->
   <xsl:template match="ul/ul | ul/ol | ol/ul | ol/ol">
     <fo:list-item>
@@ -567,7 +510,6 @@
       </fo:list-item-body>
     </fo:list-item>
   </xsl:template>
-
   <xsl:template match="ul/li">
     <fo:list-item>
       <xsl:if test="not(following-sibling::li[1])">
@@ -584,7 +526,6 @@
       </fo:list-item-body>
     </fo:list-item>
   </xsl:template>
-
   <xsl:template match="dl">
     <fo:list-block
       provisional-distance-between-starts="18pt"
@@ -593,7 +534,6 @@
       <xsl:apply-templates/>
     </fo:list-block>
   </xsl:template>
-
   <xsl:template match="dt">
     <fo:list-item>
       <fo:list-item-label end-indent="label-end()">
@@ -607,7 +547,6 @@
       </fo:list-item-body>
     </fo:list-item>
   </xsl:template>
-
   <xsl:template match="dd">
     <fo:list-item>
       <fo:list-item-label end-indent="label-end()">
@@ -620,19 +559,21 @@
       </fo:list-item-body>
     </fo:list-item>
   </xsl:template>
-
   <xsl:template match="strong">
-    <fo:inline font-weight="bold"><xsl:apply-templates/></fo:inline>
+    <fo:inline font-weight="bold">
+      <xsl:apply-templates/>
+    </fo:inline>
   </xsl:template>
-
   <xsl:template match="em">
-    <fo:inline font-style="italic"><xsl:apply-templates/></fo:inline>
+    <fo:inline font-style="italic">
+      <xsl:apply-templates/>
+    </fo:inline>
   </xsl:template>
-
   <xsl:template match="code">
-    <fo:inline font-family="monospace"><xsl:apply-templates/></fo:inline>
+    <fo:inline font-family="monospace">
+      <xsl:apply-templates/>
+    </fo:inline>
   </xsl:template>
-
   <xsl:template match="warning">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name='warning']/@value"/>
     <fo:block
@@ -650,9 +591,12 @@
       color="#ffffff">
       <xsl:call-template name="insertPageBreaks"/>
       <xsl:choose>
-        <xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
         <xsl:otherwise>Warning: </xsl:otherwise>
-      </xsl:choose><xsl:value-of select="title"/>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
     </fo:block>
     <fo:block
       margin-left="0.25in"
@@ -672,7 +616,6 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="note">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name='note']/@value"/>
     <fo:block
@@ -690,10 +633,13 @@
       background-color="{$color}">
       <xsl:call-template name="insertPageBreaks"/>
       <xsl:choose>
-        <xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
-        <!-- insert i18n stuff here -->
+        <xsl:when test="@label">
+          <xsl:value-of select="@label"/>
+        </xsl:when>
+<!-- insert i18n stuff here -->
         <xsl:otherwise>Note: </xsl:otherwise>
-      </xsl:choose><xsl:value-of select="title"/>
+      </xsl:choose>
+      <xsl:value-of select="title"/>
     </fo:block>
     <fo:block
       margin-left="0.25in"
@@ -713,7 +659,6 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="fixme">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name='fixme']/@value"/>
     <fo:block
@@ -730,7 +675,7 @@
       border-color="{$color}"
       background-color="{$color}">
       <xsl:call-template name="insertPageBreaks"/>
-      <!-- insert i18n stuff here -->
+<!-- insert i18n stuff here -->
       FIXME (<xsl:value-of select="@author"/>): <xsl:value-of select="title"/>
     </fo:block>
     <fo:block
@@ -751,7 +696,6 @@
       <xsl:apply-templates/>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="link|fork|jump">
     <xsl:variable name="color" select="//skinconfig/colors/color[@name = 'body']/@link"/>
     <xsl:choose>
@@ -761,57 +705,65 @@
         </fo:basic-link>
       </xsl:when>
       <xsl:otherwise>
-        <fo:basic-link color="{$color}" text-decoration="underline" external-destination="{@href}"><xsl:apply-templates/></fo:basic-link>
+        <fo:basic-link color="{$color}" text-decoration="underline" external-destination="{@href}">
+          <xsl:apply-templates/>
+        </fo:basic-link>
         <xsl:if test="$show-external-urls = 'true' and @href != string(.)">
           (<xsl:value-of select="@href"/>)
         </xsl:if>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template match="figure|img">
     <fo:block text-align="center">
       <xsl:call-template name="insertPageBreaks"/>
       <xsl:if test="normalize-space(@id)!=''">
-          <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+        <xsl:attribute name="id">
+          <xsl:value-of select="@id"/>
+        </xsl:attribute>
       </xsl:if>
-
-      <!-- Make relative paths absolute -->
+<!-- Make relative paths absolute -->
       <xsl:variable name="imgpath">
-      <xsl:choose>
-        <!-- resources image dir -->
-        <xsl:when test="starts-with(string(@src),'images/')">
-          <xsl:value-of select="concat($imagesdir,substring-after(@src,'images'))"/>
-        </xsl:when>
-        <!-- already absolute -->
-        <xsl:when test="contains(string(@src),':') or starts-with(string(@src),'/')">
-          <xsl:value-of select="@src"/>
-        </xsl:when>
-        <!-- relative to document -->
-        <xsl:otherwise><xsl:value-of select="concat($xmlbasedir,@src)"/></xsl:otherwise>
-      </xsl:choose>
+        <xsl:choose>
+<!-- resources image dir -->
+          <xsl:when test="starts-with(string(@src),'images/')">
+            <xsl:value-of select="concat($imagesdir,substring-after(@src,'images'))"/>
+          </xsl:when>
+<!-- already absolute -->
+          <xsl:when test="contains(string(@src),':') or starts-with(string(@src),'/')">
+            <xsl:value-of select="@src"/>
+          </xsl:when>
+<!-- relative to document -->
+          <xsl:otherwise>
+            <xsl:value-of select="concat($xmlbasedir,@src)"/>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:variable>
       <fo:external-graphic src="{$imgpath}">
         <xsl:if test="@height">
-          <xsl:attribute name="height"><xsl:value-of select="@height"/></xsl:attribute>
+          <xsl:attribute name="height">
+            <xsl:value-of select="@height"/>
+          </xsl:attribute>
         </xsl:if>
         <xsl:if test="@width">
-          <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
+          <xsl:attribute name="width">
+            <xsl:value-of select="@width"/>
+          </xsl:attribute>
         </xsl:if>
       </fo:external-graphic>
-      <!-- alt text -->
+<!-- alt text -->
       <xsl:if test="normalize-space(@alt)!=''">
-          <fo:block><xsl:value-of select="@alt"/></fo:block>
+        <fo:block>
+          <xsl:value-of select="@alt"/>
+        </fo:block>
       </xsl:if>
     </fo:block>
   </xsl:template>
-
   <xsl:template match="table">
-    <!-- FIXME: Apache FOP must have column widths specified at present,
+<!-- FIXME: Apache FOP must have column widths specified at present,
          this section can be removed when this limitation is removed from Fop.
          Unfortunately, this means that each column is a fixed width,
          but at least the table displays! -->
-
     <xsl:variable name="max-number-columns">
       <xsl:for-each select="tr">
         <xsl:sort select="count(td|th)" data-type="number" order="descending"/>
@@ -820,60 +772,50 @@
         </xsl:if>
       </xsl:for-each>
     </xsl:variable>
-
-
     <xsl:variable name="column-width">
       <xsl:value-of select="6.25 div number($max-number-columns)"/>in
     </xsl:variable>
-
     <fo:table>
-
       <fo:table-column>
         <xsl:attribute name="column-width">
           <xsl:value-of select="$column-width"/>
         </xsl:attribute>
-
         <xsl:attribute name="number-columns-repeated">
           <xsl:value-of select="number($max-number-columns)"/>
         </xsl:attribute>
       </fo:table-column>
-
-      <!-- End of hack for Fop support (if removing this hack, remember
+<!-- End of hack for Fop support (if removing this hack, remember
            you need the <fo:table> element) -->
-
       <fo:table-body
         font-size="10pt"
         font-family="sans-serif">
         <xsl:apply-templates select="tr"/>
       </fo:table-body>
     </fo:table>
-
-    <!-- FIXME: Apache Fop does not support the caption element yet.
+<!-- FIXME: Apache Fop does not support the caption element yet.
          This hack will display the table caption accordingly. -->
     <xsl:if test="caption">
       <fo:block
         text-align="center"
         font-weight="bold">
-        <!-- insert i18n stuff here -->
+<!-- insert i18n stuff here -->
         Table
         <xsl:text> </xsl:text>
         <xsl:number count="table" level="multiple"/>
-        <xsl:text>: </xsl:text>
+<xsl:text>: </xsl:text>
         <xsl:value-of select="caption"/>
       </fo:block>
     </xsl:if>
   </xsl:template>
-
   <xsl:template match="tr">
     <fo:table-row>
       <xsl:apply-templates/>
     </fo:table-row>
   </xsl:template>
-
   <xsl:template match="th">
-      <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
-      <xsl:variable name="background-color" select="$border-color"/>
-      <fo:table-cell
+    <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
+    <xsl:variable name="background-color" select="$border-color"/>
+    <fo:table-cell
         padding-before="4pt"
         padding-after="4pt"
         padding-start="4pt"
@@ -881,19 +823,18 @@
         color="#FFFFFF"
         background-color="{$background-color}"
         border="1pt solid {$border-color}">
-        <xsl:attribute name="number-columns-spanned">
-          <xsl:value-of select="@colspan"/>
-        </xsl:attribute>
-        <xsl:attribute name="number-rows-spanned">
-          <xsl:value-of select="@rowspan"/>
-        </xsl:attribute>
-        <fo:block
+      <xsl:attribute name="number-columns-spanned">
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
+      <fo:block
           text-align="center">
-          <xsl:apply-templates/>
-        </fo:block>
-      </fo:table-cell>
+        <xsl:apply-templates/>
+      </fo:block>
+    </fo:table-cell>
   </xsl:template>
-
   <xsl:template match="td">
     <xsl:variable name="border-color" select="//skinconfig/colors/color[@name = 'table']/@value"/>
     <xsl:variable name="background-color" select="//skinconfig/colors/color[@name = 'table-cell']/@value"/>
@@ -905,49 +846,45 @@
       background-color="{$background-color}"
       border="1pt solid {$border-color}">
       <xsl:attribute name="number-columns-spanned">
-          <xsl:value-of select="@colspan"/>
-        </xsl:attribute>
-        <xsl:attribute name="number-rows-spanned">
-          <xsl:value-of select="@rowspan"/>
-        </xsl:attribute>
+        <xsl:value-of select="@colspan"/>
+      </xsl:attribute>
+      <xsl:attribute name="number-rows-spanned">
+        <xsl:value-of select="@rowspan"/>
+      </xsl:attribute>
       <fo:block>
         <xsl:apply-templates/>
       </fo:block>
     </fo:table-cell>
   </xsl:template>
-
   <xsl:template match="br">
     <fo:block></fo:block>
   </xsl:template>
-
   <xsl:template match="legal">
     <fo:inline
       font-size="8pt">
       <xsl:apply-templates/>
     </fo:inline>
   </xsl:template>
-
   <xsl:template match="body[count(//section) != 0]">
     <xsl:if test="$toc-max-depth > 0">
       <fo:block font-family="serif" font-size="14pt" font-weight="bold"
       space-after="5pt" space-before="5pt" text-align="justify" width="7.5in">
-      <xsl:call-template name="insertPageBreaks"/>
-        <!-- insert i18n stuff here -->
-        <xsl:text>Table of contents</xsl:text>
+        <xsl:call-template name="insertPageBreaks"/>
+<!-- insert i18n stuff here -->
+<xsl:text>Table of contents</xsl:text>
       </fo:block>
       <fo:block font-family="sans" font-size="12pt" space-after="5pt"
       space-before="0pt" text-align="justify" width="7.5in">
-          <xsl:if test="$page-break-top-sections">
-            <xsl:attribute name="break-after">page</xsl:attribute>
-          </xsl:if>
-          <xsl:apply-templates select="section" mode="toc" />
+        <xsl:if test="$page-break-top-sections">
+          <xsl:attribute name="break-after">page</xsl:attribute>
+        </xsl:if>
+        <xsl:apply-templates select="section" mode="toc" />
       </fo:block>
     </xsl:if>
     <xsl:apply-templates />
   </xsl:template>
-
   <xsl:template match="section" mode="toc">
-    <!-- FIXME: see bug FOR-640 -->
+<!-- FIXME: see bug FOR-640 -->
     <xsl:param name="depth" select="'1'"/>
     <fo:block space-before="5pt" text-align-last="justify" start-indent=".5em" text-indent=".5em">
       <fo:inline>
@@ -964,90 +901,86 @@
         <fo:basic-link internal-destination="{$id}">
           <xsl:value-of select="substring('&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;', 0, 2 * $depth - 1)" />
           <fo:inline font-size="10pt">
-          <xsl:number count="section" format="1.1.1.1.1.1.1" level="multiple" />
+            <xsl:number count="section" format="1.1.1.1.1.1.1" level="multiple" />
           </fo:inline>
-          <xsl:text> </xsl:text>
+<xsl:text> </xsl:text>
           <xsl:value-of select="title" />
           <fo:leader leader-pattern="dots" />
           <fo:page-number-citation ref-id="{$id}" />
         </fo:basic-link>
       </fo:inline>
-        <xsl:if test="$toc-max-depth > $depth">
-          <xsl:apply-templates select="section" mode="toc">
-            <xsl:with-param name="depth" select="$depth + 1"/>
-          </xsl:apply-templates>
-        </xsl:if>
+      <xsl:if test="$toc-max-depth > $depth">
+        <xsl:apply-templates select="section" mode="toc">
+          <xsl:with-param name="depth" select="$depth + 1"/>
+        </xsl:apply-templates>
+      </xsl:if>
     </fo:block>
   </xsl:template>
-
-
 <!-- ====================================================================== -->
 <!-- Local Extensions section -->
 <!-- ====================================================================== -->
-
- <xsl:template match="citation">
-   <fo:inline>
+  <xsl:template match="citation">
+    <fo:inline>
      [<xsl:value-of select="@def"/>]
    </fo:inline>
- </xsl:template>
-
- <xsl:template match="p[@class='quote']">
-   <fo:block start-indent="1em"
+  </xsl:template>
+  <xsl:template match="p[@class='quote']">
+    <fo:block start-indent="1em"
      space-before="4pt"
      space-after="4pt"
      background-color="#f0f0f0"
      font-family="monospace">
-     <xsl:call-template name="insertPageBreaks"/>
-     <xsl:apply-templates/>
-   </fo:block>
- </xsl:template>
- 
- <xsl:template name="insertPageBreaks">
-      <!-- if marked as a 'pageBreakBefore', and we're breaking on pages, and were not the first node -->
-      <xsl:if test="contains(@class, 'pageBreakBefore') and preceding-sibling::node()">
-          <xsl:attribute name="break-before">page</xsl:attribute>
-      </xsl:if>
-      <!-- if marked as a 'pageBreakAfter', and we're breaking on pages, and were not the last node -->
-      <xsl:if test="contains(@class, 'pageBreakAfter') and following-sibling::node()">
-          <xsl:attribute name="break-after">page</xsl:attribute>
-      </xsl:if>
- </xsl:template>
-
- <!-- Display the document numerotation -->
- <xsl:template name="insertPageNumber">
-   <xsl:param name="text-align" select="'start'"/>
-     <xsl:variable name="prefixe" select="substring-before($page-numbering-format,'1')"/>
-     <xsl:variable name="sep" select="substring-before(substring-after($page-numbering-format,'1'),'1')"/>
-     <xsl:variable name="postfixe">
-       <xsl:choose>
-         <xsl:when test="contains(substring-after($page-numbering-format,'1'),'1')">
-           <xsl:value-of select="substring-after(substring-after($page-numbering-format,'1'),'1')"/>
-         </xsl:when>
-         <xsl:otherwise>
-           <xsl:value-of select="substring-after($page-numbering-format,'1')"/>
-         </xsl:otherwise>
-       </xsl:choose>
-     </xsl:variable>
-     
-     <!-- if 'page-numbering-format' contains 1 digits, the page number is displayed in the footer -->
-     <xsl:if test="contains($page-numbering-format,'1')">
-       <fo:block font-size="70%" text-align="{$text-align}">
-          <!-- if the separator is not found, the total page number is skipped -->
-          <xsl:value-of select="$prefixe"/><fo:page-number/><xsl:if test="$sep != ''"><xsl:value-of select="$sep"/><fo:page-number-citation ref-id="term"/></xsl:if><xsl:value-of select="$postfixe"/>
+      <xsl:call-template name="insertPageBreaks"/>
+      <xsl:apply-templates/>
+    </fo:block>
+  </xsl:template>
+  <xsl:template name="insertPageBreaks">
+<!-- if marked as a 'pageBreakBefore', and we're breaking on pages, and were not the first node -->
+    <xsl:if test="contains(@class, 'pageBreakBefore') and preceding-sibling::node()">
+      <xsl:attribute name="break-before">page</xsl:attribute>
+    </xsl:if>
+<!-- if marked as a 'pageBreakAfter', and we're breaking on pages, and were not the last node -->
+    <xsl:if test="contains(@class, 'pageBreakAfter') and following-sibling::node()">
+      <xsl:attribute name="break-after">page</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+<!-- Display the document numerotation -->
+  <xsl:template name="insertPageNumber">
+    <xsl:param name="text-align" select="'start'"/>
+    <xsl:variable name="prefixe" select="substring-before($page-numbering-format,'1')"/>
+    <xsl:variable name="sep" select="substring-before(substring-after($page-numbering-format,'1'),'1')"/>
+    <xsl:variable name="postfixe">
+      <xsl:choose>
+        <xsl:when test="contains(substring-after($page-numbering-format,'1'),'1')">
+          <xsl:value-of select="substring-after(substring-after($page-numbering-format,'1'),'1')"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="substring-after($page-numbering-format,'1')"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+<!-- if 'page-numbering-format' contains 1 digits, the page number is displayed in the footer -->
+    <xsl:if test="contains($page-numbering-format,'1')">
+      <fo:block font-size="70%" text-align="{$text-align}">
+<!-- if the separator is not found, the total page number is skipped -->
+        <xsl:value-of select="$prefixe"/>
+        <fo:page-number/>
+        <xsl:if test="$sep != ''">
+          <xsl:value-of select="$sep"/>
+          <fo:page-number-citation ref-id="term"/>
+        </xsl:if>
+        <xsl:value-of select="$postfixe"/>
       </fo:block>
     </xsl:if>
- </xsl:template>
- 
+  </xsl:template>
 <!-- ====================================================================== -->
 <!-- Temporary section - subject to change on short notice  -->
 <!-- ====================================================================== -->
-
- <xsl:template match="//style"> 
-   <!-- HACK: The OpenOffice.org input plugin currently produces
+  <xsl:template match="//style">
+<!-- HACK: The OpenOffice.org input plugin currently produces
    intermediate documents that contain a style element, invalid per
    the Forrest Document DTD. This style element must be ignored
    here. To find out why this is done this way, read the comments
    attached to issue FOR-433. -->
- </xsl:template>
-
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/footerinfo.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/footerinfo.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/footerinfo.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/footerinfo.xsl Mon Apr  9 22:33:31 2007
@@ -18,7 +18,6 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">
-
 <!--
 Named template to generate a short message in the PDF footer, from text in
 skinconf.xml.  By default, the message is a copyright statement.  If a credit
@@ -37,12 +36,13 @@
         <xsl:value-of select="$pdfcredit/name"/>
       </xsl:if>
       <xsl:if test="not($pdfcredit) and not($disable-copyright-footer = 'true')">
-        <xsl:text>Copyright &#169; </xsl:text><xsl:value-of select="//skinconfig/year"/>&#160;<xsl:value-of
-          select="//skinconfig/vendor"/><xsl:text> All rights reserved.</xsl:text>
+<xsl:text>Copyright &#169; </xsl:text>
+        <xsl:value-of select="//skinconfig/year"/>&#160;<xsl:value-of
+          select="//skinconfig/vendor"/>
+<xsl:text> All rights reserved.</xsl:text>
       </xsl:if>
     </xsl:variable>
     <xsl:variable name="url" select="$pdfcredit/url"/>
-
     <fo:block-container font-style="italic" absolute-position="absolute"
       left="0pt" top="0pt" right="6.25in" bottom="150pt"
       font-size="10pt">
@@ -67,5 +67,4 @@
       </xsl:if>
     </fo:block-container>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/pdfoutline.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/pdfoutline.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/pdfoutline.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/fo/pdfoutline.xsl Mon Apr  9 22:33:31 2007
@@ -19,31 +19,27 @@
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 xmlns:fox="http://xml.apache.org/fop/extensions"
                 version="1.0">
-
-<xsl:template match="document" mode="outline">
-      <xsl:apply-templates select="body/section" mode="outline"/>
-</xsl:template>
-
-<xsl:template match="section" mode="outline">
-  <fox:outline>
-    <xsl:attribute name="internal-destination">
-      <xsl:choose>
-        <xsl:when test="normalize-space(@id)!=''">
-          <xsl:value-of select="@id"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="generate-id()"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <fox:label>
-      <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
-      <xsl:text> </xsl:text>
-      <xsl:value-of select="normalize-space(title)"/>
-
-    </fox:label>
-    <xsl:apply-templates select="section" mode="outline"/>
-  </fox:outline>
-</xsl:template>
-
+  <xsl:template match="document" mode="outline">
+    <xsl:apply-templates select="body/section" mode="outline"/>
+  </xsl:template>
+  <xsl:template match="section" mode="outline">
+    <fox:outline>
+      <xsl:attribute name="internal-destination">
+        <xsl:choose>
+          <xsl:when test="normalize-space(@id)!=''">
+            <xsl:value-of select="@id"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="generate-id()"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:attribute>
+      <fox:label>
+        <xsl:number format="1.1.1.1.1.1.1" count="section" level="multiple"/>
+<xsl:text> </xsl:text>
+        <xsl:value-of select="normalize-space(title)"/>
+      </fox:label>
+      <xsl:apply-templates select="section" mode="outline"/>
+    </fox:outline>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/book-to-menu.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/book-to-menu.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/book-to-menu.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/book-to-menu.xsl Mon Apr  9 22:33:31 2007
@@ -23,71 +23,53 @@
 which is then merged with other HTML by site2xhtml.xsl
 
 -->
-
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-  <!-- ================================================================ -->
-  <!-- These templates SHOULD be overridden                             -->
-  <!-- ================================================================ -->
-
+<!-- ================================================================ -->
+<!-- These templates SHOULD be overridden                             -->
+<!-- ================================================================ -->
   <xsl:template name="selected">
     <xsl:value-of select="@label"/>
   </xsl:template>
-
-  <xsl:template name="unselected">
-    <a href="{@href}">
-      <xsl:if test="@description">
-        <xsl:attribute name="title">
-          <xsl:value-of select="@description"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:value-of select="@label"/>
-    </a>
+  <xsl:template name="unselected"><a href="{@href}">
+    <xsl:if test="@description">
+      <xsl:attribute name="title">
+        <xsl:value-of select="@description"/>
+      </xsl:attribute>
+    </xsl:if>
+    <xsl:value-of select="@label"/></a>
   </xsl:template>
-
   <xsl:template name="print-external">
-    <!-- Use apply-imports when overriding -->
+<!-- Use apply-imports when overriding -->
     <xsl:value-of select="@label"/>
   </xsl:template>
-
-
-  <!-- ================================================================ -->
-  <!-- These templates CAN be overridden                                -->
-  <!-- ================================================================ -->
-
-  <!-- Eg, if tab href is 'index.html#foo', this will be called when index.html
+<!-- ================================================================ -->
+<!-- These templates CAN be overridden                                -->
+<!-- ================================================================ -->
+<!-- Eg, if tab href is 'index.html#foo', this will be called when index.html
   is selected -->
   <xsl:template name="selected-anchor">
-    <!-- By default, render as unselected so that it is clickable (takes user
+<!-- By default, render as unselected so that it is clickable (takes user
     to the anchor) -->
     <xsl:call-template name="unselected"/>
   </xsl:template>
-
   <xsl:template name="unselected-anchor">
     <xsl:call-template name="unselected"/>
   </xsl:template>
-
-
   <xsl:template match="book">
     <xsl:apply-templates select="menu"/>
   </xsl:template>
-
-
   <xsl:template match="menu">
     <div class="menu">
       <xsl:call-template name="base-menu"/>
     </div>
   </xsl:template>
-
   <xsl:template match="menu-item">
-    <!-- Use apply-imports when overriding -->
-
+<!-- Use apply-imports when overriding -->
     <xsl:variable name="href-nofrag">
       <xsl:call-template name="path-nofrag">
         <xsl:with-param name="path" select="@href"/>
       </xsl:call-template>
     </xsl:variable>
-
     <xsl:variable name="node-path-noext">
       <xsl:call-template name="path-noext">
         <xsl:with-param name="path">
@@ -97,9 +79,8 @@
         </xsl:with-param>
       </xsl:call-template>
     </xsl:variable>
-
     <xsl:choose>
-      <!-- Compare with extensions stripped -->
+<!-- Compare with extensions stripped -->
       <xsl:when test="$node-path-noext = $path-nofrag-noext">
         <xsl:choose>
           <xsl:when test="contains(@href, '#')">
@@ -122,28 +103,21 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
-  <!-- ================================================================ -->
-  <!-- These templates SHOULD NOT be overridden                         -->
-  <!-- ================================================================ -->
-
-
+<!-- ================================================================ -->
+<!-- These templates SHOULD NOT be overridden                         -->
+<!-- ================================================================ -->
   <xsl:param name="path"/>
-
   <xsl:include href="pathutils.xsl"/>
-
   <xsl:variable name="filename">
     <xsl:call-template name="filename">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
   <xsl:variable name="path-nofrag">
     <xsl:call-template name="path-nofrag">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
   <xsl:variable name="path-nofrag-noext">
     <xsl:call-template name="path-noext">
       <xsl:with-param name="path">
@@ -153,34 +127,26 @@
       </xsl:with-param>
     </xsl:call-template>
   </xsl:variable>
-
   <xsl:variable name="dirname">
     <xsl:call-template name="dirname">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
   <xsl:template match="external">
-    <li>
-      <xsl:choose>
+    <li><xsl:choose>
         <xsl:when test="starts-with(@href, $path-nofrag)">
           <span class="externalSelected">
             <xsl:call-template name="print-external"/>
           </span>
         </xsl:when>
-        <xsl:otherwise>
-          <a href="{@href}" target="_blank"><xsl:value-of select="@label"/></a>
+        <xsl:otherwise><a href="{@href}" target="_blank">
+          <xsl:value-of select="@label"/></a>
         </xsl:otherwise>
-      </xsl:choose>
-    </li>
+      </xsl:choose></li>
   </xsl:template>
-
   <xsl:template match="menu-item[@type='hidden']"/>
-
   <xsl:template match="external[@type='hidden']"/>
-
   <xsl:template name="base-menu">
     <xsl:apply-templates/>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/document-to-html.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/document-to-html.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/document-to-html.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/document-to-html.xsl Mon Apr  9 22:33:31 2007
@@ -32,28 +32,23 @@
 -->
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
   <xsl:param name="dynamic-page" select="'false'"/>
   <xsl:param name="notoc"/>
   <xsl:param name="path"/>
-  <!-- <xsl:include href="split.xsl"/> -->
+<!-- <xsl:include href="split.xsl"/> -->
   <xsl:include href="dotdots.xsl"/>
   <xsl:include href="pathutils.xsl"/>
-
-  <!-- Path to site root, eg '../../' -->
+<!-- Path to site root, eg '../../' -->
   <xsl:variable name="root">
     <xsl:call-template name="dotdots">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
   <xsl:variable name="skin-img-dir" select="concat(string($root), 'themes/images')"/>
-
   <xsl:template match="/">
     <xsl:apply-templates mode="toc"/>
     <xsl:apply-templates/>
   </xsl:template>
-
   <xsl:template match="document">
     <div class="content">
       <table summary="" class="title">
@@ -84,64 +79,58 @@
       <div class="attribution">
         <xsl:apply-templates select="header/authors"/>
         <xsl:if test="header/authors and header/version">
-          <xsl:text>; </xsl:text>
+<xsl:text>; </xsl:text>
         </xsl:if>
         <xsl:apply-templates select="header/version"/>
       </div>
     </div>
   </xsl:template>
-
   <xsl:template match="body">
     <div id="skinconf-toc-page"/>
     <xsl:apply-templates/>
   </xsl:template>
-
-
-  <!-- Generate a <a name="..."> tag for an @id -->
+<!-- Generate a <a name="..."> tag for an @id -->
   <xsl:template match="@id">
-    <xsl:if test="normalize-space(.)!=''">
-      <a name="{.}"/>
+    <xsl:if test="normalize-space(.)!=''"><a name="{.}"/>
     </xsl:if>
   </xsl:template>
-
   <xsl:template match="section">
-    <!-- count the number of section in the ancestor-or-self axis to compute
+<!-- count the number of section in the ancestor-or-self axis to compute
          the title element name later on -->
-    <xsl:variable name="sectiondepth" select="count(ancestor-or-self::section)"/>
-    <a name="{generate-id()}"/>
+    <xsl:variable name="sectiondepth" select="count(ancestor-or-self::section)"/><a name="{generate-id()}"/>
     <xsl:apply-templates select="@id"/>
-    <!-- generate a title element, level 1 -> h3, level 2 -> h4 and so on... -->
+<!-- generate a title element, level 1 -> h3, level 2 -> h4 and so on... -->
     <xsl:element name="{concat('h',$sectiondepth + 2)}">
       <xsl:value-of select="title"/>
       <xsl:if test="$notoc='true' and $sectiondepth = 3">
-        <span style="float: right"><a href="#{@id}-menu">^</a></span>
+        <span style="float: right"><a href="#{@id}-menu">^</a>
+        </span>
       </xsl:if>
     </xsl:element>
-
-    <!-- Indent FAQ entry text 15 pixels -->
+<!-- Indent FAQ entry text 15 pixels -->
     <xsl:variable name="indent">
       <xsl:choose>
         <xsl:when test="$notoc='true' and $sectiondepth = 3">
-          <xsl:text>15</xsl:text>
+<xsl:text>15</xsl:text>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:text>0</xsl:text>
+<xsl:text>0</xsl:text>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:variable>
-
     <div style="margin-left: {$indent} ; border: 2px">
-          <xsl:apply-templates select="*[not(self::title)]"/>
+      <xsl:apply-templates select="*[not(self::title)]"/>
     </div>
   </xsl:template>
-
   <xsl:template match="note | warning | fixme">
     <xsl:apply-templates select="@id"/>
     <div class="{local-name()}">
       <div class="label">
         <xsl:choose>
-          <!-- FIXME: i18n Transformer here -->
-          <xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
+<!-- FIXME: i18n Transformer here -->
+          <xsl:when test="@label">
+            <xsl:value-of select="@label"/>
+          </xsl:when>
           <xsl:when test="local-name() = 'note'">Note</xsl:when>
           <xsl:when test="local-name() = 'warning'">Warning</xsl:when>
           <xsl:otherwise>Fixme (<xsl:value-of select="@author"/>)</xsl:otherwise>
@@ -152,43 +141,32 @@
       </div>
     </div>
   </xsl:template>
-
   <xsl:template match="notice">
     <div class="notice">
-    <!-- FIXME: i18n Transformer here -->
-    <xsl:text>Notice: </xsl:text>
+<!-- FIXME: i18n Transformer here -->
+<xsl:text>Notice: </xsl:text>
       <xsl:apply-templates/>
     </div>
   </xsl:template>
-
   <xsl:template match="link">
-    <xsl:apply-templates select="@id"/>
-    <a>
-      <xsl:if test="@class='jump'">
-        <xsl:attribute name="target">_top</xsl:attribute>
-      </xsl:if>
-      <xsl:if test="@class='fork'">
-        <xsl:attribute name="target">_blank</xsl:attribute>
-      </xsl:if>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </a>
+    <xsl:apply-templates select="@id"/><a>
+    <xsl:if test="@class='jump'">
+      <xsl:attribute name="target">_top</xsl:attribute>
+    </xsl:if>
+    <xsl:if test="@class='fork'">
+      <xsl:attribute name="target">_blank</xsl:attribute>
+    </xsl:if>
+    <xsl:copy-of select="@*"/>
+    <xsl:apply-templates/></a>
   </xsl:template>
-
   <xsl:template match="jump">
-    <xsl:apply-templates select="@id"/>
-    <a href="{@href}" target="_top">
-      <xsl:apply-templates/>
-    </a>
+    <xsl:apply-templates select="@id"/><a href="{@href}" target="_top">
+    <xsl:apply-templates/></a>
   </xsl:template>
-
   <xsl:template match="fork">
-    <xsl:apply-templates select="@id"/>
-    <a href="{@href}" target="_blank">
-      <xsl:apply-templates/>
-    </a>
+    <xsl:apply-templates select="@id"/><a href="{@href}" target="_blank">
+    <xsl:apply-templates/></a>
   </xsl:template>
-
   <xsl:template match="p[@xml:space='preserve']">
     <xsl:apply-templates select="@id"/>
     <div class="pre">
@@ -196,7 +174,6 @@
       <xsl:apply-templates/>
     </div>
   </xsl:template>
-
   <xsl:template match="source">
     <xsl:apply-templates select="@id"/>
     <pre class="code">
@@ -211,20 +188,15 @@
 -->
     </pre>
   </xsl:template>
-
-  <xsl:template match="anchor">
-    <a name="{@id}">
-      <xsl:copy-of select="@id"/>
-    </a>
+  <xsl:template match="anchor"><a name="{@id}">
+    <xsl:copy-of select="@id"/></a>
   </xsl:template>
-
   <xsl:template match="icon">
     <xsl:apply-templates select="@id"/>
     <img class="icon">
       <xsl:copy-of select="@height | @width | @src | @alt | @id"/>
     </img>
   </xsl:template>
-
   <xsl:template match="code">
     <xsl:apply-templates select="@id"/>
     <span class="codefrag">
@@ -232,10 +204,8 @@
       <xsl:value-of select="."/>
     </span>
   </xsl:template>
-
   <xsl:template match="figure">
     <xsl:apply-templates select="@id"/>
-    
     <div align="center">
       <xsl:copy-of select="@id"/>
       <img class="figure">
@@ -243,7 +213,6 @@
       </img>
     </div>
   </xsl:template>
-
   <xsl:template match="table">
     <xsl:apply-templates select="@id"/>
     <table cellpadding="4" cellspacing="1" class="ForrestTable">
@@ -251,26 +220,27 @@
       <xsl:apply-templates/>
     </table>
   </xsl:template>
-
   <xsl:template match="acronym/@title">
     <xsl:attribute name="title">
       <xsl:value-of select="normalize-space(.)"/>
     </xsl:attribute>
   </xsl:template>
-
   <xsl:template match="header/authors">
     <xsl:if test="person">
       <div id="content-authors">
         <xsl:for-each select="person">
           <div class="author">
-            <div class="name"><xsl:value-of select="@name"/></div>
-            <div class="email"><xsl:value-of select="@email"/></div>
+            <div class="name">
+              <xsl:value-of select="@name"/>
+            </div>
+            <div class="email">
+              <xsl:value-of select="@email"/>
+            </div>
           </div>
-		    </xsl:for-each>
+        </xsl:for-each>
       </div>
     </xsl:if>
   </xsl:template>
-
   <xsl:template match="version">
     <span class="version">
       <xsl:apply-templates select="@major"/>
@@ -287,42 +257,33 @@
       </xsl:choose>
     </span>
   </xsl:template>
-
   <xsl:template match="@major">
      v<xsl:value-of select="."/>
   </xsl:template>
-
   <xsl:template match="@minor | @fix">
-     <xsl:value-of select="concat('.',.)"/>
+    <xsl:value-of select="concat('.',.)"/>
   </xsl:template>
-
   <xsl:template match="@tag">
-     <xsl:value-of select="concat('-',.)"/>
+    <xsl:value-of select="concat('-',.)"/>
   </xsl:template>
-
   <xsl:template match="type">
     <p class="type">
-    <!-- FIXME: i18n Transformer here -->
-    <xsl:text>Type: </xsl:text>
-    <xsl:value-of select="."/>
+<!-- FIXME: i18n Transformer here -->
+<xsl:text>Type: </xsl:text>
+      <xsl:value-of select="."/>
     </p>
   </xsl:template>
-
   <xsl:template match="abstract">
     <p>
       <xsl:apply-templates/>
     </p>
   </xsl:template>
-
-  <xsl:template name="email">
-    <a>
-      <xsl:attribute name="href">
-        <xsl:value-of select="concat('mailto:',@email)"/>
-      </xsl:attribute>
-       <xsl:value-of select="@name"/>
-    </a>
+  <xsl:template name="email"><a>
+    <xsl:attribute name="href">
+      <xsl:value-of select="concat('mailto:',@email)"/>
+    </xsl:attribute>
+    <xsl:value-of select="@name"/></a>
   </xsl:template>
-
   <xsl:template name="generate-id">
     <xsl:choose>
       <xsl:when test="@id">
@@ -336,13 +297,10 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-
   <xsl:template match="node()|@*" mode="toc"/>
-
-  <!-- End of "toc" mode templates -->
-
+<!-- End of "toc" mode templates -->
   <xsl:template match="node()|@*" priority="-1">
-    <!-- id processing will create its own a-element so processing has to 
+<!-- id processing will create its own a-element so processing has to 
          happen outside the copied element 
     -->
     <xsl:apply-templates select="@id"/>
@@ -352,6 +310,4 @@
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>
-
 </xsl:stylesheet>
-

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/dotdots.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/dotdots.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/dotdots.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/dotdots.xsl Mon Apr  9 22:33:31 2007
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!--
 Contains the 'dotdots' template, which, given a path, will output a set of
 directory traversals to get back to the source directory. Handles both '/' and
@@ -37,15 +36,13 @@
 work.
 
 -->
-
 <xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
   <xsl:template name="dotdots">
     <xsl:param name="path"/>
     <xsl:variable name="dirs" select="normalize-space(translate(concat($path, 'x'), ' /\', '_  '))"/>
-    <!-- The above does the following:
+<!-- The above does the following:
        o Adds a trailing character to the path. This prevents us having to deal
          with the special case of ending with '/'
        o Translates all directory separators to ' ', and normalize spaces,
@@ -54,14 +51,13 @@
     -->
     <xsl:variable name="remainder" select="substring-after($dirs, ' ')"/>
     <xsl:if test="$remainder">
-      <xsl:text>../</xsl:text>
+<xsl:text>../</xsl:text>
       <xsl:call-template name="dotdots">
         <xsl:with-param name="path" select="translate($remainder, ' ', '/')"/>
-		<!-- Translate back to /'s because that's what the template expects. -->
+<!-- Translate back to /'s because that's what the template expects. -->
       </xsl:call-template>
     </xsl:if>
   </xsl:template>
-
 <!--
   Uncomment to test.
   Usage: saxon dotdots.xsl dotdots.xsl path='/my/test/path'
@@ -74,5 +70,4 @@
     </xsl:call-template>
   </xsl:template>
  -->
-
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl Mon Apr  9 22:33:31 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/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/renderlogo.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/renderlogo.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/renderlogo.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/renderlogo.xsl Mon Apr  9 22:33:31 2007
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!--
 A simple callable template that renders a logo for an entity. The logo will 
 be a hyperlink and may include an image (with width and height if specified)
@@ -23,11 +22,9 @@
 
 Note that text and image are mandatory parts of the template.
 -->
-
 <xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
   <xsl:template name="renderlogo">
     <xsl:param name="name"/>
     <xsl:param name="url"/>
@@ -35,29 +32,36 @@
     <xsl:param name="width"/>
     <xsl:param name="height"/>
     <xsl:param name="root"/>
-    <xsl:param name="description"/>
-    <a href="{$url}">
-      <xsl:choose>
-        <xsl:when test="$logo and not($logo = '')">
-          <img alt="{$name}" class="logoImage">
-            <xsl:attribute name="src">
-	      <xsl:if test="not(starts-with($logo, 'http://'))"><xsl:value-of select="$root"/></xsl:if>
-              <xsl:value-of select="$logo"/>
-            </xsl:attribute>
-            <xsl:if test="$width">
-              <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
-            </xsl:if>
-            <xsl:if test="$height">
-              <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
+    <xsl:param name="description"/><a href="{$url}">
+    <xsl:choose>
+      <xsl:when test="$logo and not($logo = '')">
+        <img alt="{$name}" class="logoImage">
+          <xsl:attribute name="src">
+            <xsl:if test="not(starts-with($logo, 'http://'))">
+              <xsl:value-of select="$root"/>
             </xsl:if>
-            <xsl:if test="$description">
-              <xsl:attribute name="title"><xsl:value-of select="$description"/></xsl:attribute>
-            </xsl:if>
-	  </img>
-        </xsl:when>
-        <xsl:otherwise><xsl:value-of select="$name"/></xsl:otherwise>
-      </xsl:choose>
-    </a>
+            <xsl:value-of select="$logo"/>
+          </xsl:attribute>
+          <xsl:if test="$width">
+            <xsl:attribute name="width">
+              <xsl:value-of select="$width"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$height">
+            <xsl:attribute name="height">
+              <xsl:value-of select="$height"/>
+            </xsl:attribute>
+          </xsl:if>
+          <xsl:if test="$description">
+            <xsl:attribute name="title">
+              <xsl:value-of select="$description"/>
+            </xsl:attribute>
+          </xsl:if>
+        </img>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$name"/>
+      </xsl:otherwise>
+    </xsl:choose></a>
   </xsl:template>
-
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/site-to-xhtml.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/site-to-xhtml.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/site-to-xhtml.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/site-to-xhtml.xsl Mon Apr  9 22:33:31 2007
@@ -33,34 +33,27 @@
 </site>
 
 -->
-
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
   <xsl:param name="path"/>
-
-  <!-- Path (..'s) to the root directory -->
+<!-- Path (..'s) to the root directory -->
   <xsl:variable name="root">
     <xsl:call-template name="dotdots">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
-  <!-- Source filename (eg 'foo.xml') of current page -->
+<!-- Source filename (eg 'foo.xml') of current page -->
   <xsl:variable name="filename">
     <xsl:call-template name="filename">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
-  <!-- Path of Lucene search results page (relative to $root) -->
+<!-- Path of Lucene search results page (relative to $root) -->
   <xsl:param name="lucene-search" select="'lucene-search.html'"/>
-
   <xsl:variable name="filename-noext">
     <xsl:call-template name="filename-noext">
       <xsl:with-param name="path" select="$path"/>
     </xsl:call-template>
   </xsl:variable>
-
 <!--  <xsl:template match="site">
     <html>
       <head>
@@ -339,5 +332,4 @@
       <xsl:apply-templates/>
     </xsl:copy>
   </xsl:template>-->
-
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/split.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/split.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/split.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/split.xsl Mon Apr  9 22:33:31 2007
@@ -16,14 +16,12 @@
   limitations under the License.
 -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-
 <!--
  This stylesheet was taken from the XSLT FAQ http://www.dpawson.co.uk/xsl/
  
  Comments and adaption to be used without normalize-space()
   by forrest-dev@xml.apache.org
---> 
-
+-->
 <!--
   Input:
 
@@ -70,89 +68,73 @@
 
 
 -->
-
- <xsl:template match="/body">
-   <body>
-    <xsl:call-template name="format">
-    <xsl:with-param select="source" name="txt" /> 
-     <xsl:with-param name="width">40</xsl:with-param> 
-     </xsl:call-template>
-  </body>
+  <xsl:template match="/body">
+    <body>
+      <xsl:call-template name="format">
+        <xsl:with-param select="source" name="txt" />
+        <xsl:with-param name="width">40</xsl:with-param>
+      </xsl:call-template>
+    </body>
   </xsl:template>
-  
   <xsl:template name="format">
-    <xsl:param name="txt" /> 
-    <xsl:param name="width" /> 
-
-    <!-- if there is still text left -->
+    <xsl:param name="txt" />
+    <xsl:param name="width" />
+<!-- if there is still text left -->
     <xsl:if test="$txt">
-    
-    <xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
-    
-    <xsl:choose>
-      <xsl:when test="contains($pretxt, '&#xA;')">
-        <xsl:value-of select="substring-before($pretxt, '&#xA;')"/>
-        <xsl:text>&#xA;</xsl:text> 
-        <xsl:call-template name="format">
-          <xsl:with-param name="txt" select="substring-after($txt,'&#xA;')"/>
-          <xsl:with-param select="$width" name="width" />           
-        </xsl:call-template>
-      </xsl:when>
-      
-      <xsl:otherwise>
-      <!-- get the width at which to break-->
-      <xsl:variable name="real-width">
-        <xsl:call-template name="tune-width">
-          <xsl:with-param select="$txt" name="txt" /> 
-          <xsl:with-param select="$width" name="width" /> 
-          <xsl:with-param select="$width" name="def" /> 
-        </xsl:call-template>
-      </xsl:variable>
-
-      <!-- output the first part of the broken string -->
-      <xsl:value-of select="substring($txt, 1, $real-width)" /> 
-
-      <!-- output a newline -->
-      <xsl:text>&#xA;</xsl:text> 
-
-      <!-- call itself with the remaining part of the text -->
-      <xsl:call-template name="format">
-       <xsl:with-param select="substring($txt,$real-width + 1)" name="txt" /> 
-       <xsl:with-param select="$width" name="width" /> 
-      </xsl:call-template>
-      </xsl:otherwise>
+      <xsl:variable name = "pretxt" select = "substring($txt,0, $width)" />
+      <xsl:choose>
+        <xsl:when test="contains($pretxt, '&#xA;')">
+          <xsl:value-of select="substring-before($pretxt, '&#xA;')"/>
+<xsl:text>&#xA;</xsl:text>
+          <xsl:call-template name="format">
+            <xsl:with-param name="txt" select="substring-after($txt,'&#xA;')"/>
+            <xsl:with-param select="$width" name="width" />
+          </xsl:call-template>
+        </xsl:when>
+        <xsl:otherwise>
+<!-- get the width at which to break-->
+          <xsl:variable name="real-width">
+            <xsl:call-template name="tune-width">
+              <xsl:with-param select="$txt" name="txt" />
+              <xsl:with-param select="$width" name="width" />
+              <xsl:with-param select="$width" name="def" />
+            </xsl:call-template>
+          </xsl:variable>
+<!-- output the first part of the broken string -->
+          <xsl:value-of select="substring($txt, 1, $real-width)" />
+<!-- output a newline -->
+<xsl:text>&#xA;</xsl:text>
+<!-- call itself with the remaining part of the text -->
+          <xsl:call-template name="format">
+            <xsl:with-param select="substring($txt,$real-width + 1)" name="txt" />
+            <xsl:with-param select="$width" name="width" />
+          </xsl:call-template>
+        </xsl:otherwise>
       </xsl:choose>
     </xsl:if>
   </xsl:template>
-  
-   
-  <!-- used by template "format", it calculates the width at the given def 
+<!-- used by template "format", it calculates the width at the given def 
        
        It starts at def length and comes back till it finds a space -->
   <xsl:template name="tune-width">
-    <xsl:param name="txt" /> 
-    <xsl:param name="width" /> 
-    <xsl:param name="def" /> 
-
+    <xsl:param name="txt" />
+    <xsl:param name="width" />
+    <xsl:param name="def" />
     <xsl:choose>
       <xsl:when test="$width = 0">
-       <xsl:value-of select="$def" /> 
+        <xsl:value-of select="$def" />
       </xsl:when>
-                 
       <xsl:when test="substring($txt, $width, 1 ) = ' '">
-          <xsl:value-of select="$width" /> 
-       </xsl:when>
-       
-       <xsl:otherwise>
-         <!-- otherwise need to tune again, trying with $width - 1 -->
-         <xsl:call-template name="tune-width">
-           <xsl:with-param select="$width - 1" name="width" /> 
-           <xsl:with-param select="$txt" name="txt" /> 
-           <xsl:with-param select="$def" name="def" /> 
-         </xsl:call-template>
-       </xsl:otherwise>
-     </xsl:choose>
-
+        <xsl:value-of select="$width" />
+      </xsl:when>
+      <xsl:otherwise>
+<!-- otherwise need to tune again, trying with $width - 1 -->
+        <xsl:call-template name="tune-width">
+          <xsl:with-param select="$width - 1" name="width" />
+          <xsl:with-param select="$txt" name="txt" />
+          <xsl:with-param select="$def" name="def" />
+        </xsl:call-template>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
-
-  </xsl:stylesheet>
+</xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/strip_namespaces.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/strip_namespaces.xsl?view=diff&rev=527037&r1=527036&r2=527037
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/strip_namespaces.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/strip_namespaces.xsl Mon Apr  9 22:33:31 2007
@@ -16,23 +16,23 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <!-- Fixes FOR-555. This might not be the best solution though, but it sure works -->
+<!-- Fixes FOR-555. This might not be the best solution though, but it sure works -->
   <xsl:template match="comment()">
     <xsl:copy>
       <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
     </xsl:copy>
   </xsl:template>
-    <xsl:template match="*">
-      <!-- remove element prefix (if any) -->
-      <xsl:element name="{local-name()}">
-        <!-- process attributes -->
-        <xsl:for-each select="@*">
-          <!-- remove attribute prefix (if any) -->
-          <xsl:attribute name="{local-name()}">
-            <xsl:value-of select="."/>
-          </xsl:attribute>
-        </xsl:for-each>
-        <xsl:apply-templates/>
-      </xsl:element>
+  <xsl:template match="*">
+<!-- remove element prefix (if any) -->
+    <xsl:element name="{local-name()}">
+<!-- process attributes -->
+      <xsl:for-each select="@*">
+<!-- remove attribute prefix (if any) -->
+        <xsl:attribute name="{local-name()}">
+          <xsl:value-of select="."/>
+        </xsl:attribute>
+      </xsl:for-each>
+      <xsl:apply-templates/>
+    </xsl:element>
   </xsl:template>
 </xsl:stylesheet>



Mime
View raw message