summaryrefslogtreecommitdiffstats
path: root/packaging/doc-date.xsl
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2006-08-27 23:27:03 +0000
committerPaul W. Frields <stickster@gmail.com>2006-08-27 23:27:03 +0000
commit9471915b24a84e921cd7264408e2f8909c3af79c (patch)
tree91e252985339872fb6e09000461b184d05867e14 /packaging/doc-date.xsl
parent861e89e4488f28b1915396a82bd36c358099f9f8 (diff)
downloadfedora-doc-utils-9471915b24a84e921cd7264408e2f8909c3af79c.tar.gz
fedora-doc-utils-9471915b24a84e921cd7264408e2f8909c3af79c.tar.xz
fedora-doc-utils-9471915b24a84e921cd7264408e2f8909c3af79c.zip
Add a stylesheet to get the latest revision date from rpm-info
Diffstat (limited to 'packaging/doc-date.xsl')
-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>