forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r411039 - in /forrest/trunk: main/webapp/resources/stylesheets/ whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/ whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/...
Date Fri, 02 Jun 2006 05:14:09 GMT
Author: crossley
Date: Thu Jun  1 22:14:08 2006
New Revision: 411039

URL: http://svn.apache.org/viewvc?rev=411039&view=rev
Log:
Comments were added to one version of this stylesheet (main/webapp/skins/common/xslt/html/pathutils.xsl).
Replicate those comments to the other copies.

Modified:
    forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/pathutils.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl

Modified: forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl?rev=411039&r1=411038&r2=411039&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/pathutils.xsl Thu Jun  1 22:14:08 2006
@@ -172,17 +172,24 @@
 -->
 <xsl:template name="normalize">
   <xsl:param name="path"/>
+    <!-- replace all \  with / -->
   <xsl:variable name="path-" select="translate($path, '\', '/')"/>
   <xsl:choose>
+      <!-- process relative refs here -->
     <xsl:when test="contains($path-, '/../')">
-
+       <!--  put part before /../ into $pa: "foo/bar" -->
       <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
+        <!-- put part after first occurrence /../ into $th: "baz/index.html" -->
       <xsl:variable name="th" select="substring-after($path-, '/../')"/>
+        <!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
       <xsl:variable name="pa-">
         <xsl:call-template name="dirname">
           <xsl:with-param name="path" select="$pa"/>
         </xsl:call-template>
       </xsl:variable>
+      <!-- recombine pieces thus eliminating one .. and one dir step before it
+              and recurse into this template to eliminate more /../
+      -->  
       <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
       <xsl:call-template name="normalize">
         <xsl:with-param name="path" select="$pa-th"/>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/pathutils.xsl?rev=411039&r1=411038&r2=411039&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/pathutils.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.IMSManifest/resources/stylesheets/pathutils.xsl
Thu Jun  1 22:14:08 2006
@@ -15,7 +15,6 @@
   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">
 <!--
 PathUtils.xsl
@@ -27,7 +26,6 @@
 ext: return the last extension of the filename in a path
 filename-noext: return the file part of a path without its last extension
 
-$Id: pathutils.xsl,v 1.1 2005/09/21 14:10:24 rgardler Exp $
 -->
 
 <!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
@@ -174,17 +172,24 @@
 -->
 <xsl:template name="normalize">
   <xsl:param name="path"/>
+    <!-- replace all \  with / -->
   <xsl:variable name="path-" select="translate($path, '\', '/')"/>
   <xsl:choose>
+      <!-- process relative refs here -->
     <xsl:when test="contains($path-, '/../')">
-
+       <!--  put part before /../ into $pa: "foo/bar" -->
       <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
+        <!-- put part after first occurrence /../ into $th: "baz/index.html" -->
       <xsl:variable name="th" select="substring-after($path-, '/../')"/>
+        <!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
       <xsl:variable name="pa-">
         <xsl:call-template name="dirname">
           <xsl:with-param name="path" select="$pa"/>
         </xsl:call-template>
       </xsl:variable>
+      <!-- recombine pieces thus eliminating one .. and one dir step before it
+              and recurse into this template to eliminate more /../
+      -->  
       <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
       <xsl:call-template name="normalize">
         <xsl:with-param name="path" select="$pa-th"/>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl?rev=411039&r1=411038&r2=411039&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/common/xslt/html/pathutils.xsl
Thu Jun  1 22:14:08 2006
@@ -172,17 +172,24 @@
 -->
 <xsl:template name="normalize">
   <xsl:param name="path"/>
+    <!-- replace all \  with / -->
   <xsl:variable name="path-" select="translate($path, '\', '/')"/>
   <xsl:choose>
+      <!-- process relative refs here -->
     <xsl:when test="contains($path-, '/../')">
-
+       <!--  put part before /../ into $pa: "foo/bar" -->
       <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
+        <!-- put part after first occurrence /../ into $th: "baz/index.html" -->
       <xsl:variable name="th" select="substring-after($path-, '/../')"/>
+        <!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
       <xsl:variable name="pa-">
         <xsl:call-template name="dirname">
           <xsl:with-param name="path" select="$pa"/>
         </xsl:call-template>
       </xsl:variable>
+      <!-- recombine pieces thus eliminating one .. and one dir step before it
+              and recurse into this template to eliminate more /../
+      -->  
       <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
       <xsl:call-template name="normalize">
         <xsl:with-param name="path" select="$pa-th"/>



Mime
View raw message