Debian Codegraph @

tools/changelog.xsl

raw
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <xsl:stylesheet
4 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
5 version='1.0'>
6
7 <!--
8 Copyright 2001-2004 The Apache Software Foundation.
9
10 Licensed under the Apache License, Version 2.0 (the "License");
11 you may not use this file except in compliance with the License.
12 You may obtain a copy of the License at
13
14 http://www.apache.org/licenses/LICENSE-2.0
15
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
21 -->
22 <xsl:param name="title"/>
23 <xsl:param name="module"/>
24 <xsl:param name="cvsweb"/>
25
26 <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
27
28 <!-- Copy standard document elements. Elements that
29 should be ignored must be filtered by apply-templates
30 tags. -->
31 <xsl:template match="*">
32 <xsl:copy>
33 <xsl:copy-of select="attribute::*[. != '']"/>
34 <xsl:apply-templates/>
35 </xsl:copy>
36 </xsl:template>
37
38 <xsl:template match="changelog">
39 <HTML>
40 <HEAD>
41 <TITLE><xsl:value-of select="$title"/></TITLE>
42 <link href="axis.css" rel="stylesheet" type="text/css"></link>
43 </HEAD>
44 <BODY link="#000000" alink="#000000" vlink="#000000" text="#000000">
45 <h1>
46 <a name="top"><xsl:value-of select="$title"/></a>
47 </h1>
48 <p align="right">Designed for use with <a href="http://jakarta.apache.org">Ant</a>.</p>
49 <hr size="2"/>
50 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1">
51
52 <xsl:apply-templates select=".//entry">
53 <xsl:sort select="date" data-type="text" order="descending"/>
54 <xsl:sort select="time" data-type="text" order="descending"/>
55 </xsl:apply-templates>
56
57 </TABLE>
58
59 </BODY>
60 </HTML>
61 </xsl:template>
62
63 <xsl:template match="entry">
64 <TR>
65 <TD colspan="2" class="dateAndAuthor">
66 <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
67 </TD>
68 </TR>
69 <TR>
70 <TD width="20">
71 <xsl:text> </xsl:text>
72 </TD>
73 <TD>
74 <pre>
75 <xsl:apply-templates select="msg"/></pre>
76 <ul>
77 <xsl:apply-templates select="file"/>
78 </ul>
79 </TD>
80 </TR>
81 </xsl:template>
82
83 <xsl:template match="date">
84 <i><xsl:value-of select="."/></i>
85 </xsl:template>
86
87 <xsl:template match="time">
88 <i><xsl:value-of select="."/></i>
89 </xsl:template>
90
91 <xsl:template match="author">
92 <i>
93 <a>
94 <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
95 <xsl:value-of select="."/>
96 </a>
97 </i>
98 </xsl:template>
99
100 <xsl:template match="file">
101 <li>
102 <a>
103 <xsl:choose>
104 <xsl:when test="string-length(prevrevision) = 0 ">
105 <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&amp;content-type=text/x-cvsweb-markup</xsl:attribute>
106 </xsl:when>
107 <xsl:otherwise>
108 <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&amp;r2=<xsl:value-of select="prevrevision"/></xsl:attribute>
109 </xsl:otherwise>
110 </xsl:choose>
111 <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)
112 </a>
113 </li>
114 </xsl:template>
115
116 <!-- Any elements within a msg are processed,
117 so that we can preserve HTML tags. -->
118 <xsl:template match="msg">
119 <b><xsl:apply-templates/></b>
120 </xsl:template>
121
122 </xsl:stylesheet>
123