Nimbin[12]?Mirrors & Forks / jhalfs / BLFS/xsl/get_version.xsl

jhalfs git · trunk

jhalfs LFS build automation (mirror)

lfs mirror bash · first commit 2005-09-11 · last commit 2024-02-13 (2 years ago) · synced 3 days ago · upstream: git.linuxfromscratch.org/jhalfs

Python 78.4% Shell 19.8% Makefile 1.8%
git clone https://git.christianimmanuel.de/mirrors-forks/jhalfs.gitwget https://git.christianimmanuel.de/mirrors-forks/jhalfs/archive/jhalfs.tar.gz
BLFS/xsl/get_version.xsl 739 B · 31 lines raw
<?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>&#xA;</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>