summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2013-05-28 16:15:52 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2013-05-28 16:18:21 +0200
commitc234c72cbded93792124f0ee5463654e83a665bb (patch)
tree2728ec76adfb99abba59400847f54a0dd4e95cac
parentfc4958f6e957acd72e3ec6f9a546811cdf70f4d3 (diff)
downloadeurephia-c234c72cbded93792124f0ee5463654e83a665bb.tar.gz
eurephia-c234c72cbded93792124f0ee5463654e83a665bb.tar.xz
eurephia-c234c72cbded93792124f0ee5463654e83a665bb.zip
eurephiadm: Added missing XSLT file for the plug-ins command
This file should have been added to commit 2cb8244efca21c48db523df9a12a337d3679e26b but got forgotten. Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r--xslt/eurephiadm/plugins.xsl122
1 files changed, 122 insertions, 0 deletions
diff --git a/xslt/eurephiadm/plugins.xsl b/xslt/eurephiadm/plugins.xsl
new file mode 100644
index 0000000..103e2a5
--- /dev/null
+++ b/xslt/eurephiadm/plugins.xsl
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<!--
+ *
+ * GPLv2 only - Copyright (C) 2013
+ * David Sommerseth <dazo@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output method="text" encoding="UTF-8"/>
+ <xsl:strip-space elements="*"/>
+
+ <xsl:template match="/eurephia">
+ <xsl:choose>
+ <xsl:when test="$view = 'list'">
+ <xsl:apply-templates select="plugins" mode="list"/>
+ </xsl:when>
+ <xsl:when test="$view = 'details'">
+ <xsl:apply-templates select="plugins" mode="details"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message terminate="yes">Invalid view: <xsl:value-of select="$view"/></xsl:message>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="/eurephia/plugins" mode="list">
+ <xsl:text> ID Enab Type Plug-in&#10;</xsl:text>
+ <xsl:text> ------------------------------------------------------------------------------&#10;</xsl:text>
+ <xsl:apply-templates select="plugin" mode="list"/>
+ <xsl:text> ------------------------------------------------------------------------------&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="/eurephia/plugins/plugin" mode="list">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="right-align">
+ <xsl:with-param name="value" select="@plgid"/>
+ <xsl:with-param name="width" select="3"/>
+ </xsl:call-template><xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@enabled='t'">
+ <xsl:text> Y </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="left-align">
+ <xsl:with-param name="value" select="type"/>
+ <xsl:with-param name="width" select="11"/>
+ </xsl:call-template><xsl:text> </xsl:text>
+ <xsl:call-template name="left-align">
+ <xsl:with-param name="value" select="name"/>
+ <xsl:with-param name="width" select="56"/>
+ </xsl:call-template><xsl:text> </xsl:text>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:template>
+
+
+ <xsl:template match="/eurephia/plugins" mode="details">
+ <xsl:text> ID Enab Type Plug-in DSO file&#10;</xsl:text>
+ <xsl:text> [Configuration]&#10;</xsl:text>
+ <xsl:text> ------------------------------------------------------------------------------&#10;</xsl:text>
+ <xsl:apply-templates select="plugin" mode="details"/>
+ <xsl:text> ------------------------------------------------------------------------------&#10;</xsl:text>
+ </xsl:template>
+
+ <xsl:template match="/eurephia/plugins/plugin" mode="details">
+ <xsl:text> </xsl:text>
+ <xsl:call-template name="right-align">
+ <xsl:with-param name="value" select="@plgid"/>
+ <xsl:with-param name="width" select="3"/>
+ </xsl:call-template><xsl:text> </xsl:text>
+ <xsl:choose>
+ <xsl:when test="@enabled='t'">
+ <xsl:text> Y </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="left-align">
+ <xsl:with-param name="value" select="type"/>
+ <xsl:with-param name="width" select="11"/>
+ </xsl:call-template><xsl:text> </xsl:text>
+ <xsl:value-of select="dsofile"/>
+ <xsl:text>&#10;</xsl:text>
+ <xsl:text> [</xsl:text>
+ <xsl:value-of select="config"/>
+ <xsl:text>]&#10;</xsl:text>
+ <xsl:if test="last() > position()">
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+ </xsl:template>
+
+
+ <xsl:template name="left-align">
+ <xsl:param name="value"/>
+ <xsl:param name="width"/>
+ <xsl:value-of select="substring(concat($value, ' '), 1, $width)"/>
+ </xsl:template>
+
+ <xsl:template name="right-align">
+ <xsl:param name="value"/>
+ <xsl:param name="width"/>
+ <xsl:value-of select="concat(substring(' ', 1, $width - string-length($value)), $value)"/>
+ </xsl:template>
+
+</xsl:stylesheet>