forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r292891 - in /forrest/trunk: main/webapp/ plugins/org.apache.forrest.plugin.internal.IMSManifest/ whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/
Date Sat, 01 Oct 2005 01:24:59 GMT
Author: rgardler
Date: Fri Sep 30 18:24:45 2005
New Revision: 292891

URL: http://svn.apache.org/viewcvs?rev=292891&view=rev
Log:
refactor resolving of 'skin' stylesheets to use locationmap

Modified:
    forrest/trunk/main/webapp/faq.xmap
    forrest/trunk/main/webapp/locationmap.xml
    forrest/trunk/main/webapp/sitemap.xmap
    forrest/trunk/main/webapp/tabs.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.internal.IMSManifest/internal.xmap
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/internal.xmap

Modified: forrest/trunk/main/webapp/faq.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/faq.xmap?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/main/webapp/faq.xmap (original)
+++ forrest/trunk/main/webapp/faq.xmap Fri Sep 30 18:24:45 2005
@@ -98,28 +98,14 @@
     </map:resource>
 
     <map:resource name="skinit">
-        <map:select type="exists">
-          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
+      <map:transform src="{lm:{type}}">
+        <map:parameter name="notoc" value="{notoc}"/>
+        <!-- For backwards-compat with 0.2 - 0.4 skins -->
+        <map:parameter name="isfaq" value="{notoc}"/>
+        <map:parameter name="nopdf" value="{nopdf}"/>
+        <map:parameter name="path" value="{path}"/>
+        <map:parameter name="config-file" value="{project:skinconf}"/>
+      </map:transform>
       <map:serialize/>
     </map:resource>
 
@@ -200,7 +186,7 @@
         <map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.html"/>
         <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
         <map:call resource="skinit">
-          <map:parameter name="type" value="document2html"/>
+          <map:parameter name="type" value="transform.xdoc.html"/>
           <map:parameter name="path" value="/{1}{2}.html"/>
           <map:parameter name="notoc" value="true"/>
         </map:call>

Modified: forrest/trunk/main/webapp/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/main/webapp/locationmap.xml (original)
+++ forrest/trunk/main/webapp/locationmap.xml Fri Sep 30 18:24:45 2005
@@ -33,8 +33,39 @@
   </components>
   
   <locator>
+    <!-- ================================== -->
+    <!-- Mount project specific locationmap -->
+    <!-- ================================== -->
     <select>
       <mount src="{project:content}locationmap.xml"/>
     </select>
+    
+    <match pattern="transform.xdoc.html">
+      <select>
+        <location src="{project:skins-dir}{forrest:skin}/xslt/html/document2html.xsl"
/>
+        <location src="{forrest:context}/skins/{forrest:skin}/xslt/html/document2html.xsl"/>
+      </select>
+    </match>
+    
+    <match pattern="transform.book.menu">
+      <select>
+        <location src="{project:skins-dir}{forrest:skin}/xslt/html/book2menu.xsl" />
+        <location src="{forrest:context}/skins/{forrest:skin}/xslt/html/book2menu.xsl"/>
+      </select>
+    </match>
+    
+    <match pattern="transform.tab.menu">
+      <select>
+        <location src="{project:skins-dir}{forrest:skin}/xslt/html/tab2menu.xsl" />
+        <location src="{forrest:context}/skins/{forrest:skin}/xslt/html/tab2menu.xsl"/>
+      </select>
+    </match>
+    
+    <match pattern="transform.site.xhtml">
+      <select>
+        <location src="{project:skins-dir}{forrest:skin}/xslt/html/site2xhtml.xsl" />
+        <location src="{forrest:context}/skins/{forrest:skin}/xslt/html/site2xhtml.xsl"/>
+      </select>
+    </match>
   </locator>
 </locationmap>

Modified: forrest/trunk/main/webapp/sitemap.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/sitemap.xmap?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/main/webapp/sitemap.xmap (original)
+++ forrest/trunk/main/webapp/sitemap.xmap Fri Sep 30 18:24:45 2005
@@ -251,28 +251,14 @@
 
   <map:resources>
     <map:resource name="skinit">
-        <map:select type="exists">
-          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
+        <map:transform src="{lm:{type}}">
+          <map:parameter name="notoc" value="{notoc}"/>
+          <!-- For backwards-compat with 0.2 - 0.4 skins -->
+          <map:parameter name="isfaq" value="{notoc}"/>
+          <map:parameter name="nopdf" value="{nopdf}"/>
+          <map:parameter name="path" value="{path}"/>
+          <map:parameter name="config-file" value="{project:skinconf}"/>
+        </map:transform>
         <map:select type="config">
           <map:parameter name="value" value="{defaults:i18n}"/>
           <map:when test="true">	
@@ -521,7 +507,7 @@
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
         <map:call resource="skinit">
-          <map:parameter name="type" value="document2html"/>
+          <map:parameter name="type" value="transform.xdoc.html"/>
           <map:parameter name="path" value="{1}{2}.html"/>
           <map:parameter name="notoc" value="false"/>
         </map:call>
@@ -532,7 +518,7 @@
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
         <map:call resource="skinit">
-          <map:parameter name="type" value="book2menu"/>
+          <map:parameter name="type" value="transform.book.menu"/>
           <map:parameter name="path" value="{1}{2}.html"/>
         </map:call>
       </map:match>
@@ -578,7 +564,7 @@
         </map:aggregate>
         
         <map:call resource="skinit">
-          <map:parameter name="type" value="site2xhtml"/>
+          <map:parameter name="type" value="transform.site.xhtml"/>
           <map:parameter name="path" value="{0}"/>
         </map:call>
       </map:match>         
@@ -592,7 +578,7 @@
           <map:part src="cocoon:/{1}/body-{2}.html"/>
         </map:aggregate>
         <map:call resource="skinit">
-          <map:parameter name="type" value="site2xhtml"/>
+          <map:parameter name="type" value="transform.site.xhtml"/>
           <map:parameter name="path" value="{0}"/>
         </map:call>
       </map:match>

Modified: forrest/trunk/main/webapp/tabs.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/tabs.xmap?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/main/webapp/tabs.xmap (original)
+++ forrest/trunk/main/webapp/tabs.xmap Fri Sep 30 18:24:45 2005
@@ -39,29 +39,15 @@
 
   <map:resources>
     <map:resource name="skinit">
-      <map:select type="exists">
-        <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-          <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-            <map:parameter name="notoc" value="{notoc}"/>
-            <!-- FIXME: do we need this anymore? -->
-            <!-- For backwards-compat with 0.2 - 0.4 skins -->
-            <map:parameter name="isfaq" value="{notoc}"/>
-            <map:parameter name="nopdf" value="{nopdf}"/>
-            <map:parameter name="path" value="{path}"/>
-            <map:parameter name="config-file" value="{project:skinconf}"/>
-          </map:transform>
-        </map:when>
-        <map:otherwise>
-          <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
-            <map:parameter name="notoc" value="{notoc}"/>
-            <!-- For backwards-compat with 0.2 - 0.4 skins -->
-            <map:parameter name="isfaq" value="{notoc}"/>
-            <map:parameter name="nopdf" value="{nopdf}"/>
-            <map:parameter name="path" value="{path}"/>
-            <map:parameter name="config-file" value="{project:skinconf}"/>
-          </map:transform>
-        </map:otherwise>
-      </map:select>
+      <map:transform src="{lm:{type}}">
+        <map:parameter name="notoc" value="{notoc}"/>
+        <!-- FIXME: do we need this anymore? -->
+        <!-- For backwards-compat with 0.2 - 0.4 skins -->
+        <map:parameter name="isfaq" value="{notoc}"/>
+        <map:parameter name="nopdf" value="{nopdf}"/>
+        <map:parameter name="path" value="{path}"/>
+        <map:parameter name="config-file" value="{project:skinconf}"/>
+      </map:transform>
       <map:serialize/>
     </map:resource>
   </map:resources>
@@ -94,7 +80,7 @@
         </map:select>
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:call resource="skinit">
-          <map:parameter name="type" value="tab2menu"/>
+          <map:parameter name="type" value="transform.tab.menu"/>
           <map:parameter name="path" value="{1}{2}.html"/>
         </map:call>
       </map:match>      

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.internal.IMSManifest/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.internal.IMSManifest/internal.xmap?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.internal.IMSManifest/internal.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.internal.IMSManifest/internal.xmap Fri
Sep 30 18:24:45 2005
@@ -50,28 +50,14 @@
   
   <map:resources>
     <map:resource name="skinit">
-        <map:select type="exists">
-          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
+        <map:transform src="{lm:{type}}">
+          <map:parameter name="notoc" value="{notoc}"/>
+          <!-- For backwards-compat with 0.2 - 0.4 skins -->
+          <map:parameter name="isfaq" value="{notoc}"/>
+          <map:parameter name="nopdf" value="{nopdf}"/>
+          <map:parameter name="path" value="{path}"/>
+          <map:parameter name="config-file" value="{project:skinconf}"/>
+        </map:transform>
       <map:serialize/>
     </map:resource>
 
@@ -118,7 +104,7 @@
         </map:select>
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:call resource="skinit">
-          <map:parameter name="type" value="tab2menu"/>
+          <map:parameter name="type" value="transform.tab.menu"/>
           <map:parameter name="path" value="{1}{2}.html"/>
         </map:call>
       </map:match>      

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/internal.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/internal.xmap?rev=292891&r1=292890&r2=292891&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/internal.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.GoogleSitemap/internal.xmap
Fri Sep 30 18:24:45 2005
@@ -234,28 +234,14 @@
   
   <map:resources>
     <map:resource name="skinit">
-        <map:select type="exists">
-          <map:when test="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-            <map:transform src="{project:skins-dir}{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:when>
-          <map:otherwise>
-            <map:transform src="{forrest:context}/skins/{forrest:skin}/xslt/html/{type}.xsl">
-              <map:parameter name="notoc" value="{notoc}"/>
-              <!-- For backwards-compat with 0.2 - 0.4 skins -->
-              <map:parameter name="isfaq" value="{notoc}"/>
-              <map:parameter name="nopdf" value="{nopdf}"/>
-              <map:parameter name="path" value="{path}"/>
-              <map:parameter name="config-file" value="{project:skinconf}"/>
-            </map:transform>
-          </map:otherwise>
-        </map:select>
+        <map:transform src="{lm:{type}}">
+          <map:parameter name="notoc" value="{notoc}"/>
+          <!-- For backwards-compat with 0.2 - 0.4 skins -->
+          <map:parameter name="isfaq" value="{notoc}"/>
+          <map:parameter name="nopdf" value="{nopdf}"/>
+          <map:parameter name="path" value="{path}"/>
+          <map:parameter name="config-file" value="{project:skinconf}"/>
+        </map:transform>
         <map:select type="config">
           <map:parameter name="value" value="{defaults:i18n}"/>
           <map:when test="true">	
@@ -530,7 +516,7 @@
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:transform src="{forrest:context}/resources/stylesheets/declare-broken-site-links.xsl"
/>
         <map:call resource="skinit">
-          <map:parameter name="type" value="document2html"/>
+          <map:parameter name="type" value="transform.xdoc.html"/>
           <map:parameter name="path" value="{1}{2}.html"/>
           <map:parameter name="notoc" value="false"/>
         </map:call>
@@ -541,7 +527,7 @@
         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
         <map:transform src="{forrest:context}/resources/stylesheets/declare-broken-site-links.xsl"
/>
         <map:call resource="skinit">
-          <map:parameter name="type" value="book2menu"/>
+          <map:parameter name="type" value="transform.book.menu"/>
           <map:parameter name="path" value="{1}{2}.html"/>
         </map:call>
       </map:match>
@@ -580,7 +566,7 @@
         </map:aggregate>
         
         <map:call resource="skinit">
-          <map:parameter name="type" value="site2xhtml"/>
+          <map:parameter name="type" value="ransform.site.xhtml"/>
           <map:parameter name="path" value="{0}"/>
         </map:call>
       </map:match>         
@@ -594,7 +580,7 @@
           <map:part src="cocoon:/{1}/body-{2}.html"/>
         </map:aggregate>
         <map:call resource="skinit">
-          <map:parameter name="type" value="site2xhtml"/>
+          <map:parameter name="type" value="transform.site.xhtml"/>
           <map:parameter name="path" value="{0}"/>
         </map:call>
       </map:match>



Mime
View raw message