Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/ https://fsfe.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.7 KiB

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:import href="../tools/xsltsl/translations.xsl" />
  4. <xsl:import href="../tools/xsltsl/static-elements.xsl" />
  5. <xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>
  6. <xsl:template match="/">
  7. <xsl:copy>
  8. <xsl:apply-templates select="@*|node()"/>
  9. </xsl:copy>
  10. </xsl:template>
  11. <xsl:template match="/html/body">
  12. <body>
  13. <xsl:apply-templates />
  14. <!-- $today = current date (given as <html date="...">) -->
  15. <xsl:variable name="today">
  16. <xsl:value-of select="/html/@date" />
  17. </xsl:variable>
  18. <xsl:for-each select="/html/set/news[translate(@date,'-','') &lt;= translate($today,'-','')]">
  19. <xsl:sort select="@date" order="descending"/>
  20. <p>
  21. <b><xsl:value-of select="@date" /></b><br/>
  22. <xsl:value-of select="body"/>
  23. <xsl:variable name="link"><xsl:value-of select="link"/></xsl:variable>
  24. <xsl:if test="$link!=''">
  25. [<a href="{link}"><xsl:value-of select="/html/text[@id='more']"/>]</a>
  26. </xsl:if>
  27. </p>
  28. </xsl:for-each>
  29. </body>
  30. </xsl:template>
  31. <xsl:template match="@*|node()" priority="-1">
  32. <xsl:copy>
  33. <xsl:apply-templates select="@*|node()"/>
  34. </xsl:copy>
  35. </xsl:template>
  36. <xsl:template match="set | tags"/>
  37. <!--translated sentence "receive-newsletter"-->
  38. <xsl:template match="receive-newsletter">
  39. <xsl:call-template name="gettext">
  40. <xsl:with-param name="id" select="'receive-newsletter'" />
  41. </xsl:call-template>
  42. </xsl:template>
  43. <xsl:template match="subscribe-nl">
  44. <xsl:call-template name="subscribe-nl" />
  45. </xsl:template>
  46. </xsl:stylesheet>