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 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!-- Copyright (C) 2004 The Apache Software Foundation. All rights reserved. -->
  3. <xsl:stylesheet
  4. xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  5. version='1.0'>
  6. <!--
  7. Copyright 2002-2004 Apache Software Foundation
  8. Licensed under the Apache License, Version 2.0 (the "License");
  9. you may not use this file except in compliance with the License.
  10. You may obtain a copy of the License at
  11. http://www.apache.org/licenses/LICENSE-2.0
  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. <xsl:param name="title"/>
  19. <xsl:param name="module"/>
  20. <xsl:param name="cvsweb"/>
  21. <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
  22. <!-- Copy standard document elements. Elements that
  23. should be ignored must be filtered by apply-templates
  24. tags. -->
  25. <xsl:template match="*">
  26. <xsl:copy>
  27. <xsl:copy-of select="attribute::*[. != '']"/>
  28. <xsl:apply-templates/>
  29. </xsl:copy>
  30. </xsl:template>
  31. <xsl:template match="changelog">
  32. <HTML>
  33. <HEAD>
  34. <TITLE><xsl:value-of select="$title"/></TITLE>
  35. </HEAD>
  36. <BODY link="#000000" alink="#000000" vlink="#000000" text="#000000">
  37. <style type="text/css">
  38. body, p {
  39. font-family: verdana,arial,helvetica;
  40. font-size: 100%;
  41. color:#000000;
  42. }
  43. .dateAndAuthor {
  44. font-family: verdana,arial,helvetica;
  45. font-size: 100%;
  46. font-weight: bold;
  47. text-align:left;
  48. background:#a6caf0;
  49. }
  50. tr, td{
  51. font-family: verdana,arial,helvetica;
  52. font-size: 120%;
  53. background:#eeeee0;
  54. }
  55. </style>
  56. <h1>
  57. <a name="top"><xsl:value-of select="$title"/></a>
  58. </h1>
  59. <hr size="2"/>
  60. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="3" CELLSPACING="1">
  61. <xsl:apply-templates select=".//entry">
  62. <xsl:sort select="date" data-type="text" order="descending"/>
  63. <xsl:sort select="time" data-type="text" order="descending"/>
  64. </xsl:apply-templates>
  65. </TABLE>
  66. </BODY>
  67. </HTML>
  68. </xsl:template>
  69. <xsl:template match="entry">
  70. <TR>
  71. <TD colspan="2" class="dateAndAuthor">
  72. <xsl:value-of select="date"/><xsl:text> </xsl:text><xsl:value-of select="time"/><xsl:text> </xsl:text><xsl:value-of select="author"/>
  73. </TD>
  74. </TR>
  75. <TR>
  76. <TD width="20">
  77. <xsl:text> </xsl:text>
  78. </TD>
  79. <TD>
  80. <pre>
  81. <xsl:apply-templates select="msg"/></pre>
  82. <ul>
  83. <xsl:apply-templates select="file"/>
  84. </ul>
  85. </TD>
  86. </TR>
  87. </xsl:template>
  88. <xsl:template match="date">
  89. <i><xsl:value-of select="."/></i>
  90. </xsl:template>
  91. <xsl:template match="time">
  92. <i><xsl:value-of select="."/></i>
  93. </xsl:template>
  94. <xsl:template match="author">
  95. <i>
  96. <a>
  97. <xsl:attribute name="href">mailto:<xsl:value-of select="."/></xsl:attribute>
  98. <xsl:value-of select="."/>
  99. </a>
  100. </i>
  101. </xsl:template>
  102. <xsl:template match="file">
  103. <li>
  104. <a>
  105. <xsl:choose>
  106. <xsl:when test="string-length(prevrevision) = 0 ">
  107. <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>
  108. </xsl:when>
  109. <xsl:otherwise>
  110. <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>
  111. </xsl:otherwise>
  112. </xsl:choose>
  113. <xsl:value-of select="name" /> (<xsl:value-of select="revision"/>)
  114. </a>
  115. </li>
  116. </xsl:template>
  117. <!-- Any elements within a msg are processed,
  118. so that we can preserve HTML tags. -->
  119. <xsl:template match="msg">
  120. <b><xsl:apply-templates/></b>
  121. </xsl:template>
  122. </xsl:stylesheet>