wget-list.xsl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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 contains(@url, '.tgz')
  15. or contains(@url, '.patch')) and
  16. not(ancestor-or-self::*/@condition = 'pdf')">
  17. <xsl:choose>
  18. <xsl:when test="contains(@url,'?download')">
  19. <xsl:value-of select="substring-before(@url,'?download')"/>
  20. </xsl:when>
  21. <xsl:otherwise>
  22. <xsl:value-of select="@url"/>
  23. </xsl:otherwise>
  24. </xsl:choose>
  25. <xsl:text>&#x0a;</xsl:text>
  26. </xsl:if>
  27. </xsl:template>
  28. </xsl:stylesheet>