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 <xsl:stylesheet version="1.0"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5 xmlns:xhtml="http://www.w3.org/1999/xhtml"
6 xmlns:exsl="http://exslt.org/common"
7 extension-element-prefixes="exsl"
8 exclude-result-prefixes="xhtml">
10 <xsl:variable name="users">
11 <xsl:for-each select="//users/user">
13 <xsl:copy-of select="@name"/>
14 <xsl:value-of select="."/>
17 <xsl:for-each select="//xhtml:td[xhtml:b='Submitted By:' and xhtml:a]">
18 <xsl:element name="user">
19 <xsl:attribute name="name">
20 <xsl:for-each select="text()">
21 <xsl:if test="contains(., '-')">
22 <xsl:value-of select="normalize-space(substring-before(., '-'))"/>
26 <xsl:value-of select="xhtml:a"/>
27 <xsl:text>@users.sourceforge.net</xsl:text>
30 <xsl:for-each select="//xhtml:table[xhtml:tr/xhtml:td[normalize-space(.)='Login Name:'] and xhtml:tr/xhtml:td[normalize-space(.)='Publicly Displayed Name:']]">
31 <xsl:element name="user">
32 <xsl:attribute name="name">
33 <xsl:value-of select="normalize-space(xhtml:tr/xhtml:td[normalize-space(.)='Publicly Displayed Name:']/following-sibling::xhtml:td)"/>
35 <xsl:value-of select="normalize-space(xhtml:tr/xhtml:td[normalize-space(.)='Login Name:']/following-sibling::xhtml:td)"/>
36 <xsl:text>@users.sourceforge.net</xsl:text>
41 <xsl:variable name="sorted_users">
42 <xsl:for-each select="exsl:node-set($users)/user">
44 <xsl:copy-of select="."/>
48 <xsl:template match="/">
50 <xsl:for-each select="exsl:node-set($sorted_users)/user">
51 <xsl:if test="not(. = following-sibling::user[1])">
53 <xsl:copy-of select="@name"/>
54 <xsl:value-of select="."/>