logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git

bookmarks.atom.xsl (1515B)


  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/2005/Atom" version="1.0" xml:space="preserve">
  3. <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  4. <xsl:template match="/xbel"><xsl:text disable-output-escaping="yes"><![CDATA[<?xml-stylesheet type="text/xsl" href="atom.xsl"?>]]></xsl:text>
  5. <feed xmlns="http://www.w3.org/2005/Atom">
  6. <title>Bookmarks feed — Cyber-Home of Lanodan</title>
  7. <id>https://hacktivis.me/bookmarks.atom</id>
  8. <link href="https://hacktivis.me/bookmarks.atom" rel="self" />
  9. <link href="https://hacktivis.me/bookmarks" rel="alternate" />
  10. <author>
  11. <name>Haelwenn (lanodan) Monnier</name>
  12. </author>
  13. <!-- Technically XBEL doesn't have modified for the <xbel> element but whatever-->
  14. <updated><xsl:value-of select="/xbel/@modified"/></updated>
  15. <xsl:apply-templates select="/xbel//bookmark">
  16. <xsl:sort select="@added" lang="en" order="descending"/>
  17. </xsl:apply-templates>
  18. </feed></xsl:template>
  19. <xsl:template match="bookmark"> <entry>
  20. <title><xsl:value-of select="title"/></title>
  21. <link rel="alternate" type="text/html" href="{@href}"/>
  22. <id><xsl:value-of select="@href"/></id>
  23. <xsl:if test="@added"><published><xsl:value-of select="@added"/></published></xsl:if>
  24. <xsl:if test="@modified"><updated><xsl:value-of select="@modified"/></updated></xsl:if>
  25. <xsl:if test="desc"><content type="text"><xsl:value-of select="desc"/></content></xsl:if>
  26. </entry>
  27. </xsl:template>
  28. </xsl:stylesheet>