summaryrefslogtreecommitdiffstats
path: root/app/dialogs/authors.xsl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:23:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:23:22 +0000
commite42129241681dde7adae7d20697e7b421682fbb4 (patch)
treeaf1fe815a5e639e68e59fabd8395ec69458b3e5e /app/dialogs/authors.xsl
parentInitial commit. (diff)
downloadgimp-e42129241681dde7adae7d20697e7b421682fbb4.tar.xz
gimp-e42129241681dde7adae7d20697e7b421682fbb4.zip
Adding upstream version 2.10.22.upstream/2.10.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'app/dialogs/authors.xsl')
-rw-r--r--app/dialogs/authors.xsl82
1 files changed, 82 insertions, 0 deletions
diff --git a/app/dialogs/authors.xsl b/app/dialogs/authors.xsl
new file mode 100644
index 0000000..02db5c8
--- /dev/null
+++ b/app/dialogs/authors.xsl
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- XSL transformation to create a header file from authors.xml -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+
+ <xsl:output method="text" />
+
+ <xsl:template name="recent-contributor">
+ <xsl:param name="role" />
+ <xsl:apply-templates select="dc:contributor[contains(@role, $role) and
+ number(@last-active) >= 2 and
+ number(substring-after(@last-active, &quot;.&quot;)) >= 8]" />
+ </xsl:template>
+
+ <xsl:template match="/dc:gimp-authors">
+<xsl:text>
+/* NOTE: This file is auto-generated from authors.xml, do not edit it. */
+
+static const gchar * const creators[] =
+{
+</xsl:text>
+ <xsl:apply-templates select="dc:creator" />
+<xsl:text> NULL
+};
+</xsl:text>
+
+<xsl:text>
+static const gchar * const maintainers[] =
+{
+</xsl:text>
+ <xsl:apply-templates select="dc:maintainer" />
+<xsl:text> NULL
+};
+</xsl:text>
+
+<xsl:text>
+static const gchar * const authors[] =
+{
+</xsl:text>
+ <xsl:apply-templates select="dc:creator" />
+ <xsl:apply-templates select="dc:maintainer" />
+ <xsl:call-template name="recent-contributor">
+ <xsl:with-param name="role" select="'author'"/>
+ </xsl:call-template>
+<xsl:text> NULL
+};
+</xsl:text>
+
+<xsl:text>
+static const gchar * const artists[] =
+{
+</xsl:text>
+ <xsl:call-template name="recent-contributor">
+ <xsl:with-param name="role" select="'artist'"/>
+ </xsl:call-template>
+<xsl:text> NULL
+};
+</xsl:text>
+
+<xsl:text>
+static const gchar * const documenters[] =
+{
+</xsl:text>
+ <xsl:call-template name="recent-contributor">
+ <xsl:with-param name="role" select="'documenter'"/>
+ </xsl:call-template>
+<xsl:text> NULL
+};
+</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="dc:creator"> "<xsl:apply-templates />",
+</xsl:template>
+ <xsl:template match="dc:maintainer"> "<xsl:apply-templates />",
+</xsl:template>
+ <xsl:template match="dc:contributor"> "<xsl:apply-templates />",
+</xsl:template>
+
+</xsl:stylesheet>