aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-09-06 19:48:12 +0200
committerUlrich Müller <ulm@gentoo.org>2021-09-08 19:52:29 +0200
commita4c4652162c2a37a4809c2e9a7b825e765578378 (patch)
tree50eb6b6165132b6d39b328ec7379c58fc2e3138c
parentappendices/contributors: Typo (diff)
downloaddevmanual-a4c46521.tar.gz
devmanual-a4c46521.tar.bz2
devmanual-a4c46521.zip
Automatically generate the author list on the homepage
Contributors are listed in appendices/contributors/, so we can take the information from there without maintaining duplicate lists. Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--devbook.dtd5
-rw-r--r--devbook.xsl12
-rw-r--r--text.xml15
3 files changed, 18 insertions, 14 deletions
diff --git a/devbook.dtd b/devbook.dtd
index 17fb59b..8a8e6dd 100644
--- a/devbook.dtd
+++ b/devbook.dtd
@@ -27,10 +27,13 @@
<!ELEMENT body (authors|contentsTree|%block.class;)+>
-<!ELEMENT authors (author)+>
+<!ELEMENT authors (author+|authorlist+)>
<!ELEMENT author (#PCDATA|%inline.class;)*>
<!ATTLIST author name CDATA #REQUIRED
email CDATA #IMPLIED>
+<!ELEMENT authorlist EMPTY>
+<!ATTLIST authorlist title CDATA #REQUIRED
+ href CDATA #REQUIRED>
<!ELEMENT contentsTree EMPTY>
<!ATTLIST contentsTree maxdepth CDATA #IMPLIED
diff --git a/devbook.xsl b/devbook.xsl
index ac6ab38..5e8b260 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -877,9 +877,19 @@
<dd><xsl:apply-templates/></dd>
</xsl:template>
+<xsl:template match="authorlist">
+ <dt><xsl:value-of select="@title"/></dt>
+ <dd>
+ <xsl:for-each select="document(concat(@href, 'text.xml'))//author">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">, </xsl:if>
+ </xsl:for-each>
+ </dd>
+</xsl:template>
+
<xsl:template match="authors">
<dl>
- <xsl:apply-templates select="author"/>
+ <xsl:apply-templates/>
</dl>
</xsl:template>
diff --git a/text.xml b/text.xml
index ba88028..ed290f4 100644
--- a/text.xml
+++ b/text.xml
@@ -11,18 +11,9 @@ intent is to make a handbook giving developers and users correct,
detailed, up to date technical content.
</p>
-<dl>
- <dt>Contributors</dt>
- <dd>
- Ciaran McCreesh, Grant Goodyear, Aaron Walker, Robert Coie, Tom Martin,
- Paul Varner, Ilya Volynets-Evenbakh, Diego Pettenò, Fernando J. Pereda,
- Simon Stelling, Alin Dobre, Joseph Jezak, Ursula Maplehurst, Mark Loeser,
- Petteri Räty, Ulrich Müller, Mike Pagano, Markus Meier, Markos Chandras,
- Xavier Neys, Daniel Robbins, Jeremy Olexa, Julian Ospald,
- Alexandre Rostovtsev, Göktürk Yüksek, Michael Orlitzky, Michał Górny,
- Brian Evans, Lucas Ramage, Mike Frysinger, Sam James
- </dd>
-</dl>
+<authors>
+ <authorlist title="Contributors" href="appendices/contributors/"/>
+</authors>
<p>
Contributions are encouraged. See the <uri link="::appendices/contributing/"/>