flux-ordonat-după-dată.xsl 1.1 KB

123456789101112131415161718192021222324252627282930
  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. <xsl:output encoding="UTF-8" indent="yes" method="xml" />
  5. <xsl:template match="/">
  6. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
  7. xmlns:georss="http://www.georss.org/georss">
  8. <channel>
  9. <title><xsl:value-of select="/rss/channel/title" /></title>
  10. <link><xsl:value-of select="/rss/channel/link" /></link>
  11. <description><xsl:value-of select="/rss/channel/description" /></description>
  12. <language><xsl:value-of select="/rss/channel/language" /></language>
  13. <ttl><xsl:value-of select="/rss/channel/ttl" /></ttl>
  14. <xsl:for-each select="//item">
  15. <xsl:sort select="pubDate" data-type="text" order="descending" />
  16. <item>
  17. <title><xsl:value-of select="title" /></title>
  18. <description><xsl:value-of select="description" /></description>
  19. <link><xsl:value-of select="link" /></link>
  20. <pubDate><xsl:value-of select="pubDate" /></pubDate>
  21. </item>
  22. </xsl:for-each>
  23. </channel>
  24. </rss>
  25. </xsl:template>
  26. </xsl:stylesheet>