VERSION 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?xml version='1.0'?> <!-- -*- nxml -*- vim: set foldlevel=2: -->
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/"
  4. xmlns:sf="http://sourceforge.net/"
  5. xmlns:dyn="http://exslt.org/dynamic"
  6. xmlns:saxon="http://icl.com/saxon"
  7. exclude-result-prefixes="fm sf"
  8. version='1.0'>
  9. <xsl:param name="get"/>
  10. <xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/>
  11. <xsl:param name="Tag" select="concat('V',translate(string(document('')//fm:Version[1]),'.',''))"/>
  12. <xsl:param name="DistroTitle" select="string(document('')//fm:Branch[1])"/>
  13. <xsl:param name="sf-relid" select="0"/>
  14. <xsl:param name="DistroName">docbook-xsl</xsl:param>
  15. <xsl:param name="PreviousRelease">1.78.0</xsl:param>
  16. <xsl:param name="PreviousReleaseRevision">9696</xsl:param>
  17. <xsl:param name="Revision">$Revision: 9731 $</xsl:param>
  18. <xsl:param name="VersionFileURL">$URL: https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl/VERSION $</xsl:param>
  19. <xsl:strip-space elements="fm:*"/>
  20. <fm:project>
  21. <fm:Project>DocBook</fm:Project>
  22. <fm:Branch>XSL Stylesheets</fm:Branch>
  23. <!-- * set/keep fm:version as N.NN.N-pre except for official releases, -->
  24. <!-- * then after the release, revert it to N.NN.N-pre & check back in -->
  25. <fm:Version>1.78.1</fm:Version>
  26. <!--
  27. <fm:License>MIT/X Consortium License</fm:License>
  28. -->
  29. <fm:Release-Focus>
  30. <!-- * Initial freshmeat announcement -->
  31. <!-- * Documentation -->
  32. <!-- * Code cleanup -->
  33. <!-- * Minor feature enhancements -->
  34. * Major feature enhancements
  35. <!-- * Minor bugfixes -->
  36. <!-- * Major bugfixes -->
  37. <!-- * Minor security fixes -->
  38. <!-- * Major security fixes -->
  39. </fm:Release-Focus>
  40. <fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL>
  41. <fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.tar.gz?download</fm:Gzipped-Tar-URL>
  42. <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.zip?download</fm:Zipped-Tar-URL>
  43. <fm:Bzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.bz2?download</fm:Bzipped-Tar-URL>
  44. <fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL>
  45. <fm:CVS-URL>http://docbook.svn.sourceforge.net/viewvc/docbook/</fm:CVS-URL>
  46. <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL>
  47. <fm:Changes>This is a release with bugfixes and some enhancements.</fm:Changes>
  48. </fm:project>
  49. <xsl:template match="/" priority="-100">
  50. <xsl:choose>
  51. <xsl:when test="$get = 'Tag'">
  52. <xsl:value-of select="$Tag"/>
  53. </xsl:when>
  54. <xsl:when test="$get = 'PreviousRelease'">
  55. <xsl:value-of select="$PreviousRelease"/>
  56. </xsl:when>
  57. <xsl:when test="$get = 'PreviousReleaseRevision'">
  58. <xsl:value-of select="$PreviousReleaseRevision"/>
  59. </xsl:when>
  60. <xsl:when test="$get = 'DistroTitle'">
  61. <xsl:value-of select="$DistroTitle"/>
  62. </xsl:when>
  63. <xsl:when test="$get = 'VERSION'">
  64. <xsl:value-of select="$VERSION"/>
  65. </xsl:when>
  66. <xsl:otherwise>
  67. <xsl:if test="$sf-relid = 0">
  68. <xsl:message terminate="yes">
  69. <xsl:text>You must specify the sf-relid as a parameter.</xsl:text>
  70. </xsl:message>
  71. </xsl:if>
  72. <xsl:apply-templates select="//fm:project"/>
  73. </xsl:otherwise>
  74. </xsl:choose>
  75. </xsl:template>
  76. <xsl:template match="fm:project">
  77. <xsl:apply-templates/>
  78. <xsl:text>&#10;</xsl:text>
  79. <xsl:apply-templates select="fm:Changes" mode="text"/>
  80. </xsl:template>
  81. <xsl:template match="fm:Changes"/>
  82. <xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL|fm:Bzipped-Tar-URL">
  83. <xsl:value-of select="local-name(.)"/>
  84. <xsl:text>: </xsl:text>
  85. <xsl:value-of select="substring-before(., '{DISTRONAME-VERSION}')"/>
  86. <xsl:value-of select="concat($DistroName, '-', $VERSION)"/>
  87. <xsl:value-of select="substring-after(., '{DISTRONAME-VERSION}')"/>
  88. <xsl:text>&#10;</xsl:text>
  89. </xsl:template>
  90. <xsl:template match="fm:Changelog-URL">
  91. <xsl:value-of select="local-name(.)"/>
  92. <xsl:text>: </xsl:text>
  93. <xsl:value-of select="substring-before(., '{SFRELID}')"/>
  94. <xsl:value-of select="$sf-relid"/>
  95. <xsl:value-of select="substring-after(., '{SFRELID}')"/>
  96. <xsl:text>&#10;</xsl:text>
  97. </xsl:template>
  98. <xsl:template match="fm:*">
  99. <xsl:value-of select="local-name(.)"/>
  100. <xsl:text>: </xsl:text>
  101. <xsl:value-of select="normalize-space(.)"/>
  102. <xsl:text>&#10;</xsl:text>
  103. </xsl:template>
  104. </xsl:stylesheet>