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