diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2013-05-28 16:15:52 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2013-05-28 16:18:21 +0200 |
commit | c234c72cbded93792124f0ee5463654e83a665bb (patch) | |
tree | 2728ec76adfb99abba59400847f54a0dd4e95cac | |
parent | fc4958f6e957acd72e3ec6f9a546811cdf70f4d3 (diff) | |
download | eurephia-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.xsl | 122 |
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 </xsl:text> + <xsl:text> ------------------------------------------------------------------------------ </xsl:text> + <xsl:apply-templates select="plugin" mode="list"/> + <xsl:text> ------------------------------------------------------------------------------ </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> </xsl:text> + </xsl:template> + + + <xsl:template match="/eurephia/plugins" mode="details"> + <xsl:text> ID Enab Type Plug-in DSO file </xsl:text> + <xsl:text> [Configuration] </xsl:text> + <xsl:text> ------------------------------------------------------------------------------ </xsl:text> + <xsl:apply-templates select="plugin" mode="details"/> + <xsl:text> ------------------------------------------------------------------------------ </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> </xsl:text> + <xsl:text> [</xsl:text> + <xsl:value-of select="config"/> + <xsl:text>] </xsl:text> + <xsl:if test="last() > position()"> + <xsl:text> </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> |