You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@jakarta.apache.org by se...@apache.org on 2005/04/04 04:00:57 UTC

svn commit: r159977 - jakarta/site/xdocs/downloads/download-pages.xsl jakarta/site/xdocs/downloads/downloads-cgi.xsl

Author: sebb
Date: Sun Apr  3 19:00:55 2005
New Revision: 159977

URL: http://svn.apache.org/viewcvs?view=rev&rev=159977
Log:
Replace hard-coded paths with parameters

Modified:
    jakarta/site/xdocs/downloads/download-pages.xsl
    jakarta/site/xdocs/downloads/downloads-cgi.xsl

Modified: jakarta/site/xdocs/downloads/download-pages.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/downloads/download-pages.xsl?view=diff&r1=159976&r2=159977
==============================================================================
--- jakarta/site/xdocs/downloads/download-pages.xsl (original)
+++ jakarta/site/xdocs/downloads/download-pages.xsl Sun Apr  3 19:00:55 2005
@@ -4,10 +4,15 @@
   xmlns:redirect="http://xml.apache.org/xalan/redirect"
   extension-element-prefixes="redirect">
 
+  <!-- Defined parameters (overrideable) -->
+  <xsl:param    name="docs.downloads.tmp" select="'target/download-xdocs'"/>
+
+  <!-- Defined variables (non-overrideable) -->
+
+
   <xsl:template match="project">
     <xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
-    <!-- NOTE: This is a nasty hardcoded path -->
-    <redirect:write file="target/download-xdocs/downloads_{$id}.xml">
+    <redirect:write file="{$docs.downloads.tmp}/downloads_{$id}.xml">
       <document>
       <properties>
         <title><xsl:value-of select="@name"/> Downloads</title>
@@ -102,8 +107,7 @@
       </li>
     </xsl:if>
 
-    <!-- NOTE: This is a nasty hardcoded path -->
-    <redirect:write file="target/download-xdocs/downloads_{$id}.xml">
+    <redirect:write file="{$docs.downloads.tmp}/downloads_{$id}.xml">
         <xsl:apply-templates select="."/>
     </redirect:write>
   </xsl:template>

Modified: jakarta/site/xdocs/downloads/downloads-cgi.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/downloads/downloads-cgi.xsl?view=diff&r1=159976&r2=159977
==============================================================================
--- jakarta/site/xdocs/downloads/downloads-cgi.xsl (original)
+++ jakarta/site/xdocs/downloads/downloads-cgi.xsl Sun Apr  3 19:00:55 2005
@@ -4,6 +4,11 @@
     xmlns:redirect="http://xml.apache.org/xalan/redirect"
         extension-element-prefixes="redirect">
 
+  <!-- Defined parameters (overrideable) -->
+  <xsl:param    name="docs.downloads.dest" select="'docs/site/downloads'"/>
+
+  <!-- Defined variables (non-overrideable) -->
+
   <xsl:output method="text"/>
 
   <xsl:template match="project" name="project">
@@ -11,12 +16,11 @@
 
     <xsl:if test="downloads">
       <xsl:if test="downloads/@mirrored != 'false'">
-	<!-- NOTE: This is a nasty hardcoded path -->
 	<!--
         N.B. the first line of the script must immediately follow the tag
              or there will be a blank line at the start of the script.
     -->
-        <redirect:write file="docs/site/downloads/downloads_{$id}.cgi">#!/bin/sh
+        <redirect:write file="{$docs.downloads.dest}/downloads_{$id}.cgi">#!/bin/sh
 # Wrapper script around mirrors.cgi script
 # (we must change to that directory in order for python to pick up the
 #  python includes correctly)



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: site-cvs-help@jakarta.apache.org