forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r332547 - in /forrest/trunk/main/webapp: locationmap-skins.xml resources.xmap
Date Fri, 11 Nov 2005 13:32:37 GMT
Author: rgardler
Date: Fri Nov 11 05:32:24 2005
New Revision: 332547

URL: http://svn.apache.org/viewcvs?rev=332547&view=rev
Log:
use locationmap for resources (fixes FOR-693)

Modified:
    forrest/trunk/main/webapp/locationmap-skins.xml
    forrest/trunk/main/webapp/resources.xmap

Modified: forrest/trunk/main/webapp/locationmap-skins.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap-skins.xml?rev=332547&r1=332546&r2=332547&view=diff
==============================================================================
--- forrest/trunk/main/webapp/locationmap-skins.xml (original)
+++ forrest/trunk/main/webapp/locationmap-skins.xml Fri Nov 11 05:32:24 2005
@@ -58,6 +58,14 @@
       </select>
     </match>
 
+    <match pattern="skin.images.corner.**.*">
+      <select>
+        <location src="{project:skins-dir}{forrest:skin}/{1}/{2}.svg.xslt"/>
+        <location src="{forrest:context}/skins/{forrest:skin}/{1}/{2}.svg.xslt"/>
+        <location src="{forrest:context}/skins/common/{1}/{2}.svg.xslt"/>
+      </select>
+    </match>
+
     <match pattern="skin.images.**.*">
       <select>
         <location src="{project:skins-dir}{forrest:skin}/images/{1}.{2}" />

Modified: forrest/trunk/main/webapp/resources.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources.xmap?rev=332547&r1=332546&r2=332547&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources.xmap (original)
+++ forrest/trunk/main/webapp/resources.xmap Fri Nov 11 05:32:24 2005
@@ -61,121 +61,19 @@
   </map:components>
 
   <map:resources>
-    <map:resource name="skin-read">
-      <map:select type="exists">
-              <!-- First location: project skin dir -->
-        <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.css">
-          <map:call resource="read-linked-text">
-            <map:parameter name="path" value="{project:skins-dir}{forrest:skin}/{path}/{name}.css"
/>
-          </map:call>
-        </map:when>
-        <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.{ext}">
-          <map:read src="{project:skins-dir}{forrest:skin}/{path}/{name}.{ext}" mime-type="{mime-type}"
/>
-        </map:when>
-        <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.css.xslt">
-          <map:call resource="pipe-text-resource">
-            <map:parameter name="path" value="{project:skins-dir}{forrest:skin}/{path}/{name}.css.xslt"
/>
-            <map:parameter name="mime-type" value="text/css" />
-          </map:call>
-        </map:when>
-        <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.svg.xslt">
-          <map:call resource="pipe-transformed-svg2png-resource">
-            <map:parameter name="path" value="{project:skins-dir}{forrest:skin}/{path}/{name}.svg.xslt"
/>
-          </map:call>
-        </map:when>
-               
-              <!-- Second location: forrest skin dir -->
-
-        <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css">
-          <map:call resource="read-linked-text">
-            <map:parameter name="path" value="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css"
/>
-          </map:call>
-        </map:when>
-        <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.{ext}">
-          <map:read src="{forrest:context}/skins/{forrest:skin}/{path}/{name}.{ext}" mime-type="{mime-type}"
/>
-        </map:when>
-        <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css.xslt">
-          <map:call resource="pipe-text-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/{forrest:skin}/{path}/{name}.css.xslt"
/>
-            <map:parameter name="mime-type" value="text/css" />
-          </map:call>
-        </map:when>
-        <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.svg.xslt">
-          <map:call resource="pipe-transformed-svg2png-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/{forrest:skin}/{path}/{name}.svg.xslt"
/>
-          </map:call>
-        </map:when>
-               
-              <!-- Third location: forrest common skin dir -->
-        <map:when test="{forrest:context}/skins/common/{path}/{name}.css">
-          <map:call resource="read-linked-text">
-            <map:parameter name="path" value="{forrest:context}/skins/common/{path}/{name}.css"
/>
-          </map:call>
-        </map:when>
-        <map:when test="{forrest:context}/skins/common/{path}/{name}.{ext}">
-          <map:read src="{forrest:context}/skins/common/{path}/{name}.{ext}" mime-type="{mime-type}"
/>
-        </map:when>
-        <map:when test="{forrest:context}/skins/common/{path}/{name}.css.xslt">
-          <map:call resource="pipe-text-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/common/{path}/{name}.css.xslt"
/>
-            <map:parameter name="mime-type" value="text/css" />
-          </map:call>
-        </map:when>
-        <map:when test="{forrest:context}/skins/common/{path}/{name}.svg.xslt">
-          <map:call resource="pipe-transformed-svg2png-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/common/{path}/{name}.svg.xslt"
/>
-          </map:call>
-        </map:when>
-               
-               <!-- Fourth location: locationmap -->
-        <map:when test="{lm:{path}/{name}.{ext}}">
-          <map:read src="{lm:{path}/{name}.{ext}}"/>
-        </map:when>
-        <map:otherwise>
-                   <!-- this should always fail; it is used so the error has the correct
filename and extension -->
-          <map:read src=".../{path}/{name}.{ext}" mime-type="{mime-type}" />
-        </map:otherwise>
-      </map:select>
-    </map:resource>
 
-    <map:resource name="read-svg2png-corner-resource">
-      <map:select type="exists">
-        <map:when test="{project:skins-dir}{forrest:skin}/{path}/{name}.svg.xslt">
-          <map:call resource="pipe-transformed-svg2png-corner-resource">
-            <map:parameter name="path" value="{project:skins-dir}{forrest:skin}/{path}/{name}.svg.xslt"
/>
-            <map:parameter name="orientation-tb" value="{orientation-tb}"/>
-            <map:parameter name="orientation-lr" value="{orientation-lr}"/>
-            <map:parameter name="size" value="{size}"/>
-            <map:parameter name="bg-color-name" value="{bg-color-name}"/>
-            <map:parameter name="stroke-color-name" value="{stroke-color-name}"/>
-            <map:parameter name="fg-color-name" value="{fg-color-name}"/>
-          </map:call>
-        </map:when>
-        <map:when test="{forrest:context}/skins/{forrest:skin}/{path}/{name}.svg.xslt">
-          <map:call resource="pipe-transformed-svg2png-corner-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/{forrest:skin}/{path}/{name}.svg.xslt"
/>
-            <map:parameter name="orientation-tb" value="{orientation-tb}"/>
-            <map:parameter name="orientation-lr" value="{orientation-lr}"/>
-            <map:parameter name="size" value="{size}"/>
-            <map:parameter name="bg-color-name" value="{bg-color-name}"/>
-            <map:parameter name="stroke-color-name" value="{stroke-color-name}"/>
-            <map:parameter name="fg-color-name" value="{fg-color-name}"/>
-          </map:call>
-        </map:when>
-        <map:otherwise>
-          <map:call resource="pipe-svg2png-corner-resource">
-            <map:parameter name="path" value="{forrest:context}/skins/common/{path}/{name}.svg.xslt"
/>
-            <map:parameter name="orientation-tb" value="{orientation-tb}"/>
-            <map:parameter name="orientation-lr" value="{orientation-lr}"/>
-            <map:parameter name="size" value="{size}"/>
-            <map:parameter name="bg-color-name" value="{bg-color-name}"/>
-            <map:parameter name="stroke-color-name" value="{stroke-color-name}"/>
-            <map:parameter name="fg-color-name" value="{fg-color-name}"/>
-          </map:call>
-        </map:otherwise>
-      </map:select>
+   <map:resource name="read-svg2png-corner-resource">
+      <map:call resource="pipe-svg2png-corner-resource">
+        <map:parameter name="path" value="{lm:skin.images.corner.{path}.{name}}" />
+        <map:parameter name="orientation-tb" value="{orientation-tb}"/>
+        <map:parameter name="orientation-lr" value="{orientation-lr}"/>
+        <map:parameter name="size" value="{size}"/>   
+        <map:parameter name="bg-color-name" value="{bg-color-name}"/>
+        <map:parameter name="stroke-color-name" value="{stroke-color-name}"/>
+        <map:parameter name="fg-color-name" value="{fg-color-name}"/>   
+      </map:call>
     </map:resource>
-
+  
     <map:resource name="pipe-text-resource">
       <map:call resource="generate-transformed-resource">
         <map:parameter name="path" value="{path}" />
@@ -188,7 +86,7 @@
         <map:parameter name="path" value="{path}" />
       </map:call>
       <map:call resource="transform-project2text"/>
-      <map:transform src="{forrest:stylesheets}/extract-svg.xsl"/>
+      <map:transform src="{lm:transform.xml.extracted-svg}"/>
       <map:serialize type="svg2png" />
     </map:resource>
 
@@ -233,7 +131,7 @@
     </map:resource>
 
     <map:resource name="transform-project2text">
-      <map:transform src="{forrest:stylesheets}/project2text.xsl"/>
+      <map:transform src="{lm:transform.project.text}"/>
     </map:resource>
 
     <map:resource name="read-linked-text">
@@ -248,211 +146,106 @@
   <map:pipelines>
     <map:pipeline>
       <map:match pattern="**skin/**.js">
-        <map:call resource="skin-read">
-          <map:parameter name="path" value="scripts" />
-          <map:parameter name="name" value="{2}" />
-          <map:parameter name="ext" value="js" />
-          <map:parameter name="mime-type" value="application/x-javascript" />
-        </map:call>
+        <map:read src="{lm:skin.js.{2}}" mime-type="application/x-javascript" />
       </map:match>
 
-         <!-- @deprecated -->
+      <!-- @deprecated -->
       <map:match pattern="**.js">
         <map:read src="resources/scripts/{1}.js" mime-type="application/x-javascript"
/>
       </map:match>
 
       <map:match pattern="**skin/**.css">
-        <map:call resource="skin-read">
-          <map:parameter name="path" value="css" />
-          <map:parameter name="name" value="{2}" />
-          <map:parameter name="ext" value="css" />
-          <map:parameter name="mime-type" value="text/css" />
-        </map:call>
+        <map:select type="exists">
+          <map:when test="{lm:skin.css.xslt.{2}}">
+            <map:call resource="pipe-text-resource">
+              <map:parameter name="path" value="{lm:skin.css.xslt.{2}}" />
+              <map:parameter name="mime-type" value="text/css" />
+            </map:call>
+          </map:when>
+          <map:otherwise>
+            <map:call resource="read-linked-text">
+              <map:parameter name="path" value="{lm:skin.css.{2}}" />
+            </map:call>
+          </map:otherwise>
+        </map:select>
       </map:match>
 
          <!-- @deprecated -->
       <map:match pattern="**.css">
         <map:read src="resources/css/{1}.css" mime-type="text/css" />
       </map:match>
-
-         <!-- special case corner generator pipeline -->
-      <map:match pattern="skin/images**/*c-*-*-*-1*-2*-3*.png">
+      
+     <!-- special case cormer generator pipeline -->
+     <map:match pattern="skin/images**/*c-*-*-*-1*-2*-3*.png">
         <map:call resource="read-svg2png-corner-resource">
-          <map:parameter name="path" value="images/{1}" />
-          <map:parameter name="name" value="{2}c" />
-          <map:parameter name="orientation-tb" value="{3}"/>
-          <map:parameter name="orientation-lr" value="{4}"/>
-          <map:parameter name="size" value="{5}"/>
-          <map:parameter name="bg-color-name" value="{6}"/>
-          <map:parameter name="stroke-color-name" value="{7}"/>
-          <map:parameter name="fg-color-name" value="{8}"/>
+           <map:parameter name="path" value="images/{1}" />
+           <map:parameter name="name" value="{2}c" />
+           <map:parameter name="orientation-tb" value="{3}"/>
+           <map:parameter name="orientation-lr" value="{4}"/>
+           <map:parameter name="size" value="{5}"/>    
+           <map:parameter name="bg-color-name" value="{6}"/>
+           <map:parameter name="stroke-color-name" value="{7}"/>
+           <map:parameter name="fg-color-name" value="{8}"/>    
         </map:call>
-      </map:match>
+     </map:match>
 
       <map:match pattern="skin/images**/*.*">
-        <map:call resource="skin-read">
-          <map:parameter name="path" value="images/{1}" />
-          <map:parameter name="name" value="{2}" />
-          <map:parameter name="ext" value="{3}" />
-          <map:parameter name="mime-type" value="image/{3}" />
-        </map:call>
+        <map:read src="{lm:skin.images.{1}/{2}.{3}}" mime-type="image/{3}" />
       </map:match>
 
-         <!-- handles images local to a contributor directory -->
+      <!-- handles images local to a contributor directory -->
       <map:match pattern="**my-images/**.*">
-        <map:select type="exists">
-          <map:when test="{project:content.xdocs}{1}my-images/{2}.{3}">
-            <map:read src="{project:content.xdocs}{1}my-images/{2}.{3}" mime-type="image/{3}"
/>
-          </map:when>
-          <map:otherwise>
-            <map:read src="{lm:{1}my-images/{2}.{3}}"/>
-          </map:otherwise>
-        </map:select>
+            <map:read src="{lm:project.images.{1}/{2}.{3}}" mime-type="image/{3}" />
       </map:match>
 
       <map:match type="regexp" pattern="^(.*?)([^/]*).svg$">
-        <map:select type="exists">
-          <map:when test="{project:content.xdocs}/{1}{2}.svg">
-            <map:generate src="{project:content.xdocs}/{1}{2}.svg"/>
-            <map:serialize type="xml"/>
-          </map:when>
-          <map:when test="{lm:/{1}{2}.svg}">
-            <map:generate src="{lm:/{1}{2}.svg}"/>
-            <map:serialize type="xml"/>
-          </map:when>
-          <map:otherwise>
-            <map:generate src="{project:content.xdocs}/{1}{2}.svg"/>
-            <map:serialize type="xml"/>
-          </map:otherwise>
-        </map:select>
+        <map:generate src="{lm:project.{1}{2}.svg}"/>
+        <map:serialize type="xml"/>
       </map:match>
 
-      <map:match pattern="images/**.png">
+      <map:match pattern="images/**.*">
         <map:select type="exists">
-          <map:when test="{project:content.xdocs}/images/{1}.svg">
-            <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="{project:content.xdocs}/images/{1}.svg"
/>
-            </map:call>
-          </map:when>
-          <map:when test="{project:resources.images}/{1}.svg">
-            <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="{project:resources.images}/{1}.svg" />
-            </map:call>
+          <map:when test="{lm:skin.images.{1}.{2}}">
+            <map:read src="{lm:skin.images.{1}.{2}}" mime-type="image/{2}" />
           </map:when>
-          <map:when test="resources/images/{1}.svg">
+          <map:when test="{lm:project.images.{1}.svg}">
             <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="resources/images/{1}.svg" />
+              <map:parameter name="path" value="{lm:project.images.{1}.svg}" />
             </map:call>
           </map:when>
-          <map:when test="{project:content.xdocs}/images/{1}.png">
-            <map:read src="{project:content.xdocs}/images/{1}.png" mime-type="image/png"
/>
-          </map:when>
-          <map:when test="resources/images/{1}.png">
-            <map:read src="resources/images/{1}.png" mime-type="image/png" />
-          </map:when>
-          <map:when test="{project:resources.images}/{1}.png">
-            <map:read src="{project:resources.images}/{1}.png" mime-type="image/png" />
-          </map:when>
-          <map:when test="{lm:/images/{1}.svg}">
-            <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="{lm:/images/{1}.svg}" />
-            </map:call>
-          </map:when>
-          <map:otherwise>
-					  <!-- needed for compatibility for the standard resources/images that are now
-							 in the common skin -->
-            <map:call resource="skin-read">
-              <map:parameter name="path" value="images" />
-              <map:parameter name="name" value="{1}" />
-              <map:parameter name="ext" value="png" />
-              <map:parameter name="mime-type" value="image/png" />
-            </map:call>
-          </map:otherwise>
-        </map:select>
-      </map:match>
-
-      <map:match pattern="images/**.*">
-        <map:select type="exists">
-          <map:when test="{project:content.xdocs}/images/{1}.{2}">
-            <map:read src="{project:content.xdocs}/images/{1}.{2}" mime-type="image/{2}"
/>
-          </map:when>
-          <map:when test="resources/images/{1}.{2}">
-            <map:read src="resources/images/{1}.{2}" mime-type="image/{2}" />
-          </map:when>
-          <map:when test="{project:resources.images}/{1}.{2}">
-            <map:read src="{project:resources.images}/{1}.{2}" mime-type="image/{2}" />
-          </map:when>
-          <map:otherwise>
-					  <!-- needed for compatibility for the standard resources/images that are now
-							 in the common skin -->
-            <map:call resource="skin-read">
-              <map:parameter name="path" value="images" />
-              <map:parameter name="name" value="{1}" />
-              <map:parameter name="ext" value="{2}" />
-              <map:parameter name="mime-type" value="image/{2}" />
-            </map:call>
+          <map:otherwise test="{lm:project.images.{1}.{2}}">
+            <map:read src="{lm:project.images.{1}.{2}}" mime-type="image/{2}" />
           </map:otherwise>
         </map:select>
       </map:match>
 
       <map:match pattern="**/images/**.*">
-        <map:select type="exists">
-          <map:when test="{project:content.xdocs}/{1}/images/{2}.{3}">
-            <map:read src="{project:content.xdocs}/{1}/images/{2}.{3}" mime-type="image/{3}"
/>
-          </map:when>
-          <map:when test="resources/images/{2}.{3}">
-            <map:read src="resources/images/{2}.{3}" mime-type="image/{3}" />
-          </map:when>
-          <map:when test="{project:resources.images}/{2}.{3}">
-            <map:read src="{project:resources.images}/{2}.{3}" mime-type="image/{3}" />
-          </map:when>
-          <map:otherwise>
-            <map:read src="{lm:{1}/images/{2}.{3}}"/>
-          </map:otherwise>
-        </map:select>
+        <map:read src="{lm:project.images.{1}/{2}.{3}}" mime-type="image/{3}" />
       </map:match>
 
       <map:match pattern="**.png">
         <map:select type="exists">
-          <map:when test="{project:content.xdocs}/{1}.svg">
+          <map:when test="{lm:project.images.{1}.svg}">
             <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="{project:content.xdocs}/{1}.svg" />
+              <map:parameter name="path" value="{lm:project.images.{1}.svg}" />
             </map:call>
           </map:when>
-          <map:when test="{project:content.xdocs}/{1}.aart">
-            <map:generate type="asciiart-svg" src="{project:content.xdocs}/{1}.aart" />
+          <map:when test="{lm:project.images.{1}.aart}">
+            <map:generate type="asciiart-svg" src="{lm:project.images.{1}.aart}" />
             <map:call resource="transform-project2text"/>
             <map:serialize type="svg2png" />
           </map:when>
-          <map:when test="{project:content.xdocs}/{1}.png">
-            <map:read src="{project:content.xdocs}/{1}.png" mime-type="image/png" />
+          <map:when test="{lm:project.images.{1}.png}">
+            <map:read src="{lm:project.images.{1}.png}" mime-type="image/png" />
           </map:when>
-          <map:when test="{lm:{1}.svg}">
-            <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:parameter name="path" value="{lm:{1}.svg}" />
-            </map:call>
-          </map:when>
-          <map:otherwise>
-            <map:call resource="pipe-aggregate-svg2png-resource">
-              <map:read src="{lm:{1}.png}" mime-type="image/png" />
-            </map:call>
-          </map:otherwise>
         </map:select>
       </map:match>
 
       <map:match pattern="**.ico">
         <map:select type="exists">
-          <map:when test="{project:content.xdocs}/{1}.ico">
-            <map:read src="{project:content.xdocs}/{1}.ico" mime-type="image/x-icon" />
+          <map:when test="{lm:project.images.{1}.ico}">
+            <map:read src="{lm:project.images.{1}.ico}" mime-type="image/x-icon" />
           </map:when>
-          <map:otherwise>
-            <map:call resource="skin-read">
-              <map:parameter name="path" value="images" />
-              <map:parameter name="name" value="{1}" />
-              <map:parameter name="ext" value="ico" />
-              <map:parameter name="mime-type" value="image/x-icon" />
-            </map:call>
-          </map:otherwise>
         </map:select>
       </map:match>
     </map:pipeline>



Mime
View raw message