[jhalfs] 02/04: [BLFS] Ticket #1730: add a .xsl for returning versions
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository jhalfs. commit 1fc36f5654a8462402c5b50e337d94e7e06e9835 Author: Pierre Labastie <[email protected]> AuthorDate: Sun Dec 12 18:33:20 2021 +0100 [BLFS] Ticket #1730: add a .xsl for returning versions This .xsl, applied to packages.ent, takes the package name as a string param, then returns: "version"<nl>"installed version" if both versions are known "version"<nl>0 if the package is known but not installed nothing if the package does not exist (case of the groupxx ones) --- BLFS/xsl/get_version.xsl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/BLFS/xsl/get_version.xsl b/BLFS/xsl/get_version.xsl new file mode 100644 index 0000000..1e7e5df --- /dev/null +++ b/BLFS/xsl/get_version.xsl @@ -0,0 +1,31 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + + <xsl:output method="text"/> + + <xsl:param name="package" select="'gcc'"/> + + <xsl:key name="depnode" + match="package|module" + use="name"/> + + <xsl:template match="/"> + <xsl:apply-templates select="key('depnode',$package)"/> + </xsl:template> + + <xsl:template match="package|module"> + <xsl:value-of select="./version"/> + <xsl:text>
</xsl:text> + <xsl:choose> + <xsl:when test="./inst-version"> + <xsl:value-of select="./inst-version"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>0</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +</xsl:stylesheet> -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page