/etc/svn2cl/svn2html.xsl is in subversion-tools 1.6.17dfsg-3ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | <?xml version="1.0" encoding="utf-8"?>
<!--
svn2html.xsl - xslt stylesheet for converting svn log to a normal
changelog fromatted in html
version 0.11
Usage (replace ++ with two minus signs):
svn ++verbose ++xml log | \
xsltproc ++stringparam strip-prefix `basename $(pwd)` \
++stringparam groupbyday yes \
++stringparam authorsfile FILE \
++stringparam title NAME \
++stringparam revision-link NAME \
svn2html.xsl - > ChangeLog.html
This file is partially based on (and includes) svn2cl.xsl.
Copyright (C) 2005, 2006, 2007 Arthur de Jong.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<!DOCTYPE xsl:stylesheet [
<!ENTITY newl "&#xA;">
<!ENTITY space " ">
]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<!-- include default formatting templates from svn2cl.xsl -->
<xsl:include href="svn2cl.xsl" />
<xsl:output
method="xml"
encoding="utf-8"
media-type="text/html"
omit-xml-declaration="no"
standalone="yes"
indent="yes"
doctype-public="-//W3C//DTD XHTML 1.1//EN"
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
<!-- title of the report -->
<xsl:param name="title" select="'ChangeLog'" />
<!-- link to use for linking revision numbers -->
<xsl:param name="revision-link" select="'#r'" />
<!-- match toplevel element -->
<xsl:template match="log">
<html>
<head>
<title><xsl:value-of select="string($title)" /></title>
<link rel="stylesheet" href="svn2html.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<xsl:if test="$title">
<h1><xsl:value-of select="string($title)" /></h1>
</xsl:if>
<ul class="changelog_entries">
<xsl:choose>
<xsl:when test="$ignore-message-starting != ''">
<!-- only handle logentries with don't contain the string -->
<xsl:apply-templates select="logentry[not(starts-with(msg,$ignore-message-starting))]" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="logentry" />
</xsl:otherwise>
</xsl:choose>
</ul>
<p class="changelog_footer">
<xsl:text>Generated by </xsl:text><a href="http://ch.tudelft.nl/~arthur/svn2cl/">svn2cl 0.11</a>
</p>
</body>
</html>
</xsl:template>
<!-- format one entry from the log -->
<xsl:template match="logentry">
<xsl:choose>
<!-- if we're grouping we should omit some headers -->
<xsl:when test="$groupbyday='yes'">
<!-- save log entry number -->
<xsl:variable name="pos" select="position()" />
<!-- fetch previous entry's date -->
<xsl:variable name="prevdate">
<xsl:apply-templates select="../logentry[position()=(($pos)-1)]/date" />
</xsl:variable>
<!-- fetch previous entry's author -->
<xsl:variable name="prevauthor">
<xsl:value-of select="normalize-space(../logentry[position()=(($pos)-1)]/author)" />
</xsl:variable>
<!-- fetch this entry's date -->
<xsl:variable name="date">
<xsl:apply-templates select="date" />
</xsl:variable>
<!-- fetch this entry's author -->
<xsl:variable name="author">
<xsl:value-of select="normalize-space(author)" />
</xsl:variable>
<!-- check if header is changed -->
<xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
<li class="changelog_entry">
<!-- date -->
<span class="changelog_date"><xsl:value-of select="$date" /></span>
<xsl:text>&space;</xsl:text>
<!-- author's name -->
<span class="changelog_author"><xsl:apply-templates select="author" /></span>
</li>
</xsl:if>
</xsl:when>
<!-- write the log header -->
<xsl:otherwise>
<li class="changelog_entry">
<!-- date -->
<span class="changelog_date"><xsl:apply-templates select="date" /></span>
<xsl:text>&space;</xsl:text>
<!-- author's name -->
<span class="changelog_author"><xsl:apply-templates select="author" /></span>
</li>
</xsl:otherwise>
</xsl:choose>
<!-- entry -->
<li class="changelog_change">
<!-- get revision number -->
<xsl:variable name="revlink">
<xsl:choose>
<xsl:when test="contains($revision-link,'##')">
<xsl:value-of select="concat(substring-before($revision-link,'##'),@revision,substring-after($revision-link,'##'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($revision-link,@revision)" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<span class="changelog_revision">
<a id="r{@revision}" href="{$revlink}">[r<xsl:value-of select="@revision" />]</a>
</span>
<xsl:text>&space;</xsl:text>
<!-- get paths string -->
<span class="changelog_files"><xsl:apply-templates select="paths" /></span>
<xsl:text>&space;</xsl:text>
<!-- get message text -->
<xsl:variable name="msg">
<xsl:call-template name="trim-newln">
<xsl:with-param name="txt" select="msg" />
</xsl:call-template>
</xsl:variable>
<span class="changelog_message">
<xsl:call-template name="newlinestobr">
<xsl:with-param name="txt" select="$msg" />
</xsl:call-template>
</span>
</li>
</xsl:template>
<!-- template to replace line breaks with <br /> tags -->
<xsl:template name="newlinestobr">
<xsl:param name="txt" />
<xsl:choose>
<xsl:when test="contains($txt,'&newl;')">
<!-- text contains newlines, do the first line -->
<xsl:value-of select="substring-before($txt,'&newl;')" />
<!-- print new line -->
<br />
<!-- wrap the rest of the text -->
<xsl:call-template name="newlinestobr">
<xsl:with-param name="txt" select="substring-after($txt,'&newl;')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$txt" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
|