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.

newsletter.xsl 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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/static-elements.xsl" />
  4. <xsl:import href="../fsfe.xsl" />
  5. <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
  6. <xsl:template match="/buildinfo/document/body/include-newsletter">
  7. <xsl:apply-templates />
  8. <!-- $today = current date (given as <html date="...">) -->
  9. <xsl:variable name="today">
  10. <xsl:value-of select="/buildinfo/@date" />
  11. </xsl:variable>
  12. <xsl:for-each select="/buildinfo/document/set/news[translate(@date,'-','') &lt;= translate($today,'-','')]">
  13. <xsl:sort select="@date" order="descending"/>
  14. <p>
  15. <b><xsl:value-of select="@date" /></b><br/>
  16. <xsl:value-of select="body"/>
  17. <xsl:variable name="link"><xsl:value-of select="link"/></xsl:variable>
  18. <xsl:if test="$link!=''">
  19. &#160;<a href="{link}" class="learn-more"><xsl:value-of select="/buildinfo/document/text[@id='more']"/></a>
  20. </xsl:if>
  21. </p>
  22. </xsl:for-each>
  23. </xsl:template>
  24. <!--translated sentence "receive-newsletter"-->
  25. <xsl:template match="receive-newsletter">
  26. <xsl:call-template name="gettext">
  27. <xsl:with-param name="id" select="'receive-newsletter'" />
  28. </xsl:call-template>
  29. </xsl:template>
  30. <xsl:template match="subscribe-nl">
  31. <xsl:call-template name="subscribe-nl" />
  32. </xsl:template>
  33. </xsl:stylesheet>