<?xml version="1.0" encoding="UTF-8"?>
<!-- 

  snJxml2xslt2joomla-example.xsl

  This XSL is designed for fetching the list of latest Joomla!
  extensions from http://feeds.joomla.org/JoomlaExtensions
  and transforming that RSS feed into a Joomla! article.

  You could utilize this by running:

  snJxml2xslt2joomla /joomla/configuration.php 555 \
      snJxml2xslt2joomla-example.xsl http://feeds.joomla.org/JoomlaExtensions

  Download location:

  http://dist.epipe.com/joomla/perl/

-->

<xsl:stylesheet version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	exclude-result-prefixes="xsl">

<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

<xsl:template match="/">
	<div>
	<xsl:apply-templates select="rss/channel"/>
	</div>
</xsl:template>

<xsl:template match="rss/channel">
	<xsl:variable name="link" select="link"/>
	<h2>
		<a href="{$link}"><xsl:value-of select="title" /></a>
	</h2>
	<xsl:apply-templates select="item"/>
</xsl:template>

<xsl:template match="item">
	<xsl:variable name="item_link" select="link"/>
	<h3>
		<a href="{$item_link}"><xsl:value-of select="title"/></a>
	</h3>
	<p>
		<xsl:value-of disable-output-escaping="yes" select="description"/>
		<br />
		Published at <xsl:value-of select="pubDate"/> by <xsl:value-of select="author"/>.
	</p>
</xsl:template>

</xsl:stylesheet>
