1 |
commit: a4c4652162c2a37a4809c2e9a7b825e765578378 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 6 17:48:12 2021 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 8 17:52:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a4c46521 |
7 |
|
8 |
Automatically generate the author list on the homepage |
9 |
|
10 |
Contributors are listed in appendices/contributors/, so we can take |
11 |
the information from there without maintaining duplicate lists. |
12 |
|
13 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
14 |
|
15 |
devbook.dtd | 5 ++++- |
16 |
devbook.xsl | 12 +++++++++++- |
17 |
text.xml | 15 +++------------ |
18 |
3 files changed, 18 insertions(+), 14 deletions(-) |
19 |
|
20 |
diff --git a/devbook.dtd b/devbook.dtd |
21 |
index 17fb59b..8a8e6dd 100644 |
22 |
--- a/devbook.dtd |
23 |
+++ b/devbook.dtd |
24 |
@@ -27,10 +27,13 @@ |
25 |
|
26 |
<!ELEMENT body (authors|contentsTree|%block.class;)+> |
27 |
|
28 |
-<!ELEMENT authors (author)+> |
29 |
+<!ELEMENT authors (author+|authorlist+)> |
30 |
<!ELEMENT author (#PCDATA|%inline.class;)*> |
31 |
<!ATTLIST author name CDATA #REQUIRED |
32 |
email CDATA #IMPLIED> |
33 |
+<!ELEMENT authorlist EMPTY> |
34 |
+<!ATTLIST authorlist title CDATA #REQUIRED |
35 |
+ href CDATA #REQUIRED> |
36 |
|
37 |
<!ELEMENT contentsTree EMPTY> |
38 |
<!ATTLIST contentsTree maxdepth CDATA #IMPLIED |
39 |
|
40 |
diff --git a/devbook.xsl b/devbook.xsl |
41 |
index ac6ab38..5e8b260 100644 |
42 |
--- a/devbook.xsl |
43 |
+++ b/devbook.xsl |
44 |
@@ -877,9 +877,19 @@ |
45 |
<dd><xsl:apply-templates/></dd> |
46 |
</xsl:template> |
47 |
|
48 |
+<xsl:template match="authorlist"> |
49 |
+ <dt><xsl:value-of select="@title"/></dt> |
50 |
+ <dd> |
51 |
+ <xsl:for-each select="document(concat(@href, 'text.xml'))//author"> |
52 |
+ <xsl:value-of select="@name"/> |
53 |
+ <xsl:if test="position() != last()">, </xsl:if> |
54 |
+ </xsl:for-each> |
55 |
+ </dd> |
56 |
+</xsl:template> |
57 |
+ |
58 |
<xsl:template match="authors"> |
59 |
<dl> |
60 |
- <xsl:apply-templates select="author"/> |
61 |
+ <xsl:apply-templates/> |
62 |
</dl> |
63 |
</xsl:template> |
64 |
|
65 |
|
66 |
diff --git a/text.xml b/text.xml |
67 |
index ba88028..ed290f4 100644 |
68 |
--- a/text.xml |
69 |
+++ b/text.xml |
70 |
@@ -11,18 +11,9 @@ intent is to make a handbook giving developers and users correct, |
71 |
detailed, up to date technical content. |
72 |
</p> |
73 |
|
74 |
-<dl> |
75 |
- <dt>Contributors</dt> |
76 |
- <dd> |
77 |
- Ciaran McCreesh, Grant Goodyear, Aaron Walker, Robert Coie, Tom Martin, |
78 |
- Paul Varner, Ilya Volynets-Evenbakh, Diego Pettenò, Fernando J. Pereda, |
79 |
- Simon Stelling, Alin Dobre, Joseph Jezak, Ursula Maplehurst, Mark Loeser, |
80 |
- Petteri Räty, Ulrich Müller, Mike Pagano, Markus Meier, Markos Chandras, |
81 |
- Xavier Neys, Daniel Robbins, Jeremy Olexa, Julian Ospald, |
82 |
- Alexandre Rostovtsev, Göktürk Yüksek, Michael Orlitzky, Michał Górny, |
83 |
- Brian Evans, Lucas Ramage, Mike Frysinger, Sam James |
84 |
- </dd> |
85 |
-</dl> |
86 |
+<authors> |
87 |
+ <authorlist title="Contributors" href="appendices/contributors/"/> |
88 |
+</authors> |
89 |
|
90 |
<p> |
91 |
Contributions are encouraged. See the <uri link="::appendices/contributing/"/> |