summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2005-12-24 00:40:04 +0000
committerPaul W. Frields <stickster@gmail.com>2005-12-24 00:40:04 +0000
commitcef6135ebb5ae52fb480321f8347254510960a17 (patch)
tree7a790667f0f81bffb0b58a14096d567c53901696
parent47833cbf6837c3be53fc0b21713c054cbd87be44 (diff)
downloadfedora-doc-utils-cef6135ebb5ae52fb480321f8347254510960a17.tar.gz
fedora-doc-utils-cef6135ebb5ae52fb480321f8347254510960a17.tar.xz
fedora-doc-utils-cef6135ebb5ae52fb480321f8347254510960a17.zip
Added XSL for khelpcenter .desktop entry
-rw-r--r--packaging/khelpcenter-plugin.xsl32
1 files changed, 32 insertions, 0 deletions
diff --git a/packaging/khelpcenter-plugin.xsl b/packaging/khelpcenter-plugin.xsl
new file mode 100644
index 0000000..5381c6a
--- /dev/null
+++ b/packaging/khelpcenter-plugin.xsl
@@ -0,0 +1,32 @@
+<!-- Transform rpm-info.xml into a KHelpCenter .desktop File -->
+<xsl:stylesheet version="1.0" xml:space="preserve" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output encoding="UTF-8" indent="no" method="text" omit-xml-declaration="no" standalone="no" version="1.0"/>
+
+<!-- Note: do not indent this file! Any whitespace here
+ will be reproduced in the output -->
+
+ <xsl:param name="lang" select="'en'" />
+ <xsl:param name="docbase" select="'example-tutorial'" />
+ <xsl:param name="release" select="1"/>
+
+<xsl:template match="/">[Desktop Entry]
+DocPath=help:/<xsl:value-of select="$docbase"/>/index.html
+Name=<xsl:value-of select="/rpm-info/titles/translation[@lang='en']/title"/>
+
+<xsl:for-each select="/rpm-info/titles/translation">Name[<xsl:value-of
+ select="@lang"/>]=<xsl:value-of select="title"/>
+</xsl:for-each>
+X-DOC-Weight=-5000
+</xsl:template>
+
+ <xsl:template name="get-title">
+ <xsl:for-each select="/rpm-info/titles/translation">
+ <xsl:choose>
+ <xsl:when test="@lang = $lang">
+ <xsl:value-of select="title"/>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:template>
+
+</xsl:stylesheet>