forked from apache/shindig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
to-committers.xsl
110 lines (99 loc) · 4.19 KB
/
to-committers.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
-->
<!-- ====================================================================== -->
<!-- XSL to extract developers from a Maven pom.xml -->
<!-- ====================================================================== -->
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:mvn="http://maven.apache.org/POM/4.0.0" exclude-result-prefixes="mvn">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:text>The following people have commit access to the Shindig sources.
Note that this is not a full list of Shindig's authors, however --
for that, you'd need to look over the log messages to see all the
patch contributors.
If you have a question or comment, it's probably best to mail
dev@shindig.apache.org, rather than mailing any of these
people directly.
Blanket commit access:
</xsl:text>
<xsl:apply-templates select="mvn:project/mvn:developers/mvn:developer" />
</xsl:template>
<xsl:template match="mvn:developer">
<xsl:text>
	</xsl:text>
<xsl:call-template name="leftPad">
<xsl:with-param name="input" select="mvn:id"/>
<xsl:with-param name="maxSize" select="number(10)"/>
</xsl:call-template>
<xsl:text>	</xsl:text>
<xsl:call-template name="rightPad">
<xsl:with-param name="input" select="mvn:name"/>
<xsl:with-param name="maxSize" select="number(20)"/>
</xsl:call-template>
<xsl:call-template name="rightPad">
<xsl:with-param name="input" select="mvn:email"/>
<xsl:with-param name="maxSize" select="number(25)"/>
</xsl:call-template>
<xsl:call-template name="rightPad">
<xsl:with-param name="input" select="normalize-space(mvn:roles)"/>
<xsl:with-param name="maxSize" select="number(10)"/>
</xsl:call-template>
</xsl:template>
<!-- String Utilities -->
<xsl:template name="rightPad">
<xsl:param name="input" select="string('')"/>
<xsl:param name="maxSize" select="0"/>
<xsl:variable name="diff" select="$maxSize - string-length($input)" />
<xsl:choose>
<xsl:when test="$diff < 0" >
<xsl:value-of select="$input"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$input"/>
<xsl:call-template name="space"><xsl:with-param name="repeat" select="$diff"/></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="space">
<xsl:param name="repeat">0</xsl:param>
<xsl:param name="fillchar" select="' '"/>
<xsl:if test="number($repeat) >= 1">
<xsl:call-template name="space">
<xsl:with-param name="repeat" select="$repeat - 1"/>
<xsl:with-param name="fillchar" select="$fillchar"/>
</xsl:call-template>
<xsl:value-of select="$fillchar"/>
</xsl:if>
</xsl:template>
<xsl:template name="leftPad">
<xsl:param name="input" select="string('')"/>
<xsl:param name="maxSize" select="0"/>
<xsl:variable name="diff" select="$maxSize - string-length($input)" />
<xsl:choose>
<xsl:when test="$diff < 0" >
<xsl:value-of select="$input"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="space"><xsl:with-param name="repeat" select="$diff"/></xsl:call-template>
<xsl:value-of select="$input"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>