xsa.xsl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0"?>
  2. <!--
  3. Stylesheet generating the XSA entry for libxml2 based on the
  4. latest News entry.
  5. See http://www.garshol.priv.no/download/xsa/ for a description of XSA
  6. -->
  7. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  8. xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml">
  9. <xsl:output method="xml"
  10. doctype-public="-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML"
  11. doctype-system="http://www.garshol.priv.no/download/xsa/xsa.dtd"
  12. indent="yes"/>
  13. <xsl:template match="/">
  14. <xsa>
  15. <vendor>
  16. <name>Daniel Veillard</name>
  17. <email>daniel@veillard.com</email>
  18. <url>http://veillard.com/</url>
  19. </vendor>
  20. <product id="libxml2">
  21. <name>libxml2</name>
  22. <version><xsl:value-of select="substring-before(//xhtml:h3[2], ':')"/></version>
  23. <last-release><xsl:value-of select="substring-after(//xhtml:h3[2], ':')"/></last-release>
  24. <info-url>http://xmlsoft.org/</info-url>
  25. <changes>
  26. <xsl:apply-templates select="//xhtml:h3[2]/following-sibling::*[1]"/>
  27. </changes>
  28. </product>
  29. </xsa>
  30. </xsl:template>
  31. <xsl:template match="xhtml:h3">
  32. </xsl:template>
  33. <xsl:template match="xhtml:ul">
  34. <xsl:apply-templates select=".//xhtml:li"/>
  35. <xsl:text>
  36. </xsl:text>
  37. </xsl:template>
  38. <xsl:template match="xhtml:li">
  39. <xsl:text> - </xsl:text>
  40. <xsl:value-of select="."/>
  41. <xsl:text>
  42. </xsl:text>
  43. </xsl:template>
  44. <xsl:template match="xhtml:a">
  45. <xsl:value-of select="."/>
  46. <xsl:text> at
  47. </xsl:text>
  48. <xsl:value-of select="@href"/>
  49. <xsl:text>
  50. </xsl:text>
  51. </xsl:template>
  52. </xsl:stylesheet>