view docbook-update-source-data.xsl @ 5:86a0c5d11f05 version-1

Add discover subcommand The discover subcommand assists with the creation of watchlist entries and allows to reproduce each step of an update operation for a watchlist entry.
author Guido Berhoerster <guido+relmon@berhoerster.name>
date Sun, 26 Oct 2014 21:36:05 +0100
parents f28486666a4f
children
line wrap: on
line source

<?xml version="1.0"?>
<xsl:stylesheet
  version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:db="http://docbook.org/ns/docbook"
  xmlns="http://docbook.org/ns/docbook"
  exclude-result-prefixes="xsl db">

  <xsl:param name="package" select="''" />
  <xsl:param name="version" select="''" />

  <xsl:template match="db:refmeta/db:refmiscinfo[@class = 'source' or
    @class = 'version']"/>

  <xsl:template match="db:refmeta">
    <xsl:copy>
      <xsl:apply-templates/>
      <refmiscinfo class="source"><xsl:value-of select="$package"/></refmiscinfo>
      <refmiscinfo class="version"><xsl:value-of select="$version"/></refmiscinfo>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>