annotate world/svn2cl.xsl @ 2828:85fedaea180a default tip

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