forked from happi/theBeamBook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hg2revhistory.xsl
executable file
·110 lines (95 loc) · 2.41 KB
/
hg2revhistory.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE xsl:stylesheet>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:param name="include.paths" select="1"/>
<xsl:param name="include.copies" select="1"/>
<xsl:template match="logs">
<revhistory>
<xsl:apply-templates/>
</revhistory>
</xsl:template>
<xsl:template match="logentry">
<revision>
<xsl:apply-templates select="@revision|*"/>
</revision>
</xsl:template>
<xsl:template match="logentry/@revision">
<revnumber>
1.<xsl:apply-templates/>
</revnumber>
</xsl:template>
<xsl:template match="tag">
<revremark>
<xsl:apply-templates/>
</revremark>
</xsl:template>
<xsl:template match="date">
<date>
<xsl:apply-templates/>
</date>
</xsl:template>
<xsl:template match="author">
<authorinitials>
<xsl:apply-templates/>
</authorinitials>
</xsl:template>
<xsl:template match="msg">
<revremark>
<xsl:apply-templates/>
</revremark>
</xsl:template>
<xsl:template match="paths">
<xsl:if test="$include.paths != 0">
<itemizedlist>
<title>Paths</title>
<xsl:apply-templates/>
</itemizedlist>
</xsl:if>
</xsl:template>
<xsl:template match="path">
<listitem>
<para>
<xsl:apply-templates select="@action|text()"/>
</para>
</listitem>
</xsl:template>
<xsl:template match="path/@action">
<xsl:text>[</xsl:text>
<xsl:value-of select="."/>
<xsl:text>] </xsl:text>
</xsl:template>
<xsl:template match="path/text()">
<filename>
<xsl:value-of select="."/>
</filename>
</xsl:template>
<xsl:template match="copyies">
<xsl:if test="$include.paths != 0">
<listitem>
<title>Copies</title>
<para>
<xsl:apply-templates select="@*|text()"/>
</para>
</listitem>
</xsl:if>
</xsl:template>
<xsl:template match="copy">
<listitem>
<para>
<xsl:apply-templates select="@*|text()"/>
</para>
</listitem>
</xsl:template>
<xsl:template match="copy/@source">
<filename>
<xsl:value-of select="."/>
</filename>
</xsl:template>
<xsl:template match="copy/text()">
<xsl:text> -> </xsl:text>
<filename>
<xsl:value-of select="."/>
</filename>
</xsl:template>
</xsl:stylesheet>