summaryrefslogtreecommitdiff
path: root/doc/xsa.xsl
blob: 30151d46c19d3ccd87a04c803cc300bc690820df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0"?>
<!--
  Stylesheet generating the XSA entry for libxml2 based on the 
  latest News entry.
  See http://www.garshol.priv.no/download/xsa/ for a description of XSA
 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
     xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml">
  <xsl:output method="xml"
      doctype-public="-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML"
      doctype-system="http://www.garshol.priv.no/download/xsa/xsa.dtd"
      indent="yes"/>

  <xsl:template match="/">
<xsa>
  <vendor>
    <name>Daniel Veillard</name>
    <email>daniel@veillard.com</email>
    <url>http://veillard.com/</url>
  </vendor>
  <product id="libxml2">
    <name>libxml2</name>
    <version><xsl:value-of select="substring-before(//xhtml:h3[2], ':')"/></version>
    <last-release><xsl:value-of select="substring-after(//xhtml:h3[2], ':')"/></last-release>
    <info-url>http://xmlsoft.org/</info-url>
    <changes>
    <xsl:apply-templates select="//xhtml:h3[2]/following-sibling::*[1]"/>
    </changes>
  </product>
</xsa>
  </xsl:template>
  <xsl:template match="xhtml:h3">
  </xsl:template>
  <xsl:template match="xhtml:ul">
    <xsl:apply-templates select=".//xhtml:li"/>
    <xsl:text>
</xsl:text>
  </xsl:template>
  <xsl:template match="xhtml:li">
    <xsl:text>   - </xsl:text>
    <xsl:value-of select="."/>
    <xsl:text>
</xsl:text>
  </xsl:template>
  <xsl:template match="xhtml:a">
    <xsl:value-of select="."/>
    <xsl:text> at 
</xsl:text>
    <xsl:value-of select="@href"/>
    <xsl:text>
</xsl:text>
  </xsl:template>
</xsl:stylesheet>