forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r526429 - in /forrest/trunk/whiteboard: charts/ convert/anakiaNmaven/
Date Sat, 07 Apr 2007 13:31:43 GMT
Author: crossley
Date: Sat Apr  7 06:31:42 2007
New Revision: 526429

URL: http://svn.apache.org/viewvc?view=rev&rev=526429
Log:
Whitespace changes only. Using xmlformat. Issue: FOR-644

Modified:
    forrest/trunk/whiteboard/charts/GUMP-graph.xsl
    forrest/trunk/whiteboard/charts/GUMP-sampledata.xml
    forrest/trunk/whiteboard/charts/build.xml
    forrest/trunk/whiteboard/charts/graph.xsl
    forrest/trunk/whiteboard/charts/sampledata.xml
    forrest/trunk/whiteboard/convert/anakiaNmaven/anakiaNmaven2document11.xsl
    forrest/trunk/whiteboard/convert/anakiaNmaven/build.xml
    forrest/trunk/whiteboard/convert/anakiaNmaven/projectNnavigation2book.xsl
    forrest/trunk/whiteboard/convert/anakiaNmaven/tabs.xml

Modified: forrest/trunk/whiteboard/charts/GUMP-graph.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/charts/GUMP-graph.xsl?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/charts/GUMP-graph.xsl (original)
+++ forrest/trunk/whiteboard/charts/GUMP-graph.xsl Sat Apr  7 06:31:42 2007
@@ -15,29 +15,22 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xlink="http://www.w3.org/1999/xlink">
-
-<xsl:variable name="graph_width">500</xsl:variable>
-<xsl:variable name="graph_height">150</xsl:variable>
-<xsl:variable name="graph_margin">50</xsl:variable>
-
-<xsl:variable name="num_points" select="count(/graph/data/datum)"/>
-
-<xsl:variable name="x_scale" select="$graph_width div ($num_points - 1)"/>
-<xsl:variable name="y_scale" select="$graph_height div 100"/>
-
-<xsl:template match="graph">
-  <svg
+  <xsl:variable name="graph_width">500</xsl:variable>
+  <xsl:variable name="graph_height">150</xsl:variable>
+  <xsl:variable name="graph_margin">50</xsl:variable>
+  <xsl:variable name="num_points" select="count(/graph/data/datum)"/>
+  <xsl:variable name="x_scale" select="$graph_width div ($num_points - 1)"/>
+  <xsl:variable name="y_scale" select="$graph_height div 100"/>
+  <xsl:template match="graph">
+    <svg
     width="{$graph_margin + $graph_width + $graph_margin}"
     height="{$graph_margin + $graph_height + $graph_margin}">
-
-    <title>Forrest GUMP Graphing</title>
-
-    <style type="text/css">
+      <title>Forrest GUMP Graphing</title>
+      <style type="text/css">
       text {
         font-family: 'Verdana';
         font-size: 10px;
@@ -62,57 +55,50 @@
       #horizontalRuler {
         fill: #000088; }
     </style>
-
-    <defs>
-      <line id="week" class="tick" x1="0" y1="0" x2="0" y2="3"/>
-      <line id="month" class="tick" x1="0" y1="0" x2="0" y2="5"/>
-    </defs>
-
-    <xsl:apply-templates select="data"/>
-
-  </svg>
-</xsl:template>
-
-<xsl:template match="data">
-  <g transform="translate({$graph_margin} {$graph_margin})">
-
-    <rect id="border" x="0" y="0" width="{$graph_width}" height="{$graph_height}"/>
-
-    <g id="graph" transform="matrix(1 0 0 -1 0 {$graph_height})">
-      <!-- Those projects which failed due to a dependancy problem -->
-      <xsl:variable name="dependancy">
-        <xsl:value-of select="$graph_width"/><xsl:text>,0 0,0</xsl:text>
-        <xsl:for-each select="datum">
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="(position() - 1) * $x_scale"/>
-          <xsl:text>,</xsl:text>
-          <xsl:value-of select="(@dependancy + @failed) * ($graph_height div (@passed
+ @dependancy + @failed))"/>
-        </xsl:for-each>
-      </xsl:variable>
-      <polygon id="graph-dependancy" points="{$dependancy}"/>
-
-      <!-- Those projects which failed to compile -->
-      <xsl:variable name="failed">
-        <xsl:value-of select="$graph_width"/><xsl:text>,0 0,0</xsl:text>
-        <xsl:for-each select="datum">
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="(position() - 1) * $x_scale"/>
-          <xsl:text>,</xsl:text>
-          <xsl:value-of select="@failed * ($graph_height div (@passed + @dependancy +
@failed))"/>
-        </xsl:for-each>
-      </xsl:variable>
-      <polygon id="graph-failed" points="{$failed}"/>
-    </g>
-
-    <g id="horizontalRuler">
-      <g transform="matrix(1 0 0 -1 0 {$graph_height - 2})">
-        <xsl:for-each select="datum">
-          <use x="{(position() -1) * $x_scale}" xlink:href="#week"/>
-        </xsl:for-each>
+      <defs>
+        <line id="week" class="tick" x1="0" y1="0" x2="0" y2="3"/>
+        <line id="month" class="tick" x1="0" y1="0" x2="0" y2="5"/>
+      </defs>
+      <xsl:apply-templates select="data"/>
+    </svg>
+  </xsl:template>
+  <xsl:template match="data">
+    <g transform="translate({$graph_margin} {$graph_margin})">
+      <rect id="border" x="0" y="0" width="{$graph_width}" height="{$graph_height}"/>
+      <g id="graph" transform="matrix(1 0 0 -1 0 {$graph_height})">
+<!-- Those projects which failed due to a dependancy problem -->
+        <xsl:variable name="dependancy">
+          <xsl:value-of select="$graph_width"/>
+          <xsl:text>,0 0,0</xsl:text>
+          <xsl:for-each select="datum">
+            <xsl:text></xsl:text>
+            <xsl:value-of select="(position() - 1) * $x_scale"/>
+            <xsl:text>,</xsl:text>
+            <xsl:value-of select="(@dependancy + @failed) * ($graph_height div (@passed
+ @dependancy + @failed))"/>
+          </xsl:for-each>
+        </xsl:variable>
+        <polygon id="graph-dependancy" points="{$dependancy}"/>
+<!-- Those projects which failed to compile -->
+        <xsl:variable name="failed">
+          <xsl:value-of select="$graph_width"/>
+          <xsl:text>,0 0,0</xsl:text>
+          <xsl:for-each select="datum">
+            <xsl:text></xsl:text>
+            <xsl:value-of select="(position() - 1) * $x_scale"/>
+            <xsl:text>,</xsl:text>
+            <xsl:value-of select="@failed * ($graph_height div (@passed + @dependancy
+ @failed))"/>
+          </xsl:for-each>
+        </xsl:variable>
+        <polygon id="graph-failed" points="{$failed}"/>
+      </g>
+      <g id="horizontalRuler">
+        <g transform="matrix(1 0 0 -1 0 {$graph_height - 2})">
+          <xsl:for-each select="datum">
+            <use x="{(position() -1) * $x_scale}" xlink:href="#week"/>
+          </xsl:for-each>
+        </g>
+<!-- Question: how do we 'translate' weeks into a month? -->
       </g>
-      <!-- Question: how do we 'translate' weeks into a month? -->
     </g>
-  </g>
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
+  </xsl:template>
+</xsl:stylesheet>

Modified: forrest/trunk/whiteboard/charts/GUMP-sampledata.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/charts/GUMP-sampledata.xml?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/charts/GUMP-sampledata.xml (original)
+++ forrest/trunk/whiteboard/charts/GUMP-sampledata.xml Sat Apr  7 06:31:42 2007
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <graph>
   <data>
     <datum week="2001-23" passed="100" dependancy="0" failed="0"/>
@@ -31,6 +30,6 @@
     <datum week="2001-33" passed="100" dependancy="1" failed="1"/>
     <datum week="2001-34" passed="100" dependancy="2" failed="23"/>
     <datum week="2001-35" passed="100" dependancy="4" failed="3"/>
-    <datum week="2001-36" passed="100" dependancy="4" failed="2"/>   
+    <datum week="2001-36" passed="100" dependancy="4" failed="2"/>
   </data>
 </graph>

Modified: forrest/trunk/whiteboard/charts/build.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/charts/build.xml?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/charts/build.xml (original)
+++ forrest/trunk/whiteboard/charts/build.xml Sat Apr  7 06:31:42 2007
@@ -17,14 +17,13 @@
 -->
 <project default="init" basedir="." name="charts">
   <target name="init" >
-   <xslt force="true" in="sampledata.xml" out="sample.svg" style="graph.xsl" >
-     <outputproperty name="indent" value="yes"/>
-   </xslt>
+    <xslt force="true" in="sampledata.xml" out="sample.svg" style="graph.xsl" >
+      <outputproperty name="indent" value="yes"/>
+    </xslt>
   </target>
   <target name="gump" >
-   <xslt force="true" in="GUMP-sampledata.xml" out="GUMP-sample.svg" style="GUMP-graph.xsl"
>
-     <outputproperty name="indent" value="yes"/>
-   </xslt>
+    <xslt force="true" in="GUMP-sampledata.xml" out="GUMP-sample.svg" style="GUMP-graph.xsl"
>
+      <outputproperty name="indent" value="yes"/>
+    </xslt>
   </target>
-
 </project>

Modified: forrest/trunk/whiteboard/charts/graph.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/charts/graph.xsl?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/charts/graph.xsl (original)
+++ forrest/trunk/whiteboard/charts/graph.xsl Sat Apr  7 06:31:42 2007
@@ -15,43 +15,38 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xlink="http://www.w3.org/1999/xlink">
-
-<xsl:variable name="graph_width">500</xsl:variable>
-<xsl:variable name="graph_height">150</xsl:variable>
-<xsl:variable name="graph_margin">50</xsl:variable>
-
-<xsl:variable name="max_point">
-  <xsl:for-each select="/graph/data/datum">
-    <xsl:sort order="descending" data-type="number" select="@value"/>
-    <xsl:if test="position() = 1"><xsl:value-of select="@value"/></xsl:if>
-  </xsl:for-each>
-</xsl:variable>
-
-<xsl:variable name="min_point">
-  <xsl:for-each select="/graph/data/datum">
-    <xsl:sort order="ascending" data-type="number" select="@value"/>
-    <xsl:if test="position() = 1"><xsl:value-of select="@value"/></xsl:if>
-  </xsl:for-each>
-</xsl:variable>
-
-<xsl:variable name="num_points" select="count(/graph/data/datum)"/>
-
-<xsl:variable name="x_scale" select="$graph_width div ($num_points - 1)"/>
-<xsl:variable name="y_scale" select="$graph_height div $max_point * 0.95"/>
-
-<xsl:template match="graph">
-  <svg
+  <xsl:variable name="graph_width">500</xsl:variable>
+  <xsl:variable name="graph_height">150</xsl:variable>
+  <xsl:variable name="graph_margin">50</xsl:variable>
+  <xsl:variable name="max_point">
+    <xsl:for-each select="/graph/data/datum">
+      <xsl:sort order="descending" data-type="number" select="@value"/>
+      <xsl:if test="position() = 1">
+        <xsl:value-of select="@value"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:variable name="min_point">
+    <xsl:for-each select="/graph/data/datum">
+      <xsl:sort order="ascending" data-type="number" select="@value"/>
+      <xsl:if test="position() = 1">
+        <xsl:value-of select="@value"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:variable name="num_points" select="count(/graph/data/datum)"/>
+  <xsl:variable name="x_scale" select="$graph_width div ($num_points - 1)"/>
+  <xsl:variable name="y_scale" select="$graph_height div $max_point * 0.95"/>
+  <xsl:template match="graph">
+    <svg
     width="{$graph_margin + $graph_width + $graph_margin}"
     height="{$graph_margin + $graph_height + $graph_margin}">
-
-    <title>Forrest Graphing</title>
-
-    <style type="text/css">
+      <title>Forrest Graphing</title>
+      <style type="text/css">
       text {
         font-family: 'Verdana';
         font-size: 10px;
@@ -78,86 +73,91 @@
       #horizontalRuler {
         fill: #000088; }
     </style>
-
-    <defs>
-      <line id="week" class="tick" x1="0" y1="0" x2="0" y2="3"/>
-      <line id="month" class="tick" x1="0" y1="0" x2="0" y2="5"/>
-      <path id="down-triangle" d="M0,0 l-3,-4.5 l6,0 z"/>		
-      <path id="up-triangle" d="M0,0 l-3,4.5 l6,0 z"/>		
-      <path id="left-triangle" d="M0,0 l4.5,-3 l0,6 z"/>		
-      <path id="right-triangle" d="M0,0 l-4.5,-3 l0,6 z"/>		
-    </defs>
-
-    <xsl:apply-templates select="data"/>
-    <xsl:apply-templates select="events"/>
-
-  </svg>
-</xsl:template>
-
-<xsl:template match="data">
-  <g transform="translate({$graph_margin} {$graph_margin})">
-    <g id="graph" transform="matrix(1 0 0 -1 0 {$graph_height})">
-      <xsl:variable name="points">
-        <xsl:value-of select="$graph_width"/><xsl:text>,0 0,0</xsl:text>
-        <xsl:for-each select="datum">
-          <xsl:text> </xsl:text>
-          <xsl:value-of select="(position() - 1) * $x_scale"/>
-          <xsl:text>,</xsl:text>
-          <xsl:value-of select="@value * $y_scale"/>
-        </xsl:for-each>
-      </xsl:variable>
-      <polygon points="{$points}"/>
-      <!-- max -->
-      <g transform="translate(0 {$max_point * $y_scale})">
-        <use xlink:href="#right-triangle"/>
-        <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)"><xsl:value-of
select="$max_point"/></text>
-      </g>
-      <!-- min -->
-      <g transform="translate(0 {$min_point * $y_scale})">
-        <use xlink:href="#right-triangle"/>
-        <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)"><xsl:value-of
select="$min_point"/></text>
-      </g>
-      <!-- average -->
-      <g transform="translate(0 {sum(datum/@value) div $num_points * $y_scale})">
-        <use xlink:href="#right-triangle"/>
-        <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)"><xsl:value-of
select="ceiling(sum(datum/@value) div $num_points)"/></text>
-      </g>
-      <!-- current -->
-      <g transform="translate({$graph_width} {datum[position() = last()]/@value * $y_scale})">
-        <use xlink:href="#left-triangle"/>
-        <text x="7" y="4" transform="matrix(1 0 0 -1 0 0)"><xsl:value-of select="datum[position()
= last()]/@value"/></text>
+      <defs>
+        <line id="week" class="tick" x1="0" y1="0" x2="0" y2="3"/>
+        <line id="month" class="tick" x1="0" y1="0" x2="0" y2="5"/>
+        <path id="down-triangle" d="M0,0 l-3,-4.5 l6,0 z"/>
+        <path id="up-triangle" d="M0,0 l-3,4.5 l6,0 z"/>
+        <path id="left-triangle" d="M0,0 l4.5,-3 l0,6 z"/>
+        <path id="right-triangle" d="M0,0 l-4.5,-3 l0,6 z"/>
+      </defs>
+      <xsl:apply-templates select="data"/>
+      <xsl:apply-templates select="events"/>
+    </svg>
+  </xsl:template>
+  <xsl:template match="data">
+    <g transform="translate({$graph_margin} {$graph_margin})">
+      <g id="graph" transform="matrix(1 0 0 -1 0 {$graph_height})">
+        <xsl:variable name="points">
+          <xsl:value-of select="$graph_width"/>
+          <xsl:text>,0 0,0</xsl:text>
+          <xsl:for-each select="datum">
+            <xsl:text></xsl:text>
+            <xsl:value-of select="(position() - 1) * $x_scale"/>
+            <xsl:text>,</xsl:text>
+            <xsl:value-of select="@value * $y_scale"/>
+          </xsl:for-each>
+        </xsl:variable>
+        <polygon points="{$points}"/>
+<!-- max -->
+        <g transform="translate(0 {$max_point * $y_scale})">
+          <use xlink:href="#right-triangle"/>
+          <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)">
+            <xsl:value-of select="$max_point"/>
+          </text>
+        </g>
+<!-- min -->
+        <g transform="translate(0 {$min_point * $y_scale})">
+          <use xlink:href="#right-triangle"/>
+          <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)">
+            <xsl:value-of select="$min_point"/>
+          </text>
+        </g>
+<!-- average -->
+        <g transform="translate(0 {sum(datum/@value) div $num_points * $y_scale})">
+          <use xlink:href="#right-triangle"/>
+          <text text-anchor="end" x="-7" y="4" transform="matrix(1 0 0 -1 0 0)">
+            <xsl:value-of select="ceiling(sum(datum/@value) div $num_points)"/>
+          </text>
+        </g>
+<!-- current -->
+        <g transform="translate({$graph_width} {datum[position() = last()]/@value * $y_scale})">
+          <use xlink:href="#left-triangle"/>
+          <text x="7" y="4" transform="matrix(1 0 0 -1 0 0)">
+            <xsl:value-of select="datum[position() = last()]/@value"/>
+          </text>
+        </g>
       </g>
-    </g>
-
-    <rect id="border" x="0" y="0" width="{$graph_width}" height="{$graph_height}"/>
-
-    <g id="horizontalRuler">
-      <g transform="matrix(1 0 0 -1 0 {$graph_height - 2})">
-        <xsl:for-each select="datum">
-          <use x="{(position() -1) * $x_scale}" xlink:href="#week"/>
-        </xsl:for-each>
+      <rect id="border" x="0" y="0" width="{$graph_width}" height="{$graph_height}"/>
+      <g id="horizontalRuler">
+        <g transform="matrix(1 0 0 -1 0 {$graph_height - 2})">
+          <xsl:for-each select="datum">
+            <use x="{(position() -1) * $x_scale}" xlink:href="#week"/>
+          </xsl:for-each>
+        </g>
+<!-- Question: how do we 'translate' weeks into a month? -->
       </g>
-      <!-- Question: how do we 'translate' weeks into a month? -->
     </g>
-  </g>
-</xsl:template>
-
-<xsl:template match="events">
-  <g id="events" transform="translate({$graph_margin})">
-    <!-- Question: if the text (or date) for two (or more!) events overlap, how
+  </xsl:template>
+  <xsl:template match="events">
+    <g id="events" transform="translate({$graph_margin})">
+<!-- Question: if the text (or date) for two (or more!) events overlap, how
                    do we compensate (ie shift up/down)? -->
-    <xsl:for-each select="event">
-      <xsl:if test="/graph/data/datum[@week = current()/@week]">
-        <g transform="translate({(count(/graph/data/datum[@week = current()/@week]/preceding-sibling::*))
* $x_scale})">
-          <use x="0" y="{$graph_margin}" xlink:href="#down-triangle"/>
-          <use x="0" y="{$graph_margin + $graph_height}" xlink:href="#up-triangle"/>
-          <line x1="0" y1="{$graph_margin}" x2="0" y2="{$graph_margin + $graph_height}"/>
-          <text x="0" y="{$graph_margin - 10}"><xsl:value-of select="@comment"/></text>
-          <text x="0" y="{$graph_margin + $graph_height + 15}"><xsl:value-of select="@date"/></text>
-        </g>
-      </xsl:if>
-    </xsl:for-each>
-  </g>
-</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
+      <xsl:for-each select="event">
+        <xsl:if test="/graph/data/datum[@week = current()/@week]">
+          <g transform="translate({(count(/graph/data/datum[@week = current()/@week]/preceding-sibling::*))
* $x_scale})">
+            <use x="0" y="{$graph_margin}" xlink:href="#down-triangle"/>
+            <use x="0" y="{$graph_margin + $graph_height}" xlink:href="#up-triangle"/>
+            <line x1="0" y1="{$graph_margin}" x2="0" y2="{$graph_margin + $graph_height}"/>
+            <text x="0" y="{$graph_margin - 10}">
+              <xsl:value-of select="@comment"/>
+            </text>
+            <text x="0" y="{$graph_margin + $graph_height + 15}">
+              <xsl:value-of select="@date"/>
+            </text>
+          </g>
+        </xsl:if>
+      </xsl:for-each>
+    </g>
+  </xsl:template>
+</xsl:stylesheet>

Modified: forrest/trunk/whiteboard/charts/sampledata.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/charts/sampledata.xml?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/charts/sampledata.xml (original)
+++ forrest/trunk/whiteboard/charts/sampledata.xml Sat Apr  7 06:31:42 2007
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <graph>
   <data group="Downloads">
     <datum week="200123" value="100"/>
@@ -31,7 +30,7 @@
     <datum week="200133" value="200"/>
     <datum week="200134" value="400"/>
     <datum week="200135" value="100"/>
-    <datum week="200136" value="200"/>   
+    <datum week="200136" value="200"/>
   </data>
   <events>
     <event week="200126" date="29 Aug 2001" comment="2.1"/>

Modified: forrest/trunk/whiteboard/convert/anakiaNmaven/anakiaNmaven2document11.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/convert/anakiaNmaven/anakiaNmaven2document11.xsl?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/convert/anakiaNmaven/anakiaNmaven2document11.xsl (original)
+++ forrest/trunk/whiteboard/convert/anakiaNmaven/anakiaNmaven2document11.xsl Sat Apr  7 06:31:42
2007
@@ -15,233 +15,206 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-    <xsl:output method = "xml"  
+  <xsl:output method = "xml"  
                 version="1.0"
                 omit-xml-declaration="no" 
                 indent="no"
                 encoding="ISO-8859-1"
                 doctype-system="document-v11.dtd"
                 doctype-public="-//APACHE//DTD Documentation V1.1//EN" />
-
-    <xsl:template match="/">
-     <xsl:choose>
-   	   <xsl:when test="name(child::node())='document'">
-         <xsl:apply-templates/>
-	   </xsl:when>
-  
-	   <xsl:otherwise>
-	     <document>
-	      <header><title>Error in conversion</title></header>
-	      <body>
-	       <warning>This file is not in anakia format, please convert manually.</warning>
-	      </body>
-	     </document>
-	   </xsl:otherwise>
-     </xsl:choose>
-    </xsl:template>
-           
-    <xsl:template match="document">
+  <xsl:template match="/">
+    <xsl:choose>
+      <xsl:when test="name(child::node())='document'">
+        <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 anakia format, please convert manually.
+            </warning>
+          </body>
         </document>
-    </xsl:template>
-    
-    <!-- properties to header -->
-    <xsl:template match="properties">
-        <header>
-            <xsl:apply-templates/>
-            <authors>
-              <xsl:for-each select = "author">
-                <person email="{@email}" name="{.}"/>
-              </xsl:for-each>
-            </authors>
-        </header>
-    </xsl:template>
-
-    <xsl:template match="P|p">
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  <xsl:template match="document">
+    <document>
+      <xsl:apply-templates/>
+    </document>
+  </xsl:template>
+<!-- properties to header -->
+  <xsl:template match="properties">
+    <header>
+      <xsl:apply-templates/>
+      <authors>
+        <xsl:for-each select = "author">
+          <person email="{@email}" name="{.}"/>
+        </xsl:for-each>
+      </authors>
+    </header>
+  </xsl:template>
+  <xsl:template match="P|p">
+    <p>
+      <xsl:apply-templates/>
+    </p>
+  </xsl:template>
+  <xsl:template match="figure">
+    <figure alt="{title}" src= "{graphic/@fileref}" />
+  </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="source|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>
+<!-- person to author -->
+  <xsl:template match="author"/>
+  <xsl:template match="section|s1|s2|s3|s4|s5|s6">
+    <section>
+      <title><xsl:value-of select="@name" /></title>
+      <xsl:apply-templates/>
+    </section>
+  </xsl:template>
+  <xsl:template match="subsection">
+    <section>
+      <title><xsl:value-of select="@name" /></title>
+      <xsl:apply-templates/>
+    </section>
+  </xsl:template>
+<!-- convert a to link -->
+  <xsl:template match="a">
+    <xsl:if test="@name">
+<!-- Attach an id to the current node -->
+      <xsl:attribute name="id">
+        <xsl:value-of select="translate(@name, ' $', '__')"/>
+      </xsl:attribute>
+      <xsl:apply-templates/>
+    </xsl:if>
+    <xsl:if test="@href"><link href="{@href}">
+      <xsl:apply-templates/></link>
+    </xsl:if>
+  </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:template>
-    
-    <xsl:template match="figure">
-        <figure alt="{title}" src= "{graphic/@fileref}" />
-    </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="source|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>
-
-    
-    <!-- person to author -->
-    <xsl:template match="author"/>
-    
-    <xsl:template match="section|s1|s2|s3|s4|s5|s6">
-        <section>
-          <title><xsl:value-of select="@name" /></title>
-            <xsl:apply-templates/>
-        </section>
-    </xsl:template>
-
-  
-    <xsl:template match="subsection">
-        <section>
-          <title><xsl:value-of select="@name" /></title>
-            <xsl:apply-templates/>
-        </section>
-    </xsl:template>
-    
-    <!-- convert a to link -->
-    <xsl:template match="a">
-      <xsl:if test="@name">
-        <!-- Attach an id to the current node -->
-        <xsl:attribute name="id"><xsl:value-of select="translate(@name, ' $', '__')"/></xsl:attribute>
-        <xsl:apply-templates/>
-      </xsl:if>
-      <xsl:if test="@href">
-        <link href="{@href}">
+      </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/>
-        </link>
-      </xsl:if>
-    </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="table">
-      <table>
-            <xsl:apply-templates select="node()"/>
-      </table>
-    </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">
-      <xsl:apply-templates/>
-    </xsl:template>
-
-    <xsl:template match="h1|h2|h3|h4">
-     <xsl:comment> -ATTENTION- THIS IS A SECTION, PLEASE ENCLOSE THE SECTION CONTENTS...
-ATTENTION- </xsl:comment>
-     <section><title><xsl:apply-templates/></title> <xsl:comment>...
HERE! :-)</xsl:comment></section>
-    </xsl:template>
-                
-    <xsl:template match="node()|@*" priority="-1">
-        <xsl:copy>
-            <xsl:apply-templates select="node()|@*"/>
-        </xsl:copy>
-    </xsl:template>
-
-
+        </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="table">
+    <table>
+      <xsl:apply-templates select="node()"/>
+    </table>
+  </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">
+    <xsl:apply-templates/>
+  </xsl:template>
+  <xsl:template match="h1|h2|h3|h4">
+    <xsl:comment> -ATTENTION- THIS IS A SECTION, PLEASE ENCLOSE THE SECTION CONTENTS...
-ATTENTION- </xsl:comment>
+    <section>
+      <title><xsl:apply-templates/></title>
+      <xsl:comment>... HERE! :-)</xsl:comment>
+    </section>
+  </xsl:template>
+  <xsl:template match="node()|@*" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="node()|@*"/>
+    </xsl:copy>
+  </xsl:template>
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/convert/anakiaNmaven/build.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/convert/anakiaNmaven/build.xml?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/convert/anakiaNmaven/build.xml (original)
+++ forrest/trunk/whiteboard/convert/anakiaNmaven/build.xml Sat Apr  7 06:31:42 2007
@@ -15,81 +15,64 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <project name="Forrest Converter" default="convert" basedir=".">
-
-    <property name="src.dir" location="${xdocs.dir}"/>
-    <!--<property name="src.format" value="maven"/>
+  <property name="src.dir" location="${xdocs.dir}"/>
+<!--<property name="src.format" value="maven"/>
     <property name="target.format" value="forrest"/>-->
-    <property name="dest.dir" value="${user.dir}/tmp"/>
-    <property name="converter.xsl" location="anakiaNmaven2document11.xsl"/>
-    <property name="book2project.xsl" location="projectNnavigation2book.xsl"/>
-
-    <target name="prepare" unless="xdocs.dir">
-        <echo message="Need to specify absolute path in xdocs.dir"/>
-        <echo message="property similar to"/>
-        <echo message="ant -Dxdocs.dir=/opt/projects/jakarta-avalon-excalibur/bzip/src/xdocs"/>
-        <fail/>
-    </target>
-
-    <target name="convert" depends="prepare">
-
-        <style style="${converter.xsl}"
+  <property name="dest.dir" value="${user.dir}/tmp"/>
+  <property name="converter.xsl" location="anakiaNmaven2document11.xsl"/>
+  <property name="book2project.xsl" location="projectNnavigation2book.xsl"/>
+  <target name="prepare" unless="xdocs.dir">
+    <echo message="Need to specify absolute path in xdocs.dir"/>
+    <echo message="property similar to"/>
+    <echo message="ant -Dxdocs.dir=/opt/projects/jakarta-avalon-excalibur/bzip/src/xdocs"/>
+    <fail/>
+  </target>
+  <target name="convert" depends="prepare">
+    <style style="${converter.xsl}"
             force="true"
             basedir="${src.dir}"
             extension=".xml"
             destdir="${dest.dir}">
-            <exclude name="**/project.xml"/>
-            <include name="**/*.xml"/>
-        </style>
-
-
-        <mkdir dir="${dest.dir}/stylesheets" />
-        
-        <style style="${book2project.xsl}"
+      <exclude name="**/project.xml"/>
+      <include name="**/*.xml"/>
+    </style>
+    <mkdir dir="${dest.dir}/stylesheets" />
+    <style style="${book2project.xsl}"
             force="true"
             basedir="${src.dir}"
             extension="-book.xml"
             destdir="${dest.dir}">
-            <include name="**/project.xml"/>
-        </style>
-
-        <style style="${book2project.xsl}"
+      <include name="**/project.xml"/>
+    </style>
+    <style style="${book2project.xsl}"
             force="true"
             basedir="${src.dir}"
             extension="-book.xml"
             destdir="${dest.dir}">
-            <include name="**/navigation.xml"/>
-        </style>
-        
-        <copy todir="${dest.dir}">
-          <fileset dir="${src.dir}">
-            <exclude name="**/*.xml"/>
-          </fileset>
-        </copy>         
-
-        <copy file="${dest.dir}/stylesheets/project-book.xml" tofile="${dest.dir}/book.xml"
failonerror="false"/>
-        <copy file="${dest.dir}/stylesheets/navigation-book.xml" tofile="${dest.dir}/book.xml"
failonerror="false"/>        
-        <delete dir="${dest.dir}/stylesheets" />
-        
-        
-        <copy file="${user.dir}/tabs.xml" todir="${dest.dir}"/>
-                
-        <fixcrlf srcdir="${dest.dir}"
+      <include name="**/navigation.xml"/>
+    </style>
+    <copy todir="${dest.dir}">
+      <fileset dir="${src.dir}">
+        <exclude name="**/*.xml"/>
+      </fileset>
+    </copy>
+    <copy file="${dest.dir}/stylesheets/project-book.xml" tofile="${dest.dir}/book.xml"
failonerror="false"/>
+    <copy file="${dest.dir}/stylesheets/navigation-book.xml" tofile="${dest.dir}/book.xml"
failonerror="false"/>
+    <delete dir="${dest.dir}/stylesheets" />
+    <copy file="${user.dir}/tabs.xml" todir="${dest.dir}"/>
+    <fixcrlf srcdir="${dest.dir}"
                 tab="remove"
                 tablength="4"
                 eol="crlf"
                 javafiles="no"
                 includes="**/*.xml"
          />
-  
-    </target>
-
-    <target name="update" depends="convert">
-        <copy todir="${src.dir}">
-            <fileset dir="${dest.dir}"/>
-        </copy>
-        <delete dir="${dest.dir}"/>
-    </target>
-
+  </target>
+  <target name="update" depends="convert">
+    <copy todir="${src.dir}">
+      <fileset dir="${dest.dir}"/>
+    </copy>
+    <delete dir="${dest.dir}"/>
+  </target>
 </project>

Modified: forrest/trunk/whiteboard/convert/anakiaNmaven/projectNnavigation2book.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/convert/anakiaNmaven/projectNnavigation2book.xsl?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/convert/anakiaNmaven/projectNnavigation2book.xsl (original)
+++ forrest/trunk/whiteboard/convert/anakiaNmaven/projectNnavigation2book.xsl Sat Apr  7 06:31:42
2007
@@ -15,39 +15,30 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <xsl:stylesheet
     version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-    <xsl:output method = "xml"  
+  <xsl:output method = "xml"  
                 version="1.0"
                 omit-xml-declaration="no" 
                 indent="yes"
                 encoding="ISO-8859-1"
                 doctype-system="book-cocoon-v10.dtd"
                 doctype-public="-//APACHE//DTD Cocoon Documentation Book V1.0//EN" />
-
-    <!-- book to project -->
-    <xsl:template match="project">
-        <book software="{@name}"
+<!-- book to project -->
+  <xsl:template match="project">
+    <book software="{@name}"
             copyright="{@name}"
             title="{title}">
-
-        <xsl:for-each select = "//menu">
-          <menu label="{@name}">
-            <xsl:for-each select = "item">
-             <menu-item  label="{@name}" href="{@href}"/>
-            </xsl:for-each>
-          </menu> 
-        </xsl:for-each>
-
-        </book>
-    </xsl:template>
-
-    <xsl:template match="menu"/>
-
-    <xsl:template match="item"/>
-
-
+      <xsl:for-each select = "//menu">
+        <menu label="{@name}">
+          <xsl:for-each select = "item">
+            <menu-item  label="{@name}" href="{@href}"/>
+          </xsl:for-each>
+        </menu>
+      </xsl:for-each>
+    </book>
+  </xsl:template>
+  <xsl:template match="menu"/>
+  <xsl:template match="item"/>
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/convert/anakiaNmaven/tabs.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/convert/anakiaNmaven/tabs.xml?view=diff&rev=526429&r1=526428&r2=526429
==============================================================================
--- forrest/trunk/whiteboard/convert/anakiaNmaven/tabs.xml (original)
+++ forrest/trunk/whiteboard/convert/anakiaNmaven/tabs.xml Sat Apr  7 06:31:42 2007
@@ -15,17 +15,14 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-      <!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.0//EN" "http://forrest.apache.org/dtd/tab-cocoon-v10.dtd">
-
-      <tabs software="MyProj"
+<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.0//EN" "http://forrest.apache.org/dtd/tab-cocoon-v10.dtd">
+<tabs software="MyProj"
         title="MyProj"
         copyright="Foo"
         xmlns:xlink="http://www.w3.org/1999/xlink">
-
-        <tab label="Home" dir=""/>
-        <!-- Add new tabs here, eg:
+  <tab label="Home" dir=""/>
+<!-- Add new tabs here, eg:
         <tab label="How-Tos" dir="community/howto/"/>
         <tab label="XML Site" dir="xml-site/"/>
         -->
-
-    </tabs>
+</tabs>



Mime
View raw message