File: news-ascii.xsl

package info (click to toggle)
libvirt 5.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240,844 kB
  • sloc: ansic: 584,521; xml: 176,725; sh: 9,912; python: 4,731; perl: 4,343; makefile: 3,321; ml: 465
file content (69 lines) | stat: -rw-r--r-- 1,944 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="text" encoding="UTF-8"/>

  <!-- This XSLT stylesheet can be applied to the XML version of the release
       notes to produce a plain text document. The output document is not
       formatted properly and needs to be processed further -->

  <!-- Document -->
  <xsl:template match="/libvirt">
    <xsl:text>libvirt releases
================
</xsl:text>
    <xsl:apply-templates select="release"/>
    <xsl:text>
==============================================================================
Older libvirt releases didn't have proper release notes: if you are interested
in changes between them, you should check out docs/news-*.html or the full git
log (see instructions in ChangeLog).
</xsl:text>
  </xsl:template>

  <!-- Release -->
  <xsl:template match="release">
    <xsl:text>
# </xsl:text>
    <xsl:value-of select="@version"/>
    <xsl:text> (</xsl:text>
    <xsl:value-of select="@date"/>
    <xsl:text>)
</xsl:text>
    <xsl:apply-templates select="section"/>
  </xsl:template>

  <!-- Section -->
  <xsl:template match="section">
    <xsl:text>
* </xsl:text>
    <xsl:value-of select="@title"/>
    <xsl:text>
</xsl:text>
    <xsl:apply-templates select="change"/>
  </xsl:template>

  <!-- Change -->
  <xsl:template match="change">
    <xsl:text>
</xsl:text>
    <xsl:apply-templates select="summary"/>
    <xsl:apply-templates select="description"/>
  </xsl:template>

  <!-- Change summary -->
  <xsl:template match="summary">
    <xsl:text>- </xsl:text>
    <xsl:value-of select="normalize-space()"/>
    <xsl:text>
</xsl:text>
  </xsl:template>

  <!-- Change description -->
  <xsl:template match="description">
    <xsl:text>|</xsl:text> <!-- This will be removed when reformatting -->
    <xsl:value-of select="normalize-space()"/>
    <xsl:text>
</xsl:text>
  </xsl:template>

</xsl:stylesheet>