Add xsltproc.py
[mspang/www.git] / xsl / media.xsl
index ce1f403..9fbac93 100644 (file)
@@ -1,11 +1,9 @@
 <?xml version='1.0'?>
 
-<xsl:stylesheet version="2.0"
+<xsl:stylesheet version="1.0"
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:xs="http://www.w3.org/2001/XMLSchema"
-    xmlns:fn="http://www.w3.org/2005/xpath-functions"
-    xmlns:csc="http://csclub.uwaterloo.ca/xslt">
+    xmlns:csc="http://csclub.uwaterloo.ca/xsltproc">
 
 <xsl:template match="mediafile">
   <xsl:param name="ext" />
@@ -54,8 +52,8 @@
   <xsl:param name="mirror" />
   <xsl:param name="bittorrent" />
   <xsl:param name="ads" />
-  <xsl:variable name="realurl" select="concat('http://csclub.uwaterloo.ca/media/', fn:encode-for-uri(@title), '.html')" />
-  <xsl:result-document method="xml" encoding="ISO-8859-1"
+  <xsl:variable name="realurl" select="concat('http://csclub.uwaterloo.ca/media/', csc:encode-for-uri(@title), '.html')" />
+  <xsl:document method="xml" encoding="ISO-8859-1"
       doctype-public="-//W3C//DTD XHTML 1.1//EN"
       doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
       href="{concat($g_outdir, @title, $suffix, '.html')}">
             <!-- reddit button -->
             <script type="text/javascript">
               reddit_url = '<xsl:value-of select="$realurl" />';
-              reddit_title = '<xsl:value-of select="fn:encode-for-uri(@title)" />';
+              reddit_title = '<xsl:value-of select="csc:encode-for-uri(@title)" />';
             </script>
             <script src="http://reddit.com/button.js?t=3"
                     type="text/javascript">
         <xsl:call-template name="footer" />
       </div></body>
     </html>
-  </xsl:result-document>
+  </xsl:document>
 </xsl:template>
 
 </xsl:stylesheet>