summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/doc-date.xsl32
1 files changed, 32 insertions, 0 deletions
diff --git a/packaging/doc-date.xsl b/packaging/doc-date.xsl
new file mode 100644
index 0000000..84b4294
--- /dev/null
+++ b/packaging/doc-date.xsl
@@ -0,0 +1,32 @@
+<!--
+
+Extract date for latest revision from rpm-info.xml.
+Optional stringparam "role" allows querying of appropriate revision type.
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output encoding="UTF-8" indent="no" method="text"/>
+
+ <xsl:param name="role" select="'doc'"/>
+
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="$role='rpm'">
+ <xsl:choose>
+ <xsl:when test="/rpm-info/changelog/revision[1]/@role='doc'">
+ <xsl:text>0</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/rpm-info/changelog/revision[@role=$role][1]/@date"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of
+ select="/rpm-info/changelog/revision[@role=$role][1]/@date"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>