Project

General

Profile

Download (4.68 KB) Statistics
| Branch: | Revision:

git_sitools_idoc / flarecast / cots / ant / apache-ant-1.8.1 / etc / changelog.xsl @ d2a8c3fd

1 d2a8c3fd Marc NICOLAS
<?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
   Licensed to the Apache Software Foundation (ASF) under one or more
9
   contributor license agreements.  See the NOTICE file distributed with
10
   this work for additional information regarding copyright ownership.
11
   The ASF licenses this file to You under the Apache License, Version 2.0
12
   (the "License"); you may not use this file except in compliance with
13
   the License.  You may obtain a copy of the License at
14
15
       http://www.apache.org/licenses/LICENSE-2.0
16
17
   Unless required by applicable law or agreed to in writing, software
18
   distributed under the License is distributed on an "AS IS" BASIS,
19
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
   See the License for the specific language governing permissions and
21
   limitations under the License.
22
   
23
-->
24
  <xsl:param name="title"/>
25
  <xsl:param name="module"/>
26
  <xsl:param name="cvsweb"/>
27
28
  <xsl:output method="html" indent="yes" encoding="US-ASCII"
29
              doctype-public="-//W3C//DTD HTML 4.01//EN"
30
              doctype-system="http://www.w3.org/TR/html401/strict.dtd"/>
31
32
  <!-- Copy standard document elements.  Elements that
33
       should be ignored must be filtered by apply-templates
34
       tags. -->
35
  <xsl:template match="*">
36
    <xsl:copy>
37
      <xsl:copy-of select="attribute::*[. != '']"/>
38
      <xsl:apply-templates/>
39
    </xsl:copy>
40
  </xsl:template>
41
42
  <xsl:template match="changelog">
43
    <html>
44
      <head>
45
        <title><xsl:value-of select="$title"/></title>
46
        <style type="text/css">
47
          body, p {
48
            font-family: Verdana, Arial, Helvetica, sans-serif;
49
            font-size: 80%;
50
            color: #000000;
51
            background-color: #ffffff;
52
          }
53
          tr, td {
54
            font-family: Verdana, Arial, Helvetica, sans-serif;
55
            background: #eeeee0;
56
          }
57
          td {
58
            padding-left: 20px;
59
          }
60
      .dateAndAuthor {
61
            font-family: Verdana, Arial, Helvetica, sans-serif;
62
            font-weight: bold;
63
            text-align: left;
64
            background: #a6caf0;
65
            padding-left: 3px;
66
      }
67
          a {
68
            color: #000000;
69
          }
70
          pre {
71
            font-weight: bold;
72
          }
73
        </style>
74
      </head>
75
      <body>
76
        <h1>
77
          <a name="top"><xsl:value-of select="$title"/></a>
78
        </h1>
79
        <p style="text-align: right">Designed for use with <a href="http://ant.apache.org/">Apache Ant</a>.</p>
80
        <hr/>
81
        <table border="0" width="100%" cellspacing="1">
82
          
83
          <xsl:apply-templates select=".//entry">
84
            <xsl:sort select="date" data-type="text" order="descending"/>
85
            <xsl:sort select="time" data-type="text" order="descending"/>
86
          </xsl:apply-templates>
87
          
88
        </table>
89
        
90
      </body>
91
    </html>
92
  </xsl:template>
93
  
94
  <xsl:template match="entry">
95
    <tr>
96
      <td class="dateAndAuthor">
97
        <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
98
      </td>
99
    </tr>
100
    <tr>
101
      <td>
102
        <pre>
103
<xsl:apply-templates select="msg"/></pre>
104
        <ul>
105
          <xsl:apply-templates select="file"/>
106
        </ul>
107
      </td>
108
    </tr>
109
  </xsl:template>
110
111
  <xsl:template match="date">
112
    <i><xsl:value-of select="."/></i>
113
  </xsl:template>
114
115
  <xsl:template match="time">
116
    <i><xsl:value-of select="."/></i>
117
  </xsl:template>
118
119
  <xsl:template match="author">
120
    <i>
121
      <a>
122
        <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
123
        <xsl:value-of select="."/></a>
124
    </i>
125
  </xsl:template>
126
127
  <xsl:template match="file">
128
    <li>
129
      <a>
130
        <xsl:choose>
131
          <xsl:when test="string-length(prevrevision) = 0 ">
132
            <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>
133
          </xsl:when>
134
          <xsl:otherwise>
135
            <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>
136
          </xsl:otherwise>
137
        </xsl:choose>
138
        <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)</a>
139
    </li>
140
  </xsl:template>
141
142
  <!-- Any elements within a msg are processed,
143
       so that we can preserve HTML tags. -->
144
  <xsl:template match="msg">
145
    <xsl:apply-templates/>
146
  </xsl:template>
147
  
148
</xsl:stylesheet>