|
21 | 21 |
|
22 | 22 | </snip>
|
23 | 23 |
|
24 |
| - Copyright (c) 2008 Jens Lody |
| 24 | + Copyright (c) 2008-2010 Jens Lody |
25 | 25 |
|
26 | 26 |
|
27 | 27 | Usage (replace ++ with two minus signs which aren't allowed
|
|
66 | 66 | -->
|
67 | 67 |
|
68 | 68 | <!DOCTYPE xsl:stylesheet [
|
69 |
| - <!ENTITY tab "	"> |
70 |
| - <!ENTITY newl " "> |
71 | 69 | <!ENTITY space " ">
|
72 | 70 | ]>
|
73 | 71 |
|
|
126 | 124 | </xsl:otherwise>
|
127 | 125 | </xsl:choose>
|
128 | 126 | <!-- add newlines at the end of the changelog -->
|
129 |
| - <xsl:text>&newl;</xsl:text> |
| 127 | + <xsl:text>
</xsl:text> |
130 | 128 | </xsl:template>
|
131 | 129 |
|
132 | 130 | <!-- format one entry from the log -->
|
|
156 | 154 | <xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
|
157 | 155 | <!-- add newline -->
|
158 | 156 | <xsl:if test="not(position()=1)">
|
159 |
| - <xsl:text>&newl;</xsl:text> |
| 157 | + <xsl:text>
</xsl:text> |
160 | 158 | </xsl:if>
|
161 | 159 | <!-- date -->
|
162 | 160 | <xsl:value-of select="$date" />
|
|
165 | 163 | <!-- author's name -->
|
166 | 164 | <xsl:apply-templates select="author" />
|
167 | 165 | <!-- two newlines -->
|
168 |
| - <xsl:text>&newl;</xsl:text> |
169 |
| - <xsl:if test="$separate-daylogs!='yes'"><xsl:text>&newl;</xsl:text></xsl:if> |
| 166 | + <xsl:text>
</xsl:text> |
| 167 | + <xsl:if test="$separate-daylogs!='yes'"><xsl:text>
</xsl:text></xsl:if> |
170 | 168 | </xsl:if>
|
171 | 169 | </xsl:when>
|
172 | 170 | <!-- write the log header -->
|
173 | 171 | <xsl:otherwise>
|
174 | 172 | <!-- add newline -->
|
175 | 173 | <xsl:if test="not(position()=1)">
|
176 |
| - <xsl:text>&newl;</xsl:text> |
| 174 | + <xsl:text>
</xsl:text> |
177 | 175 | </xsl:if>
|
178 | 176 | <!-- date -->
|
179 | 177 | <xsl:apply-templates select="date" />
|
|
182 | 180 | <!-- author's name -->
|
183 | 181 | <xsl:apply-templates select="author" />
|
184 | 182 | <!-- two newlines -->
|
185 |
| - <xsl:text>&newl;&newl;</xsl:text> |
| 183 | + <xsl:text>

</xsl:text> |
186 | 184 | </xsl:otherwise>
|
187 | 185 | </xsl:choose>
|
188 | 186 | <!-- get revision number -->
|
|
198 | 196 | <!-- add a line break before the log message -->
|
199 | 197 | <xsl:choose>
|
200 | 198 | <xsl:when test="$breakbeforemsg='yes'">
|
201 |
| - <xsl:text>&newl;</xsl:text> |
| 199 | + <xsl:text>
</xsl:text> |
202 | 200 | </xsl:when>
|
203 | 201 | <xsl:when test="number($breakbeforemsg)>0">
|
204 | 202 | <xsl:call-template name="newlines">
|
|
211 | 209 | </xsl:call-template>
|
212 | 210 | </xsl:variable>
|
213 | 211 | <!-- add newline here if separate-daylogs is in effect -->
|
214 |
| - <xsl:if test="$groupbyday='yes' and $separate-daylogs='yes'"><xsl:text>&newl;</xsl:text></xsl:if> |
| 212 | + <xsl:if test="$groupbyday='yes' and $separate-daylogs='yes'"><xsl:text>
</xsl:text></xsl:if> |
215 | 213 | <!-- print the message nicely wrapped -->
|
216 | 214 | <xsl:call-template name="wrap">
|
217 | 215 | <xsl:with-param name="txt" select="concat($rev,$msg)" />
|
|
272 | 270 | <xsl:param name="txt" />
|
273 | 271 | <xsl:variable name="normtxt" select="normalize-space($txt)" />
|
274 | 272 | <xsl:choose>
|
275 |
| - <xsl:when test="contains($txt,'&newl;')"> |
| 273 | + <xsl:when test="contains($txt,'
')"> |
276 | 274 | <!-- text contains newlines, do the first line -->
|
277 | 275 | <xsl:call-template name="wrap">
|
278 |
| - <xsl:with-param name="txt" select="substring-before($txt,'&newl;')" /> |
| 276 | + <xsl:with-param name="txt" select="substring-before($txt,'
')" /> |
279 | 277 | </xsl:call-template>
|
280 | 278 | <!-- print tab -->
|
281 |
| - <xsl:text>&tab;&space;&space;</xsl:text> |
| 279 | + <xsl:text>	&space;&space;</xsl:text> |
282 | 280 | <!-- wrap the rest of the text -->
|
283 | 281 | <xsl:call-template name="wrap">
|
284 |
| - <xsl:with-param name="txt" select="substring-after($txt,'&newl;')" /> |
| 282 | + <xsl:with-param name="txt" select="substring-after($txt,'
')" /> |
285 | 283 | </xsl:call-template>
|
286 | 284 | </xsl:when>
|
287 | 285 | <xsl:when test="(string-length($normtxt) < (($linelen)-9)) or not(contains($normtxt,' '))">
|
288 | 286 | <!-- this is easy, nothing to do -->
|
289 | 287 | <xsl:value-of select="$normtxt" />
|
290 | 288 | <!-- add newline -->
|
291 |
| - <xsl:text>&newl;</xsl:text> |
| 289 | + <xsl:text>
</xsl:text> |
292 | 290 | </xsl:when>
|
293 | 291 | <xsl:otherwise>
|
294 | 292 | <!-- find the first line -->
|
|
310 | 308 | <!-- print line -->
|
311 | 309 | <xsl:value-of select="$line" />
|
312 | 310 | <!-- print newline and tab -->
|
313 |
| - <xsl:text>&newl;&tab;&space;&space;</xsl:text> |
| 311 | + <xsl:text>
	&space;&space;</xsl:text> |
314 | 312 | <!-- wrap the rest of the text -->
|
315 | 313 | <xsl:call-template name="wrap">
|
316 | 314 | <xsl:with-param name="txt" select="normalize-space(substring($normtxt,string-length($line)+1))" />
|
|
339 | 337 | <xsl:param name="txt" />
|
340 | 338 | <xsl:choose>
|
341 | 339 | <!-- find starting newlines -->
|
342 |
| - <xsl:when test="substring($txt,1,1) = '&newl;'"> |
| 340 | + <xsl:when test="substring($txt,1,1) = '
'"> |
343 | 341 | <xsl:call-template name="trim-newln">
|
344 | 342 | <xsl:with-param name="txt" select="substring($txt,2)" />
|
345 | 343 | </xsl:call-template>
|
346 | 344 | </xsl:when>
|
347 | 345 | <!-- find trailing newlines -->
|
348 |
| - <xsl:when test="substring($txt,string-length($txt),1) = '&newl;'"> |
| 346 | + <xsl:when test="substring($txt,string-length($txt),1) = '
'"> |
349 | 347 | <xsl:call-template name="trim-newln">
|
350 | 348 | <xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
|
351 | 349 | </xsl:call-template>
|
352 | 350 | </xsl:when>
|
353 | 351 | <!-- if the message has paragrapgs, find the first one -->
|
354 |
| - <xsl:when test="$reparagraph='yes' and contains($txt,'&newl;&newl;')"> |
| 352 | + <xsl:when test="$reparagraph='yes' and contains($txt,'

')"> |
355 | 353 | <!-- remove newlines from first paragraph -->
|
356 |
| - <xsl:value-of select="normalize-space(substring-before($txt,'&newl;&newl;'))" /> |
| 354 | + <xsl:value-of select="normalize-space(substring-before($txt,'

'))" /> |
357 | 355 | <!-- paragraph separator -->
|
358 |
| - <xsl:text>&newl;&newl;</xsl:text> |
| 356 | + <xsl:text>

</xsl:text> |
359 | 357 | <!-- do the rest of the text -->
|
360 | 358 | <xsl:call-template name="trim-newln">
|
361 |
| - <xsl:with-param name="txt" select="substring-after($txt,'&newl;&newl;')" /> |
| 359 | + <xsl:with-param name="txt" select="substring-after($txt,'

')" /> |
362 | 360 | </xsl:call-template>
|
363 | 361 | </xsl:when>
|
364 | 362 | <!-- remove more single newlines -->
|
|
375 | 373 | <!-- insert a number of newlines -->
|
376 | 374 | <xsl:template name="newlines">
|
377 | 375 | <xsl:param name="count" />
|
378 |
| - <xsl:text>&newl;</xsl:text> |
| 376 | + <xsl:text>
</xsl:text> |
379 | 377 | <xsl:if test="$count>1">
|
380 | 378 | <xsl:call-template name="newlines">
|
381 | 379 | <xsl:with-param name="count" select="($count)-1" />
|
|
0 commit comments