<?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet href="PrettyPrintXslt" type="text/xml"?> <xsl:stylesheet version="1.0" xmlns="http://purl.org/rss/1.0/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <xsl:output method="html" omit-xml-declaration="yes" indent="no"/> <xsl:template match="/diary"> <xsl:apply-templates select="document(concat('http://www.advogato.org/person/', @person, '/diary.xml'))/tdif"> <xsl:with-param name="person" select="@person"/> <xsl:with-param name="page" select="@page"/> </xsl:apply-templates> </xsl:template> <xsl:template match="tdif"> <xsl:param name="person"/> <xsl:param name="page"/> <b>This is the Advogato diary of <a target="_blank" href="http://www.advogato.org/person/{$person}"><xsl:value-of select="$person"/></a>. Click <a href="{$page}?action=refresh&arena=xslt&key={$page}">here</a> to load the current data.</b> <br/><br/> <xsl:apply-templates select="entry" mode="index"> <xsl:sort select="date" order="descending"/> </xsl:apply-templates> <br/><br/> <xsl:apply-templates select="entry"> <xsl:sort select="date" order="descending"/> </xsl:apply-templates> </xsl:template> <xsl:template match="entry" mode="index"> <tt> <a href="#{translate(date,'- :','---')}"><xsl:value-of select="date"/></a> <xsl:text> </xsl:text> </tt> <xsl:if test="position() mod 5 = 0"><br/></xsl:if> </xsl:template> <xsl:template match="entry"> <a name="{translate(date,'- :','---')}"><h3><xsl:value-of select="date"/></h3></a> <p><xsl:copy-of select="contents/html"/></p> </xsl:template> </xsl:stylesheet>