Logoj0ke.net Open Build Service > Projects > ha:uplex > varnish2 > changes-html.xsl
Sign Up | Log In

File changes-html.xsl of Package varnish2 (Revision 3)

Currently displaying revision 3, show latest

 
1
<?xml version="1.0" encoding="utf-8"?>
2
<!DOCTYPE stylesheet [
3
 <!ENTITY space "&#32;">
4
 <!ENTITY nbsp "&#160;">
5
]>
6
<!-- $Id$ -->
7
<xsl:stylesheet version="1.0"
8
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9
 xmlns="http://www.w3.org/1999/xhtml">
10
  <xsl:output method="xml" encoding="utf-8" media-type="text/html" indent="yes"/>
11
12
  <xsl:strip-space elements="*"/>
13
14
  <xsl:template match="/changelog">
15
    <html>
16
      <head>
17
    <title><xsl:call-template name="title"/></title>
18
    <link rel="stylesheet" type="text/css" href="changes.css"/>
19
      </head>
20
      <body>
21
    <h1><xsl:call-template name="title"/></h1>
22
    <xsl:apply-templates select="group"/>
23
      </body>
24
    </html>
25
  </xsl:template>
26
27
  <xsl:template name="title">
28
    <xsl:text>Change log for&space;</xsl:text>
29
    <xsl:value-of select="package"/>
30
    <xsl:text>&space;</xsl:text>
31
    <xsl:value-of select="version"/>
32
  </xsl:template>
33
34
  <xsl:template match="group">
35
    <h2>
36
      <xsl:text>Changes between&space;</xsl:text>
37
      <xsl:value-of select="@from"/>
38
      <xsl:text>&space;and&space;</xsl:text>
39
      <xsl:value-of select="@to"/>
40
    </h2>
41
    <xsl:apply-templates select="subsystem"/>
42
  </xsl:template>
43
44
  <xsl:template match="subsystem">
45
    <h3>
46
      <xsl:value-of select="name"/>
47
    </h3>
48
    <ul>
49
      <xsl:apply-templates select="change"/>
50
    </ul>
51
  </xsl:template>
52
53
  <xsl:template match="change">
54
    <li>
55
      <xsl:apply-templates/>
56
    </li>
57
  </xsl:template>
58
59
  <xsl:template match="para">
60
    <p>
61
      <xsl:apply-templates/>
62
    </p>
63
  </xsl:template>
64
65
  <xsl:template match="ticket">
66
    <a>
67
      <xsl:attribute name="href">
68
    <xsl:text>http://varnish.projects.linpro.no/ticket/</xsl:text>
69
    <xsl:value-of select="@ref"/>
70
      </xsl:attribute>
71
      <xsl:text>ticket #</xsl:text>
72
      <xsl:value-of select="@ref"/>
73
    </a>
74
  </xsl:template>
75
76
  <xsl:template match="code">
77
    <span>
78
      <xsl:attribute name="class">
79
    <xsl:value-of select="name()"/>
80
      </xsl:attribute>
81
      <xsl:apply-templates/>
82
    </span>
83
  </xsl:template>
84
85
  <xsl:template match="*" priority="-1">
86
    <xsl:message>Warning: no template for element <xsl:value-of select="name(
87
)"/></xsl:message>
88
    <xsl:value-of select="concat('&lt;', name(), '&gt;')"/>
89
    <xsl:apply-templates/>
90
    <xsl:value-of select="concat('&lt;/', name(), '&gt;')"/>
91
  </xsl:template>
92
</xsl:stylesheet>
93