wget-list.xsl 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <!-- Create a list of upstream URLs for packages and patches to be used
  3. with wget. -->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5. version="1.0">
  6. <xsl:output method="text"/>
  7. <xsl:template match="/">
  8. <xsl:apply-templates select="//ulink"/>
  9. </xsl:template>
  10. <xsl:template match="ulink">
  11. <!-- If some package don't have the predefined strings in their
  12. name, the next test must be fixed to match it also. Skip possible
  13. duplicated URLs due that may be splitted for PDF output -->
  14. <xsl:if test="(contains(@url, '.tar.') or
  15. contains(@url, '.tgz') or
  16. contains(@url, '.patch')) and
  17. not(ancestor-or-self::*/@condition = 'pdf')">
  18. <xsl:choose>
  19. <xsl:when test="contains(@url,'?download')">
  20. <xsl:value-of select="substring-before(@url,'?download')"/>
  21. </xsl:when>
  22. <xsl:otherwise>
  23. <xsl:value-of select="@url"/>
  24. </xsl:otherwise>
  25. </xsl:choose>
  26. <xsl:text>&#x0a;</xsl:text>
  27. </xsl:if>
  28. </xsl:template>
  29. </xsl:stylesheet>