Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
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.

default.xsl 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0"
  3. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4. xmlns:dt="http://xsltsl.org/date-time">
  5. <xsl:import href="../tools/xsltsl/events-utils.xsl" />
  6. <xsl:import href="../fsfe.xsl" />
  7. <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
  8. <xsl:variable name="today"><xsl:value-of select="/buildinfo/@date" /></xsl:variable>
  9. <!--display dynamic list of news items-->
  10. <xsl:template name="tagged-news" match="tagged-news">
  11. <xsl:element name="ul">
  12. <xsl:attribute name="class">tag list</xsl:attribute>
  13. <xsl:for-each select="/buildinfo/document/set/news[translate(@date, '-', '') &lt;= translate($today, '-', '')]">
  14. <xsl:sort select="@date" order="descending" />
  15. <xsl:element name="li">
  16. <span class="newsdate">[<xsl:value-of select="@date" />]</span>
  17. <xsl:element name="a">
  18. <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
  19. <xsl:value-of select="title" />
  20. </xsl:element>
  21. </xsl:element>
  22. </xsl:for-each>
  23. </xsl:element>
  24. </xsl:template>
  25. <!--display dynamic list of event items-->
  26. <xsl:template name="tagged-events" match="tagged-events">
  27. <xsl:element name="ul">
  28. <xsl:attribute name="class">tag list</xsl:attribute>
  29. <!-- loop through all events having this tag -->
  30. <xsl:for-each select="/buildinfo/document/set/event">
  31. <xsl:sort select="@date" order="descending" />
  32. <xsl:element name="li">
  33. <span class="newsdate">[<xsl:value-of select="@start" />]</span>
  34. <xsl:element name="a">
  35. <xsl:attribute name="href">
  36. <xsl:call-template name="event-link">
  37. <xsl:with-param name="absolute-fsfe-links" select="no" />
  38. </xsl:call-template>
  39. </xsl:attribute>
  40. <xsl:value-of select="title" />
  41. </xsl:element><!--a-->
  42. </xsl:element><!--li-->
  43. </xsl:for-each>
  44. </xsl:element>
  45. </xsl:template>
  46. </xsl:stylesheet>