[Libreoffice-commits] .: bug/bug.xhtml bug/bug.xsl bug/Makefile

Loic Dachary loic at kemper.freedesktop.org
Wed Sep 21 05:42:34 PDT 2011


 bug/Makefile  |    4 +++-
 bug/bug.xhtml |    2 +-
 bug/bug.xsl   |   23 +++++++++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)

New commits:
commit b600ead9106b7304f6c010d1edf747a2dff41362
Author: Loic Dachary <loic at dachary.org>
Date:   Wed Sep 21 14:42:28 2011 +0200

    append a timestamp at the end of each js and css to make sure they are always reloaded when updated, no matter how agressive the cache policy is

diff --git a/bug/Makefile b/bug/Makefile
index da6d621..5878305 100644
--- a/bug/Makefile
+++ b/bug/Makefile
@@ -10,4 +10,6 @@ extract:
 	perl query.pl versions < query.xhtml > versions.xhtml
 
 compose:
-	xsltproc --encoding UTF-8 --novalid bug.xsl bug.xhtml > bug/bug.html
+	xsltproc --encoding UTF-8 --novalid \
+		--stringparam serial `date +%s` \
+		bug.xsl bug.xhtml > bug/bug.html
diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index 4e1806e..15db192 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -7,7 +7,7 @@
 	  <!ENTITY versions SYSTEM "versions.xhtml">
 	  ]
 	  >
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html >
   <head>
     <title>Bug Submission Assistant</title>
     <meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
diff --git a/bug/bug.xsl b/bug/bug.xsl
index a568ddc..8018e3e 100644
--- a/bug/bug.xsl
+++ b/bug/bug.xsl
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
@@ -8,6 +9,28 @@
               doctype-system="http://www.w3.org/TR/html4/strict.dtd"
               indent="yes" />
 
+  <xsl:param name="serial">0</xsl:param>
+
+  <xsl:template match="/html/body">
+    <body>
+      <xsl:comment>
+	DO NOT MODIFY THIS DOCUMENT. IT WAS GENERATED BY XSLT PROCESSING
+	AND YOUR MODIFICATIONS WILL BE LOST. THE SOURCE OF THE DOCUMENT
+	IS IN THE bug.xhtml FILE FOUND AT
+        git clone git://anongit.freedesktop.org/libreoffice/website libreoffice
+      </xsl:comment>
+      <xsl:apply-templates select="node()"/>
+    </body>
+  </xsl:template>
+  
+  <xsl:template match="/html/head/script/@src">
+    <xsl:attribute name="src"><xsl:value-of select='concat(.,"?",$serial)'></xsl:value-of></xsl:attribute>
+  </xsl:template>
+
+  <xsl:template match="/html/head/link/@href">
+    <xsl:attribute name="href"><xsl:value-of select='concat(.,"?",$serial)'></xsl:value-of></xsl:attribute>
+  </xsl:template>
+
   <xsl:template match="@*|node()">
     <xsl:copy>
       <xsl:apply-templates select="@*|node()"/>


More information about the Libreoffice-commits mailing list