First cut. Distintly raw around the edges:
* Assumes it will be running in /home/ali/wk/slashem/web.scripts
* Assumes cache directory will be in topdir
* No build system (simple compiling and linking against libxml2)
* No configure system (eg., tagsoup)
* Output XML untested
* Doesn't set bugzilla maintainer or exporter
* Handling of artifact priorities and resolution is suspect
3 <!-- A set of templates used in multiple stylesheets -->
5 <xsl:stylesheet version="1.0"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 xmlns:date="http://exslt.org/dates-and-times"
8 extension-element-prefixes="date">
10 <!-- Convert a UNIX-style date (seconds since 1 Jan 1970) to
11 the timestamp format used by bugzilla: %Y-%m-%d %X -->
12 <xsl:template name="bugzilla-timestamp">
13 <xsl:param name="secs" select="."/>
14 <xsl:variable name="dt" select="date:add('1970',concat('PT',$secs,'S'))"/>
15 <xsl:value-of select="date:year($dt)"/>
16 <xsl:text>-</xsl:text>
17 <xsl:value-of select="format-number(date:month-in-year($dt),'00')"/>
18 <xsl:text>-</xsl:text>
19 <xsl:value-of select="format-number(date:day-in-month($dt),'00')"/>
20 <xsl:text> </xsl:text>
21 <xsl:value-of select="format-number(date:hour-in-day($dt),'00')"/>
22 <xsl:text>:</xsl:text>
23 <xsl:value-of select="format-number(date:minute-in-hour($dt),'00')"/>
24 <xsl:text>:</xsl:text>
25 <xsl:value-of select="format-number(date:second-in-minute($dt),'00')"/>
26 <xsl:text> UTC</xsl:text>