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 <!-- This style sheet takes the output of xml_attached file (which represents
4 an attachment and it's MIME type), adds in the following extra nodes:
8 <xsl:stylesheet version="1.0"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
12 <xsl:template match="attachment">
14 <xsl:for-each select="@*">
17 <xsl:apply-templates/>
18 <xsl:element namespace="http://www.w3.org/2001/XInclude" name="include">
19 <xsl:attribute name="href">
20 <xsl:text>attachment-details.xml</xsl:text>
22 <xsl:attribute name="xpointer">
23 <xsl:text>xpointer(/attachments/attachment[attachid='</xsl:text>
24 <xsl:value-of select="attachid"/>
25 <xsl:text>']/*)</xsl:text>
28 <xsl:element namespace="http://www.w3.org/2001/XInclude" name="include"> <xsl:attribute name="href">
29 <xsl:text>attachment-descriptions.xml</xsl:text>
31 <xsl:attribute name="xpointer">
32 <xsl:text>xpointer(/attachments/attachment[attachid='</xsl:text>
33 <xsl:value-of select="attachid"/>
34 <xsl:text>']/desc)element(null)</xsl:text>
40 <!-- Drop the attachment ID to avoid duplication with the node included
41 from attachment-details.xml -->
43 <xsl:template match="attachid"/>
45 <xsl:template match="*">
47 <xsl:for-each select="@*">
50 <xsl:apply-templates/>