1 | <!--
|
---|
2 | Copyright 2004 The Apache Software Foundation
|
---|
3 |
|
---|
4 | Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | you may not use this file except in compliance with the License.
|
---|
6 | You may obtain a copy of the License at
|
---|
7 |
|
---|
8 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 |
|
---|
10 | Unless required by applicable law or agreed to in writing, software
|
---|
11 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | See the License for the specific language governing permissions and
|
---|
14 | limitations under the License.
|
---|
15 |
|
---|
16 | -->
|
---|
17 | <!-- a stylesheet to display changelogs ala netbeans -->
|
---|
18 | <xsl:stylesheet
|
---|
19 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
20 | version="1.0">
|
---|
21 | <xsl:param name="title"/>
|
---|
22 | <xsl:param name="module"/>
|
---|
23 | <xsl:param name="cvsweb"/>
|
---|
24 |
|
---|
25 | <xsl:output method="html" indent="yes"/>
|
---|
26 |
|
---|
27 | <!-- Copy standard document elements. Elements that
|
---|
28 | should be ignored must be filtered by apply-templates
|
---|
29 | tags. -->
|
---|
30 | <xsl:template match="*">
|
---|
31 | <xsl:copy>
|
---|
32 | <xsl:copy-of select="attribute::*[. != '']"/>
|
---|
33 | <xsl:apply-templates/>
|
---|
34 | </xsl:copy>
|
---|
35 | </xsl:template>
|
---|
36 |
|
---|
37 | <xsl:template match="tagdiff">
|
---|
38 | <HTML>
|
---|
39 | <HEAD>
|
---|
40 | <TITLE><xsl:value-of select="$title"/></TITLE>
|
---|
41 | </HEAD>
|
---|
42 | <BODY link="#000000" alink="#000000" vlink="#000000" text="#000000">
|
---|
43 | <style type="text/css">
|
---|
44 | body, p {
|
---|
45 | font-family: verdana,arial,helvetica;
|
---|
46 | font-size: 80%;
|
---|
47 | color:#000000;
|
---|
48 | }
|
---|
49 | .dateAndAuthor {
|
---|
50 | font-family: verdana,arial,helvetica;
|
---|
51 | font-size: 80%;
|
---|
52 | font-weight: bold;
|
---|
53 | text-align:left;
|
---|
54 | background:#a6caf0;
|
---|
55 | }
|
---|
56 | tr, td{
|
---|
57 | font-family: verdana,arial,helvetica;
|
---|
58 | font-size: 80%;
|
---|
59 | background:#eeeee0;
|
---|
60 | }
|
---|
61 | </style>
|
---|
62 | <h1>
|
---|
63 | <a name="top"><xsl:value-of select="$title"/></a>
|
---|
64 | </h1>
|
---|
65 | Tagdiff between <xsl:value-of select="@startTag"/> <xsl:value-of select="@startDate"/> and
|
---|
66 | <xsl:value-of select="@endTag"/> <xsl:value-of select="@endDate"/>
|
---|
67 | <p align="right">Designed for use with <a href="http://ant.apache.org/">Ant</a>.</p>
|
---|
68 | <hr size="2"/>
|
---|
69 | <a name="TOP"/>
|
---|
70 | <table width="100%">
|
---|
71 | <tr>
|
---|
72 | <td align="right">
|
---|
73 | <a href="#New">New Files</a> |
|
---|
74 | <a href="#Modified">Modified Files</a> |
|
---|
75 | <a href="#Removed">Removed Files</a>
|
---|
76 | </td>
|
---|
77 | </tr>
|
---|
78 | </table>
|
---|
79 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1">
|
---|
80 | <xsl:call-template name="show-entries">
|
---|
81 | <xsl:with-param name="title">New Files</xsl:with-param>
|
---|
82 | <xsl:with-param name="anchor">New</xsl:with-param>
|
---|
83 | <xsl:with-param name="entries" select=".//entry[file/revision][not(file/prevrevision)]"/>
|
---|
84 | </xsl:call-template>
|
---|
85 |
|
---|
86 | <xsl:call-template name="show-entries">
|
---|
87 | <xsl:with-param name="title">Modified Files</xsl:with-param>
|
---|
88 | <xsl:with-param name="anchor">Modified</xsl:with-param>
|
---|
89 | <xsl:with-param name="entries" select=".//entry[file/revision][file/prevrevision]"/>
|
---|
90 | </xsl:call-template>
|
---|
91 |
|
---|
92 | <xsl:call-template name="show-entries">
|
---|
93 | <xsl:with-param name="title">Removed Files</xsl:with-param>
|
---|
94 | <xsl:with-param name="anchor">Removed</xsl:with-param>
|
---|
95 | <xsl:with-param name="entries" select=".//entry[not(file/revision)][not(file/prevrevision)]"/>
|
---|
96 | </xsl:call-template>
|
---|
97 | </TABLE>
|
---|
98 |
|
---|
99 | </BODY>
|
---|
100 | </HTML>
|
---|
101 | </xsl:template>
|
---|
102 |
|
---|
103 | <xsl:template name="show-entries">
|
---|
104 | <xsl:param name="title"/>
|
---|
105 | <xsl:param name="anchor"/>
|
---|
106 | <xsl:param name="entries"/>
|
---|
107 | <TR>
|
---|
108 | <TD colspan="2" class="dateAndAuthor">
|
---|
109 | <a>
|
---|
110 | <xsl:attribute name="name"><xsl:value-of select="$anchor"/></xsl:attribute>
|
---|
111 | <xsl:value-of select="$title"/> - <xsl:value-of select="count($entries)"/> entries
|
---|
112 | </a>
|
---|
113 | <a href="#TOP">(back to top)</a>
|
---|
114 | </TD>
|
---|
115 | </TR>
|
---|
116 | <TR>
|
---|
117 | <TD width="20">
|
---|
118 | <xsl:text> </xsl:text>
|
---|
119 | </TD>
|
---|
120 | <TD>
|
---|
121 | <ul>
|
---|
122 | <xsl:apply-templates select="$entries"/>
|
---|
123 | </ul>
|
---|
124 | </TD>
|
---|
125 | </TR>
|
---|
126 | </xsl:template>
|
---|
127 |
|
---|
128 | <xsl:template match="entry">
|
---|
129 | <xsl:apply-templates select="file"/>
|
---|
130 | </xsl:template>
|
---|
131 |
|
---|
132 | <xsl:template match="date">
|
---|
133 | <i><xsl:value-of select="."/></i>
|
---|
134 | </xsl:template>
|
---|
135 |
|
---|
136 | <xsl:template match="time">
|
---|
137 | <i><xsl:value-of select="."/></i>
|
---|
138 | </xsl:template>
|
---|
139 |
|
---|
140 | <xsl:template match="author">
|
---|
141 | <i>
|
---|
142 | <a>
|
---|
143 | <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
|
---|
144 | <xsl:value-of select="."/>
|
---|
145 | </a>
|
---|
146 | </i>
|
---|
147 | </xsl:template>
|
---|
148 |
|
---|
149 | <xsl:template match="file">
|
---|
150 | <li>
|
---|
151 | <a target="_new">
|
---|
152 | <xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" /></xsl:attribute>
|
---|
153 | <xsl:value-of select="name" />
|
---|
154 | </a>
|
---|
155 | <xsl:if test="string-length(prevrevision) > 0 or string-length(revision) > 0">
|
---|
156 | <xsl:text> </xsl:text>
|
---|
157 | <a target="_new">
|
---|
158 | <xsl:choose>
|
---|
159 | <xsl:when test="string-length(prevrevision) = 0 ">
|
---|
160 | <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" />&content-type=text/x-cvsweb-markup</xsl:attribute>
|
---|
161 | </xsl:when>
|
---|
162 | <xsl:otherwise>
|
---|
163 | <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" />&r2=<xsl:value-of select="prevrevision"/>&diff_format=h</xsl:attribute>
|
---|
164 | </xsl:otherwise>
|
---|
165 | </xsl:choose> (<xsl:value-of select="revision"/>)
|
---|
166 | </a>
|
---|
167 | </xsl:if>
|
---|
168 | </li>
|
---|
169 | </xsl:template>
|
---|
170 |
|
---|
171 | <!-- Any elements within a msg are processed,
|
---|
172 | so that we can preserve HTML tags. -->
|
---|
173 | <xsl:template match="msg">
|
---|
174 | <b><xsl:apply-templates/></b>
|
---|
175 | </xsl:template>
|
---|
176 |
|
---|
177 | </xsl:stylesheet>
|
---|