jakarta-site-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r154070 - in jakarta/site: build-downloads.xml xdocs/downloads/downloads-cgi.xsl xdocs/downloads/downloads.cgi
Date Wed, 16 Feb 2005 19:22:33 GMT
Author: bayard
Date: Wed Feb 16 11:22:31 2005
New Revision: 154070

URL: http://svn.apache.org/viewcvs?view=rev&rev=154070
Log:
a rather hacky way to handle creating lots of .cgi files. The downloads.cgi is removed as
it is now inside the xslt. Ant does a replace after the creation to remove the xml header,
unsure if there is a way to make this not appear, and unsure if encodings other than UTF-8
might be created

Added:
    jakarta/site/xdocs/downloads/downloads-cgi.xsl   (with props)
Removed:
    jakarta/site/xdocs/downloads/downloads.cgi
Modified:
    jakarta/site/build-downloads.xml

Modified: jakarta/site/build-downloads.xml
URL: http://svn.apache.org/viewcvs/jakarta/site/build-downloads.xml?view=diff&r1=154069&r2=154070
==============================================================================
--- jakarta/site/build-downloads.xml (original)
+++ jakarta/site/build-downloads.xml Wed Feb 16 11:22:31 2005
@@ -4,6 +4,7 @@
   <target name="downloads">
     <mkdir dir="download-xdocs"/>
     <xslt in="xdocs/downloads/downloads.xml" out="download-xdocs/download.xml" style="xdocs/downloads/download-page.xsl"
/>
+
     <xslt in="xdocs/downloads/downloads.xml" out="download-xdocs/empty.xml" style="xdocs/downloads/download-pages.xsl"
/>
     <delete file="download-xdocs/empty.xml"/>
 
@@ -16,7 +17,14 @@
         <param name="relative-path" expression="../.."/>
     </style>
 
-    <!-- TODO: for each downloads_*.html generated, copy downloads.cgi to downloads_*.cgi
-->
+    <xslt in="xdocs/downloads/downloads.xml" out="tmp/site/downloads/empty.xml" style="xdocs/downloads/downloads-cgi.xsl"
/>
+    <delete file="tmp/site/downloads/empty.xml"/>
+    <replace dir="tmp/site/downloads/" value="">
+      <include name="*.cgi"/>
+      <replaceToken><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+
+]]></replaceToken>
+    </replace>
 
     <delete dir="download-xdocs"/>
   </target>

Added: jakarta/site/xdocs/downloads/downloads-cgi.xsl
URL: http://svn.apache.org/viewcvs/jakarta/site/xdocs/downloads/downloads-cgi.xsl?view=auto&rev=154070
==============================================================================
--- jakarta/site/xdocs/downloads/downloads-cgi.xsl (added)
+++ jakarta/site/xdocs/downloads/downloads-cgi.xsl Wed Feb 16 11:22:31 2005
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+    xmlns:redirect="http://xml.apache.org/xalan/redirect"
+        extension-element-prefixes="redirect">
+
+  <xsl:template match="project">
+    <xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
+    <redirect:write file="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)
+cd /www/www.apache.org/dyn/mirrors
+/www/www.apache.org/dyn/mirrors/mirrors.cgi $*
+    </redirect:write>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: jakarta/site/xdocs/downloads/downloads-cgi.xsl
------------------------------------------------------------------------------
    svn:executable = *



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


Mime
View raw message