atom.xsl.in (1974B)
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:atom="http://www.w3.org/2005/Atom"
- xml:space="preserve"
- >
- <xsl:import href="templates/en/nav.xsl" />
- <xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
- <xsl:template match="/"><xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
- <html xml:lang="en" lang="en">
- <head>
- <xi:include href="templates/head.xml" parse="xml" xpointer="xpointer(/xml/*)"/>
- <title><xsl:value-of select="/atom:feed/atom:title" /></title>
- </head>
- <body>
- <xsl:call-template name="nav">
- <xsl:with-param name="feedURL" select="/atom:feed/atom:link[@rel='self']/@href"/>
- </xsl:call-template>
- <main>
- <h1><xsl:value-of select="/atom:feed/atom:title" /></h1>
- <p>This is an Atom feed, you can regularly pull updates from it via a <a href="https://en.wikipedia.org/wiki/Feedreader">feedreader</a> and <a href="{/atom:feed/atom:link[@rel='self']/@href}">this feed's URL</a>. Included below are entries included in it, rendered without their included content for simplicity.</p>
- <xsl:apply-templates select="/atom:feed/atom:entry"/>
- </main>
- <xi:include href="templates/en/footer.shtml" parse="xml"/>
- </body>
- </html></xsl:template>
- <xsl:template match="atom:entry">
- <a href="{atom:id}"><h2><xsl:value-of select="atom:title"/></h2></a>
- <p class="timestamps"><xsl:apply-templates select="atom:published"/><xsl:apply-templates select="atom:updated"/></p>
- <xsl:if test="atom:content[@type='text']"><p><xsl:value-of select="atom:content"/></p></xsl:if>
- </xsl:template>
- <xsl:template match="atom:published">published on <xsl:value-of select="."/></xsl:template>
- <xsl:template match="atom:updated">, last updated on <xsl:value-of select="."/></xsl:template>
- </xsl:stylesheet>