]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
NEWS: Fix XSLT stylesheet
authorAndrea Bolognani <abologna@redhat.com>
Tue, 13 Oct 2015 07:44:13 +0000 (09:44 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 20 Oct 2015 15:30:34 +0000 (17:30 +0200)
This has been broken for a looong time - in fact, we've been
shipping a mostly-empty NEWS file for at least the past two years.

Including the html namespace and using it for matching elements,
like hacking1.xsl and hacking2.xsl were already doing, makes the
NEWS file useful again.

Add a note explaining that the release list has been split up
by year as well.

docs/news.xsl

index e35030e6888395e3347ec95f9161ec884fe6e4a0..916bc4b9cc8abf3b5a35d9e3f9620cd0555303c9 100644 (file)
@@ -1,39 +1,46 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-                version="1.0">
+<xsl:stylesheet version="1.0"
+                xmlns:html="http://www.w3.org/1999/xhtml"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="text" encoding="UTF-8"/>
 
   <xsl:template match="/">
     <xsl:text>
         NEWS file for libvirt
 
-  Note that this is automatically generated from the news webpage at:
+  Note that this file contains only the most recent releases; for the full
+  list, please visit:
        http://libvirt.org/news.html
 
 </xsl:text>
-    <xsl:apply-templates select="html/body/*"/>
+    <xsl:apply-templates select="html:html/html:body/*"/>
   </xsl:template>
-  <xsl:template match="h1"/>
 
-  <xsl:template match="h3">
+  <xsl:template match="html:h1"/>
+  <xsl:template match="html:p"/>
+
+  <xsl:template match="html:h3">
     <xsl:text>
 </xsl:text>
     <xsl:apply-templates/>
     <xsl:text>:
 </xsl:text>
   </xsl:template>
-  <xsl:template match="ul">
-    <xsl:apply-templates select=".//li"/>
+
+  <xsl:template match="html:ul">
+      <xsl:apply-templates select="html:li"/>
     <xsl:text>
 </xsl:text>
   </xsl:template>
-  <xsl:template match="li">
+
+  <xsl:template match="html:li">
     <xsl:text>   - </xsl:text>
     <xsl:value-of select="."/>
     <xsl:text>
 </xsl:text>
   </xsl:template>
-  <xsl:template match="a">
+
+  <xsl:template match="html:a">
     <xsl:value-of select="."/>
     <xsl:text> at
 </xsl:text>
@@ -41,6 +48,5 @@
     <xsl:text>
 </xsl:text>
   </xsl:template>
-  <xsl:template match="p">
-  </xsl:template>
+
 </xsl:stylesheet>