On Thu, Jan 05, 2017 at 03:34:35PM +0100, Andrea Bolognani wrote:
Currently, building the NEWS file involves using a XSLT stylesheet to extract information from the same HTML file that's used on the libvirt website. The process works, but it's quite fiddly in that it requires the source HTML to be formatted in a very precise way, and a single missing newline can mess up the resulting plain text considerably. Moreover, the XSLT stylesheet itself encodes a lot of the details of converting to plain text in a way that's not necessarily easy to understand, tweak or fix. To improve the process, move all existing entries to a new XML file that contains exactly the information we care about in a simple structured format, and start generating both the HTML and plain text versions of the release notes using XSLT stylesheets that can now afford to be almost trivial. --- Changes from v1: * Address review comments - Rename XSLT stylesheets to news-{ascii,html}.xsl - Add "do not edit" note to news.html.in - Add "older releases" note to NEWS * Rename XML elements - <change> instead of <item> - <libvirt> instead of <releases> .gitignore | 1 + Makefile.am | 6 +- docs/Makefile.am | 23 ++++- docs/news-ascii.xsl | 66 ++++++++++++++ docs/news-html.xsl | 97 +++++++++++++++++++++ docs/news.html.in | 157 ---------------------------------- docs/news.xml | 241 ++++++++++++++++++++++++++++++++++++++++++++++++++++ docs/news.xsl | 50 ----------- 8 files changed, 428 insertions(+), 213 deletions(-) create mode 100644 docs/news-ascii.xsl create mode 100644 docs/news-html.xsl delete mode 100644 docs/news.html.in create mode 100644 docs/news.xml delete mode 100644 docs/news.xsl diff --git a/docs/news-html.xsl b/docs/news-html.xsl new file mode 100644 index 0000000..5b0872a --- /dev/null +++ b/docs/news-html.xsl @@ -0,0 +1,97 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + <xsl:output method="xml" indent="yes" encoding="UTF-8"/> + + <!-- This XSLT stylesheet can be applied to the XML version of the release + notes to produce an HTML document suitable for further processing. + In particular, the final output will end up on the libvirt website --> + + <!-- Document --> + <xsl:template match="/libvirt"> + <xsl:text disable-output-escaping="yes"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +</xsl:text> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + </head> + <body> + <xsl:text disable-output-escaping="yes"> + + <!-- DO NOT EDIT THIS FILE! It was generated automatically. + Edit the source file (news.xml) instead --> + + </xsl:text> + <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> + <xsl:apply-templates select="release"/> + <p>Older libvirt releases 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
I think you meant s/those older release/older releases/ here. Or s/those/any/, I don't know. Just make it readable ;) ACK
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list