You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

changelog.xsl 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet
  3. xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  4. version='1.0'>
  5. <!--
  6. The Apache Software License, Version 1.1
  7. Copyright (c) 2002 The Apache Software Foundation. All rights
  8. reserved.
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions
  11. are met:
  12. 1. Redistributions of source code must retain the above copyright
  13. notice, this list of conditions and the following disclaimer.
  14. 2. Redistributions in binary form must reproduce the above copyright
  15. notice, this list of conditions and the following disclaimer in
  16. the documentation and/or other materials provided with the
  17. distribution.
  18. 3. The end-user documentation included with the redistribution, if
  19. any, must include the following acknowlegement:
  20. "This product includes software developed by the
  21. Apache Software Foundation (http://www.apache.org/)."
  22. Alternately, this acknowlegement may appear in the software itself,
  23. if and wherever such third-party acknowlegements normally appear.
  24. 4. The names "The Jakarta Project", "Ant", and "Apache Software
  25. Foundation" must not be used to endorse or promote products derived
  26. from this software without prior written permission. For written
  27. permission, please contact apache@apache.org.
  28. 5. Products derived from this software may not be called "Apache"
  29. nor may "Apache" appear in their names without prior written
  30. permission of the Apache Group.
  31. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  32. WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  33. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  34. DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  35. ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  36. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  37. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  38. USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  39. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  40. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  41. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  42. SUCH DAMAGE.
  43. ====================================================================
  44. This software consists of voluntary contributions made by many
  45. individuals on behalf of the Apache Software Foundation. For more
  46. information on the Apache Software Foundation, please see
  47. <http://www.apache.org/>.
  48. -->
  49. <xsl:param name="title"/>
  50. <xsl:param name="module"/>
  51. <xsl:param name="cvsweb"/>
  52. <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
  53. <!-- Copy standard document elements. Elements that
  54. should be ignored must be filtered by apply-templates
  55. tags. -->
  56. <xsl:template match="*">
  57. <xsl:copy>
  58. <xsl:copy-of select="attribute::*[. != '']"/>
  59. <xsl:apply-templates/>
  60. </xsl:copy>
  61. </xsl:template>
  62. <xsl:template match="changelog">
  63. <HTML>
  64. <HEAD>
  65. <TITLE><xsl:value-of select="$title"/></TITLE>
  66. </HEAD>
  67. <BODY link="#000000" alink="#000000" vlink="#000000" text="#000000">
  68. <style type="text/css">
  69. body, p {
  70. font-family: verdana,arial,helvetica;
  71. font-size: 100%;
  72. color:#000000;
  73. }
  74. .dateAndAuthor {
  75. font-family: verdana,arial,helvetica;
  76. font-size: 100%;
  77. font-weight: bold;
  78. text-align:left;
  79. background:#a6caf0;
  80. }
  81. tr, td{
  82. font-family: verdana,arial,helvetica;
  83. font-size: 120%;
  84. background:#eeeee0;
  85. }
  86. </style>
  87. <h1>
  88. <a name="top"><xsl:value-of select="$title"/></a>
  89. </h1>
  90. <hr size="2"/>
  91. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1">
  92. <xsl:apply-templates select=".//entry">
  93. <xsl:sort select="date" data-type="text" order="descending"/>
  94. <xsl:sort select="time" data-type="text" order="descending"/>
  95. </xsl:apply-templates>
  96. </TABLE>
  97. </BODY>
  98. </HTML>
  99. </xsl:template>
  100. <xsl:template match="entry">
  101. <TR>
  102. <TD colspan="2" class="dateAndAuthor">
  103. <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
  104. </TD>
  105. </TR>
  106. <TR>
  107. <TD width="20">
  108. <xsl:text> </xsl:text>
  109. </TD>
  110. <TD>
  111. <pre>
  112. <xsl:apply-templates select="msg"/></pre>
  113. <ul>
  114. <xsl:apply-templates select="file"/>
  115. </ul>
  116. </TD>
  117. </TR>
  118. </xsl:template>
  119. <xsl:template match="date">
  120. <i><xsl:value-of select="."/></i>
  121. </xsl:template>
  122. <xsl:template match="time">
  123. <i><xsl:value-of select="."/></i>
  124. </xsl:template>
  125. <xsl:template match="author">
  126. <i>
  127. <a>
  128. <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
  129. <xsl:value-of select="."/>
  130. </a>
  131. </i>
  132. </xsl:template>
  133. <xsl:template match="file">
  134. <li>
  135. <a>
  136. <xsl:choose>
  137. <xsl:when test="string-length(prevrevision) = 0 ">
  138. <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>
  139. </xsl:when>
  140. <xsl:otherwise>
  141. <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>
  142. </xsl:otherwise>
  143. </xsl:choose>
  144. <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)
  145. </a>
  146. </li>
  147. </xsl:template>
  148. <!-- Any elements within a msg are processed,
  149. so that we can preserve HTML tags. -->
  150. <xsl:template match="msg">
  151. <b><xsl:apply-templates/></b>
  152. </xsl:template>
  153. </xsl:stylesheet>