annotate xml2cl.xsl @ 20:627a2524520d

Cleanups, rename svn2cl.xsl to xml2cl.csl.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 20 May 2020 12:42:41 +0300
parents svn2cl.xsl@2375efb3340d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 <?xml version="1.0" encoding="utf-8"?>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 <!--
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 svn2cl.xsl - xslt stylesheet for converting svn log to a normal
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 changelog
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 Usage (replace ++ with two minus signs):
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 svn ++verbose ++xml log | \
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 xsltproc ++stringparam strip-prefix `basename $(pwd)` \
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 ++stringparam linelen 75 \
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 ++stringparam groupbyday yes \
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 ++stringparam include-rev yes \
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 svn2cl.xsl - > ChangeLog
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 This file is based on several implementations of this conversion
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 that I was not completely happy with and some other common
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 xslt constructs found on the web.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 Copyright (C) 2004, 2005 Arthur de Jong.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 Redistribution and use in source and binary forms, with or without
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 modification, are permitted provided that the following conditions
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 are met:
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 1. Redistributions of source code must retain the above copyright
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 notice, this list of conditions and the following disclaimer.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 2. Redistributions in binary form must reproduce the above copyright
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 notice, this list of conditions and the following disclaimer in
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 the documentation and/or other materials provided with the
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 distribution.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 3. The name of the author may not be used to endorse or promote
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 products derived from this software without specific prior
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 written permission.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 <!DOCTYPE page [
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 <!ENTITY tab "&#9;">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 <!ENTITY newl "&#13;">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 <!ENTITY space "&#32;">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 ]>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 <!--
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 TODO
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 - make external lookups of author names possible
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 - find a place for revision numbers
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 - mark deleted files as such
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 - combine paths
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 - make path formatting nicer
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 <xsl:stylesheet
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 version="1.0"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 xmlns="http://www.w3.org/1999/xhtml">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 <xsl:output
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 method="text"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 encoding="iso-8859-15"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 media-type="text/plain"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 omit-xml-declaration="yes"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 standalone="yes"
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 indent="no" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 <xsl:strip-space elements="*" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 <!-- the prefix of pathnames to strip -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 <xsl:param name="strip-prefix" select="'/'" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 <!-- the length of a line to wrap messages at -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 <xsl:param name="linelen" select="75" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 <!-- whether entries should be grouped by day -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 <xsl:param name="groupbyday" select="'no'" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 <!-- whether entries should be grouped by day -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 <xsl:param name="include-rev" select="'no'" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 <!-- add newlines at the end of the changelog -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 <xsl:template match="log">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 <xsl:apply-templates/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 <xsl:text>&newl;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 <!-- format one entry from the log -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 <xsl:template match="logentry">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 <!-- save log entry number -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 <xsl:variable name="pos" select="position()"/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 <!-- fetch previous entry's date -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 <xsl:variable name="prevdate">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 <xsl:apply-templates select="../logentry[position()=(($pos)-1)]/date"/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 <!-- fetch previous entry's author -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 <xsl:variable name="prevauthor">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 <xsl:apply-templates select="../logentry[position()=(($pos)-1)]/author"/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 <!-- fetch this entry's date -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 <xsl:variable name="date">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 <xsl:apply-templates select="date" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 <!-- fetch this entry's author -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 <xsl:variable name="author">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 <xsl:apply-templates select="author" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 <!-- check if header is changed -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 <xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 <!-- add newline -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 <xsl:if test="not(position()=1)">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 <xsl:text>&newl;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 </xsl:if>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 <!-- date -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 <xsl:apply-templates select="date" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 <!-- two spaces -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126 <xsl:text>&space;&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 <!-- author's name -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 <xsl:apply-templates select="author" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 <!-- two newlines -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 <xsl:text>&newl;&newl;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 </xsl:if>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 <!-- get paths string -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 <xsl:variable name="paths">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 <xsl:apply-templates select="paths" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 <!-- get revision number -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 <xsl:variable name="rev">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 <xsl:if test="$include-rev='yes'">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139 <xsl:text>[r</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 <xsl:value-of select="@revision"/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 <xsl:text>]&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 </xsl:if>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 <!-- first line is indented (other indents are done in wrap template) -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145 <xsl:text>&tab;*&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146 <!-- print the paths and message nicely wrapped -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 <xsl:call-template name="wrap">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148 <xsl:with-param name="txt" select="concat($rev,$paths,normalize-space(msg))" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 </xsl:call-template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 <!-- format date -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153 <xsl:template match="date">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 <xsl:variable name="date" select="normalize-space(.)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155 <!-- output date part -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 <xsl:value-of select="substring($date,1,10)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157 <!-- output time part -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 <xsl:if test="$groupbyday!='yes'">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 <xsl:text>&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 <xsl:value-of select="substring($date,12,5)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 </xsl:if>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164 <!-- format author -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 <xsl:template match="author">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 <xsl:value-of select="normalize-space(.)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 <!-- present a list of paths names -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 <xsl:template match="paths">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171 <xsl:for-each select="path">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 <xsl:sort select="normalize-space(.)" data-type="text" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 <!-- unless we are the first entry, add a comma -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 <xsl:if test="not(position()=1)">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175 <xsl:text>,&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 </xsl:if>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 <!-- print the path name -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 <xsl:apply-templates select="."/>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 </xsl:for-each>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 <!-- end the list with a colon -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181 <xsl:text>:&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 <!-- transform path to something printable -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 <xsl:template match="path">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186 <!-- fetch the pathname -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 <xsl:variable name="p1" select="normalize-space(.)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 <!-- strip leading slash -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 <xsl:variable name="p2">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 <xsl:when test="starts-with($p1,'/')">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 <xsl:value-of select="substring($p1,2)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195 <xsl:value-of select="$p1" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
199 <!-- strip trailing slash from strip-prefix -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 <xsl:variable name="sp">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
201 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
202 <xsl:when test="substring($strip-prefix,string-length($strip-prefix),1)='/'">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
203 <xsl:value-of select="substring($strip-prefix,1,string-length($strip-prefix)-1)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
204 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
205 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 <xsl:value-of select="$strip-prefix" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
208 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
209 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
210 <!-- strip strip-prefix -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
211 <xsl:variable name="p3">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
212 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
213 <xsl:when test="starts-with($p2,$sp)">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
214 <xsl:value-of select="substring($p2,1+string-length($sp))" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
217 <!-- TODO: do not print strings that do not begin with strip-prefix -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 <xsl:value-of select="$p2" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
220 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
221 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222 <!-- strip another slash -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
223 <xsl:variable name="p4">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
225 <xsl:when test="starts-with($p3,'/')">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 <xsl:value-of select="substring($p3,2)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229 <xsl:value-of select="$p3" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233 <!-- translate empty string to dot -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 <xsl:when test="$p4 = ''">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236 <xsl:text>.</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 <xsl:value-of select="$p4" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
244 <!-- string-wrapping template -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
245 <xsl:template name="wrap">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 <xsl:param name="txt" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248 <xsl:when test="(string-length($txt) &lt; (($linelen)-9)) or not(contains($txt,' '))">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 <!-- this is easy, nothing to do -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250 <xsl:value-of select="$txt" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 <!-- add newline -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252 <xsl:text>&newl;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
254 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 <!-- find the first line -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256 <xsl:variable name="tmp" select="substring($txt,1,(($linelen)-10))" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257 <xsl:variable name="line">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259 <xsl:when test="contains($tmp,' ')">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260 <xsl:call-template name="find-line">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 <xsl:with-param name="txt" select="$tmp" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262 </xsl:call-template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 <xsl:value-of select="substring-before($txt,' ')" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 </xsl:variable>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269 <!-- print newline and tab -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 <xsl:value-of select="$line" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 <xsl:text>&newl;&tab;&space;&space;</xsl:text>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272 <!-- wrap the rest of the text -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 <xsl:call-template name="wrap">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 <xsl:with-param name="txt" select="normalize-space(substring($txt,string-length($line)+1))" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 </xsl:call-template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
279
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 <!-- template to trim line to contain space as last char -->
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 <xsl:template name="find-line">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282 <xsl:param name="txt" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283 <xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
284 <xsl:when test="substring($txt,string-length($txt),1) = ' '">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 <xsl:value-of select="normalize-space($txt)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 </xsl:when>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287 <xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288 <xsl:call-template name="find-line">
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289 <xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290 </xsl:call-template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
291 </xsl:otherwise>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
292 </xsl:choose>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
293 </xsl:template>
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294
2375efb3340d Added a modified version of svn2cl and the XSL stylesheet.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 </xsl:stylesheet>