view data/docbook-update-source-data.xsl @ 13:eb97cafe34e5

Try to prevent messages from being chopped up into multiple notifications Read data into a buffer and only send a notification when 250ms have passed since the first read instead of sending a notification immediately after each read. This is an attempt to prevent messages from being chopped up into multiple notifications. A (rather negligible) downside of this approach is that multiple messages rapidly following each other are coalesced into a single notification.
author Guido Berhoerster <guido+xwrited@berhoerster.name>
date Mon, 16 Mar 2015 23:54:20 +0100
parents f0c7f45022c0
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>