forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twilli...@apache.org
Subject svn commit: r240330 - in /forrest/trunk/whiteboard/sitemap-analysis: ./ README.txt common-printer.xsl generator-printer.xsl output.html selector-printer.xsl sitemap-evaluator.xsl transformer-printer.xsl
Date Fri, 26 Aug 2005 20:07:49 GMT
Author: twilliams
Date: Fri Aug 26 13:07:36 2005
New Revision: 240330

URL: http://svn.apache.org/viewcvs?rev=240330&view=rev
Log:
The beginnings of a sitemap analysis tool.  Doesn't do much at the moment.  output.html is
a sample of current output.

Added:
    forrest/trunk/whiteboard/sitemap-analysis/
    forrest/trunk/whiteboard/sitemap-analysis/README.txt   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/output.html   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl   (with props)
    forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl   (with props)

Added: forrest/trunk/whiteboard/sitemap-analysis/README.txt
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/README.txt?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/README.txt (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/README.txt Fri Aug 26 13:07:36 2005
@@ -0,0 +1,23 @@
+This doesn't *do* much at the moment.  It is supposed to be a start on a sitemap
+analysis tool.  
+
+Here's a wishlist of functionality for it:
+
+o) Show all components and where they are defined so that duplicate definitions might
+  be detected.  I think it's agreed that if components are used in more than one place
+  it makes sense for them to be defined at the root sitemap.  By printing them out, we
+  can see when components are defined in multiple places so that it'll be easier to 
+  see if that's desireable. (partly working)
+
+o) Show where components are actually used.
+  -> Supports the identification of unused sitemap components.
+  -> Supports identification of sitemap components that are only used in one place
+      (important to see if the definition should be moved to a lower sitemap)
+      
+o) ...
+
+
+
+Following command line assuming xalan is installed and it is run from $FORREST_HOME\etc\sitemap-analysis
+
+>java org.apache.xalan.xslt.Process -IN ..\..\main\webapp\sitemap.xmap -XSL sitemap-evaluator.xsl
-OUT output.html
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/sitemap-analysis/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl Fri Aug 26 13:07:36 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+      xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+      xmlns:xalan="http://xml.apache.org/xalan">
+
+
+  
+  
+</xsl:stylesheet>
\ No newline at end of file

Propchange: forrest/trunk/whiteboard/sitemap-analysis/common-printer.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl Fri Aug 26 13:07:36 2005
@@ -0,0 +1,161 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0" 
+  xmlns:xalan="http://xml.apache.org/xalan">
+  
+  <xsl:template name="print-generators">
+    <xsl:variable name="generators.all.new" select="xalan:nodeset($generators.all.sorted)"/>
+    <p>
+      <strong>Generators</strong>
+    </p>
+    <ul>
+      <li>Definitions:</li>
+      <ul>
+        <xsl:for-each select="$generators.all.new/*">
+          <xsl:sort select="@name"/>
+          <xsl:variable name="pos" select="position()"/>
+          <xsl:variable name="current-generator" select="."/>
+          <xsl:if test="$pos=1 or not($current-generator/@name=$generators.all.new/*[$pos
- 1]/@name) ">
+            <li>
+              <xsl:value-of select="./@name"/> - 
+
+                  <xsl:call-template name="xmap-gen-component-list">
+                <xsl:with-param name="component" select="./@name"/>
+              </xsl:call-template>
+            </li>
+          </xsl:if>
+        </xsl:for-each>
+      </ul>
+      <li>Uses:</li>
+      <ul>
+        <xsl:call-template name="print-generator-usage"/>
+      </ul>
+    </ul>
+  </xsl:template>
+  <xsl:template name="xmap-gen-component-list">
+    <xsl:param name="component" select="''"/>
+          {
+          <xsl:if test="$aggregate/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            aggregate.xmap, 
+          </xsl:if>
+    <xsl:if test="$faq/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            faq.xmap, 
+          </xsl:if>
+    <xsl:if test="$forrest/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            forrest.xmap, 
+          </xsl:if>
+    <xsl:if test="$i18n/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            i18n.xmap, 
+          </xsl:if>
+    <xsl:if test="$issues/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            issues.xmap, 
+          </xsl:if>
+    <xsl:if test="$linkmap/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            linkmap.xmap, 
+          </xsl:if>
+    <xsl:if test="$menu/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            menu.xmap, 
+          </xsl:if>
+    <xsl:if test="$profiler/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            profiler.xmap, 
+          </xsl:if>
+    <xsl:if test="$raw/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            raw.xmap, 
+          </xsl:if>
+    <xsl:if test="$resources/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            resources.xmap, 
+          </xsl:if>
+    <xsl:if test="$revisions/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            revisions.xmap, 
+          </xsl:if>
+    <xsl:if test="$search/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            search.xmap, 
+          </xsl:if>
+    <xsl:if test="$sitemap/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            sitemap.xmap, 
+          </xsl:if>
+    <xsl:if test="$tabs/map:sitemap/map:components/map:generators//map:generator/@name=$component">
+            tabs.xmap, 
+          </xsl:if>
+          
+          }
+        </xsl:template>
+  <xsl:variable name="generators.all.node" select="xalan:nodeset($generators.all)"/>
+  <xsl:variable name="generators.all.sorted">
+    <xsl:for-each select="$generators.all.node/*">
+      <xsl:sort select="./@name"/>
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+  </xsl:variable>
+  <xsl:variable name="generators.all">
+    <xsl:for-each select="/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$aggregate/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$faq/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$forrest/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$i18n/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$issues/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$linkmap/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$menu/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$profiler/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$raw/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$resources/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$revisions/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$search/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+    <xsl:for-each select="$tabs/map:sitemap/map:components/map:generators//map:generator">
+      <xsl:copy-of select="."/>
+    </xsl:for-each>
+  </xsl:variable>
+  
+  <xsl:template name="print-generator-usage">
+    <xsl:for-each select="/map:sitemap//map:generate">
+      <xsl:choose>
+        <xsl:when test="./@type">
+          <li><xsl:value-of select="./@type"/></li>        
+        </xsl:when>
+      </xsl:choose>
+    </xsl:for-each>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/sitemap-analysis/generator-printer.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/output.html
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/output.html?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/output.html (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/output.html Fri Aug 26 13:07:36 2005
@@ -0,0 +1,363 @@
+<html xmlns:xalan="http://xml.apache.org" xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Sitemap Analysis</title>
+</head>
+<body>
+<p>
+<strong>Transformers</strong>
+</p>
+<ul>
+<li>cinclude - 
+              
+                
+          {
+          
+          
+            aggregate.xmap, 
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>extparser - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>i18n - 
+              
+                
+          {
+          
+          
+            i18n.xmap, 
+          
+            menu.xmap, 
+          
+            sitemap.xmap, 
+          
+            tabs.xmap, 
+          
+          
+          }
+        </li>
+<li>idgen - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>index - 
+              
+                
+          {
+          
+          
+            search.xmap, 
+          
+          
+          }
+        </li>
+<li>lexer - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>linkrewriter - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>parser - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>pattern - 
+              
+                
+          {
+          
+          
+            resources.xmap, 
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>skinconf - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>xinclude - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>xpath - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>xslt - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>xsltc - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>xslt-saxon - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+</ul>
+<p>
+<strong>Generators</strong>
+</p>
+<ul>
+<li>Definitions:</li>
+<ul>
+<li>asciiart-svg - 
+
+                  
+          {
+          
+            resources.xmap, 
+          
+          
+          }
+        </li>
+<li>directory - 
+
+                  
+          {
+          
+            i18n.xmap, 
+          
+            revisions.xmap, 
+          
+          
+          }
+        </li>
+<li>exception - 
+
+                  
+          {
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>file - 
+
+                  
+          {
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>html - 
+
+                  
+          {
+          
+            raw.xmap, 
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>notifier - 
+
+                  
+          {
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>profiler - 
+
+                  
+          {
+          
+            profiler.xmap, 
+          
+          
+          }
+        </li>
+<li>search - 
+
+                  
+          {
+          
+            search.xmap, 
+          
+          
+          }
+        </li>
+<li>text - 
+
+                  
+          {
+          
+            resources.xmap, 
+          
+          
+          }
+        </li>
+<li>text2xml - 
+
+                  
+          {
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+</ul>
+<li>Uses:</li>
+<ul>
+<li>text2xml</li>
+</ul>
+</ul>
+<p>
+<strong>Selectors</strong>
+</p>
+<ul>
+<li>config - 
+              
+                
+          {
+          
+          
+            forrest.xmap, 
+          
+            menu.xmap, 
+          
+            sitemap.xmap, 
+          
+            tabs.xmap, 
+          
+          
+          }
+        </li>
+<li>exception - 
+              
+                
+          {
+          
+          
+            forrest.xmap, 
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>exists - 
+              
+                
+          {
+          
+          
+            sitemap.xmap, 
+          
+          
+          }
+        </li>
+<li>parameter - 
+              
+                
+          {
+          
+          
+            faq.xmap, 
+          
+            forrest.xmap, 
+          
+          
+          }
+        </li>
+</ul>
+</body>
+</html>

Propchange: forrest/trunk/whiteboard/sitemap-analysis/output.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl Fri Aug 26 13:07:36 2005
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0" 
+  xmlns:xalan="http://xml.apache.org/xalan">
+  
+  <xsl:template name="print-selectors">
+    <xsl:variable name="selectors.all">
+      <xsl:for-each select="/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$aggregate/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$faq/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$forrest/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$i18n/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$issues/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$linkmap/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$menu/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$profiler/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$raw/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$resources/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$revisions/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$search/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$tabs/map:sitemap/map:components/map:selectors//map:selector">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="selectors.all.node" select="xalan:nodeset($selectors.all)"/>
+    <xsl:variable name="selectors.all.sorted">
+      <xsl:for-each select="$selectors.all.node/*">
+        <xsl:sort select="./@name"/>
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="selectors.all.new" select="xalan:nodeset($selectors.all.sorted)"/>
+    <p>
+      <strong>Selectors</strong>
+    </p>
+    <ul>
+      <xsl:for-each select="$selectors.all.new/*">
+        <xsl:sort select="@name"/>
+        <xsl:variable name="pos" select="position()"/>
+        <xsl:variable name="current-selector" select="."/>
+        <xsl:if test="$pos=1 or not($current-selector/@name=$selectors.all.new/*[$pos
- 1]/@name) ">
+          <li>
+            <xsl:value-of select="./@name"/> - 
+              
+                <xsl:call-template name="xmap-sel-component-list">
+              <xsl:with-param name="component" select="./@name"/>
+            </xsl:call-template>
+          </li>
+        </xsl:if>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+  <xsl:template name="xmap-sel-component-list">
+    <xsl:param name="component" select="''"/>
+          {
+          
+          <xsl:if test="$aggregate/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            aggregate.xmap, 
+          </xsl:if>
+    <xsl:if test="$faq/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            faq.xmap, 
+          </xsl:if>
+    <xsl:if test="$forrest/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            forrest.xmap, 
+          </xsl:if>
+    <xsl:if test="$i18n/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            i18n.xmap, 
+          </xsl:if>
+    <xsl:if test="$issues/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            issues.xmap, 
+          </xsl:if>
+    <xsl:if test="$linkmap/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            linkmap.xmap, 
+          </xsl:if>
+    <xsl:if test="$menu/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            menu.xmap, 
+          </xsl:if>
+    <xsl:if test="$profiler/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            profiler.xmap, 
+          </xsl:if>
+    <xsl:if test="$raw/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            raw.xmap, 
+          </xsl:if>
+    <xsl:if test="$resources/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            resources.xmap, 
+          </xsl:if>
+    <xsl:if test="$revisions/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            revisions.xmap, 
+          </xsl:if>
+    <xsl:if test="$search/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            search.xmap, 
+          </xsl:if>
+    <xsl:if test="$sitemap/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            sitemap.xmap, 
+          </xsl:if>
+    <xsl:if test="$tabs/map:sitemap/map:components/map:selectors//map:selector/@name=$component">
+            tabs.xmap, 
+          </xsl:if>
+          
+          }
+        </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/sitemap-analysis/selector-printer.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl Fri Aug 26 13:07:36 2005
@@ -0,0 +1,71 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!--
+This is the main stylesheet for analyzing the Forrest sitemaps.  It calls
+the others as needed.  
+
+Status:  Currently just trying to get it working.  It's pretty ugly, lots
+of duplication and no output style.  I'm limited by my serious xslt skill
+deficiencies at the moment. 
+
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+			xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+			xmlns:xalan="http://xml.apache.org">
+      
+  <xsl:import href="common-printer.xsl"/>
+  <xsl:import href="generator-printer.xsl"/>
+  <xsl:import href="transformer-printer.xsl"/>
+  <xsl:import href="selector-printer.xsl"/>
+
+  <xsl:variable name="aggregate" select="document('../../main/webapp/aggregate.xmap')"/>
+  <xsl:variable name="faq" select="document('../../main/webapp/faq.xmap')"/>
+  <xsl:variable name="forrest" select="document('../../main/webapp/forrest.xmap')"/>
+  <xsl:variable name="i18n" select="document('../../main/webapp/i18n.xmap')"/>
+  <xsl:variable name="issues" select="document('../../main/webapp/issues.xmap')"/>
+  <xsl:variable name="linkmap" select="document('../../main/webapp/linkmap.xmap')"/>
+  <xsl:variable name="menu" select="document('../../main/webapp/menu.xmap')"/>
+  <xsl:variable name="profiler" select="document('../../main/webapp/profiler.xmap')"/>
+  <xsl:variable name="raw" select="document('../../main/webapp/raw.xmap')"/> 
+  <xsl:variable name="resources" select="document('../../main/webapp/resources.xmap')"/>

+  <xsl:variable name="revisions" select="document('../../main/webapp/revisions.xmap')"/>
+  <xsl:variable name="search" select="document('../../main/webapp/search.xmap')"/>
+	<xsl:variable name="sitemap" select="/"/>
+  <xsl:variable name="tabs" select="document('../../main/webapp/tabs.xmap')"/> 
+	  
+<xsl:template match="/">
+  <html>
+    <head>
+      <title>Sitemap Analysis</title>
+    </head>
+    <body>
+  		<xsl:call-template name="print-transformers"/>
+	    <xsl:call-template name="print-generators"/>
+      <xsl:call-template name="print-selectors"/>  		
+		</body>
+  </html>
+</xsl:template>
+	
+
+	
+	
+	
+
+	
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/sitemap-analysis/sitemap-evaluator.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl?rev=240330&view=auto
==============================================================================
--- forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl (added)
+++ forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl Fri Aug 26 13:07:36
2005
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0" 
+  xmlns:xalan="http://xml.apache.org/xalan">
+
+  <xsl:template name="print-transformers">
+    <xsl:variable name="transformers.all">
+      <xsl:for-each select="/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$aggregate/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$faq/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$forrest/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$i18n/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$issues/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$linkmap/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$menu/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$profiler/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$raw/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$resources/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$revisions/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$search/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+      <xsl:for-each select="$tabs/map:sitemap/map:components/map:transformers//map:transformer">
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="transformers.all.node" select="xalan:nodeset($transformers.all)"/>
+    <xsl:variable name="transformers.all.sorted">
+      <xsl:for-each select="$transformers.all.node/*">
+        <xsl:sort select="./@name"/>
+        <xsl:copy-of select="."/>
+      </xsl:for-each>
+    </xsl:variable>
+    <xsl:variable name="transformers.all.new" select="xalan:nodeset($transformers.all.sorted)"/>
+    <p>
+      <strong>Transformers</strong>
+    </p>
+    <ul>
+      <xsl:for-each select="$transformers.all.new/*">
+        <xsl:sort select="@name"/>
+        <xsl:variable name="pos" select="position()"/>
+        <xsl:variable name="current-transformer" select="."/>
+        <xsl:if test="$pos=1 or not($current-transformer/@name=$transformers.all.new/*[$pos
- 1]/@name) ">
+          <li>
+            <xsl:value-of select="./@name"/> - 
+              
+                <xsl:call-template name="xmap-tran-component-list">
+              <xsl:with-param name="component" select="./@name"/>
+            </xsl:call-template>
+          </li>
+        </xsl:if>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+  <xsl:template name="xmap-tran-component-list">
+    <xsl:param name="component" select="''"/>
+          {
+          
+          <xsl:if test="$aggregate/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            aggregate.xmap, 
+          </xsl:if>
+    <xsl:if test="$faq/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            faq.xmap, 
+          </xsl:if>
+    <xsl:if test="$forrest/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            forrest.xmap, 
+          </xsl:if>
+    <xsl:if test="$i18n/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            i18n.xmap, 
+          </xsl:if>
+    <xsl:if test="$issues/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            issues.xmap, 
+          </xsl:if>
+    <xsl:if test="$linkmap/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            linkmap.xmap, 
+          </xsl:if>
+    <xsl:if test="$menu/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            menu.xmap, 
+          </xsl:if>
+    <xsl:if test="$profiler/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            profiler.xmap, 
+          </xsl:if>
+    <xsl:if test="$raw/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            raw.xmap, 
+          </xsl:if>
+    <xsl:if test="$resources/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            resources.xmap, 
+          </xsl:if>
+    <xsl:if test="$revisions/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            revisions.xmap, 
+          </xsl:if>
+    <xsl:if test="$search/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            search.xmap, 
+          </xsl:if>
+    <xsl:if test="$sitemap/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            sitemap.xmap, 
+          </xsl:if>
+    <xsl:if test="$tabs/map:sitemap/map:components/map:transformers//map:transformer/@name=$component">
+            tabs.xmap, 
+          </xsl:if>
+          
+          }
+        </xsl:template>
+</xsl:stylesheet>

Propchange: forrest/trunk/whiteboard/sitemap-analysis/transformer-printer.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message