<xsl:stylesheet version="1.0"
	xmlns:date="http://exslt.org/dates-and-times" xmlns:ebe="http://cks/ebemethods"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="date ebe">

<xsl:param name="IsBlogOwner" />
<xsl:param name="RelativeUrl" />
<xsl:param name="CustomRssUrl" />
<xsl:param name="PostFullUrl" />
<xsl:param name="WebUrl" />

<xsl:output omit-xml-declaration="yes" />

<xsl:template match="/">
	<xsl:apply-templates select="rows/row"/>
</xsl:template>

<xsl:template match="row">
	<xsl:variable name="rssLink">
		<xsl:choose>
			<xsl:when test="$CustomRssUrl != ''"><xsl:value-of select="$CustomRssUrl"/></xsl:when>
			<xsl:otherwise><xsl:value-of select="$RelativeUrl"/>/rss.xml</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
		
	<link rel="alternate" type="application/rss+xml" title="Posts" href="{$rssLink}" />	
	<link rel="trackback" type="application/x-www-form-urlencoded" href="{$WebUrl}/_layouts/cks/ebe/Trackback.aspx?ID={ID}" />
	
	<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <rdf:Description
        rdf:about="{$PostFullUrl}"
        dc:identifier="{$PostFullUrl}"
        dc:title="{Title}"
        trackback:ping="{$WebUrl}/_layouts/cks/ebe/Trackback.aspx?ID={ID}" />
    </rdf:RDF>	
	
</xsl:template>

</xsl:stylesheet>
