The new format requires some tweaks to be translated into
a nice plain text output, and the XSLT stylesheet needs to
be updated to match.
---
My XSLT skills are quite poor (heck, I can't even write XSLT
right half of the time!) but I've spent way too much time on
this and I'm quite tired now, so it will have to do.
At least both the source HTML and the output text are pretty
reasonable...
docs/news.html.in | 39 ++++++++++++++++++++++-----------------
docs/news.xsl | 34 ++++++++++++++++------------------
2 files changed, 38 insertions(+), 35 deletions(-)
diff --git a/docs/news.html.in b/docs/news.html.in
index 229bc24..26d3548 100644
--- a/docs/news.html.in
+++ b/docs/news.html.in
@@ -5,25 +5,30 @@
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
</head>
<body>
- <h1>Releases (2016)</h1>
- <p>Here is the list of official releases made during the year 2016.
- A similar list for <a href="news-2015.html">2015</a> is also
available.
- </p>
- <p>It is also possible to just use
- the <a href="downloads.html">GIT version or snapshot</a>,
- contact the mailing list and check
- the <a
href="http://libvirt.org/git/?p=libvirt.git;a=log">GIT
log</a>
- to gauge progress.
+ <h1>Releases</h1>
+ <p>This is the list of official releases for libvirt, along with an
+ overview of the changes introduced by each of them.</p>
+ <p>For a more fine-grained view, use the
+ <a
href="http://libvirt.org/git/?p=libvirt.git;a=log">git
log</a>.
</p>
- <h3>v2.5.0: <i>unreleased</i></h3>
- <ul>
- <li>Switch to an improved NEWS file format<br/>
- List user-visible changes instead of single commits for a better
- high-level overview of differences between libvirt releases
- </li>
- <li>Various bug fixes and improvements</li>
- </ul>
+ <h3>v2.5.0 (<i>unreleased</i>)</h3>
+ <ul>
+ <li><strong>Improvements</strong>
+ <ul>
+ <li>NEWS: Switch to an improved format<br/>
+ List user-visible changes instead of single commits for a better
+ high-level overview of differences between libvirt releases
+ </li>
+ </ul>
+ </li>
+ </ul>
+
+ <p>Releases earlier than v2.5.0 detailed their changes using a different
+ format and as such are excluded from the list above.
+ You can read about those older release, starting from those made in
+ <a href="news-2016.html">2016</a>.
+ </p>
</body>
</html>
diff --git a/docs/news.xsl b/docs/news.xsl
index 916bc4b..33506a9 100644
--- a/docs/news.xsl
+++ b/docs/news.xsl
@@ -5,13 +5,8 @@
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
- <xsl:text>
- NEWS file for libvirt
-
- Note that this file contains only the most recent releases; for the full
- list, please visit:
-
http://libvirt.org/news.html
-
+ <xsl:text>libvirt releases
+================
</xsl:text>
<xsl:apply-templates select="html:html/html:body/*"/>
</xsl:template>
@@ -22,30 +17,33 @@
<xsl:template match="html:h3">
<xsl:text>
</xsl:text>
+ <xsl:text># </xsl:text>
<xsl:apply-templates/>
- <xsl:text>:
+ <xsl:text>
+
</xsl:text>
</xsl:template>
<xsl:template match="html:ul">
- <xsl:apply-templates select="html:li"/>
- <xsl:text>
-</xsl:text>
+ <xsl:apply-templates select="html:li"/>
</xsl:template>
<xsl:template match="html:li">
- <xsl:text> - </xsl:text>
- <xsl:value-of select="."/>
+ <xsl:text> * </xsl:text>
+ <xsl:apply-templates select="html:strong|*/html:li"/>
+ </xsl:template>
+
+ <xsl:template match="html:li/*/html:li">
+ <xsl:text> - </xsl:text>
+ <xsl:apply-templates/>
<xsl:text>
</xsl:text>
</xsl:template>
- <xsl:template match="html:a">
- <xsl:value-of select="."/>
- <xsl:text> at
-</xsl:text>
- <xsl:value-of select="@href"/>
+ <xsl:template match="html:strong">
+ <xsl:apply-templates/>
<xsl:text>
+
</xsl:text>
</xsl:template>
--
2.7.4