bugzilla_post.xsl
changeset 0 ae7b3fa753dc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/bugzilla_post.xsl	Thu Nov 16 08:30:26 2006 +0000
     1.3 @@ -0,0 +1,31 @@
     1.4 +<?xml version="1.0"?>
     1.5 +
     1.6 +<!-- This stylesheet does some post-processing on the bugzilla output. -->
     1.7 +
     1.8 +<xsl:stylesheet version="1.0"
     1.9 +		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    1.10 +		xmlns:sf2bz="http://project.juiblex.co.uk/sf2bz"
    1.11 +		exclude-result-prefixes="sf2bz">
    1.12 +
    1.13 +<xsl:template match="//sf2bz:element">
    1.14 +  <xsl:element name="{@name}">
    1.15 +    <xsl:for-each select="sf2bz:copy-from/*/*|sf2bz:copy-from/*/@*|sf2bz:copy-from/*/text()">
    1.16 +      <xsl:copy/>
    1.17 +    </xsl:for-each>
    1.18 +  </xsl:element>
    1.19 +</xsl:template>
    1.20 +
    1.21 +<!-- Kill all the xmlns:* and xml:base attributes
    1.22 +     (none of which are relevant any more) -->
    1.23 +<xsl:template match="*">
    1.24 +  <xsl:element name="{name()}">
    1.25 +    <xsl:for-each select="@*">
    1.26 +      <xsl:if test="name(.) != 'xml:base'">
    1.27 +	<xsl:copy/>
    1.28 +      </xsl:if>
    1.29 +    </xsl:for-each>
    1.30 +    <xsl:apply-templates/>
    1.31 +  </xsl:element>
    1.32 +</xsl:template>
    1.33 +
    1.34 +</xsl:stylesheet>