An RSS XSLT stylesheet for Dynarex

<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>

  <xsl:output method='xml' indent='yes'></xsl:output>
  
  <xsl:template match='*'>
    <channel>
      <xsl:apply-templates select='summary'></xsl:apply-templates>
      <xsl:apply-templates select='records/*'>
        <xsl:sort order="descending" data-type="number" select="@id"/>
        <xsl:apply-templates select='.'/>
      </xsl:apply-templates>
    </channel>
  </xsl:template>
  
  <xsl:template match='*/summary'>
    <title>
      <xsl:value-of select='title'></xsl:value-of>
    </title>
    <description>
      <xsl:value-of select='desc'></xsl:value-of>
    </description>
  </xsl:template>
  
  <xsl:template match='records/*'>
    <xsl:if test="position() < 9">
      <item>
        <title><xsl:value-of select='title'></xsl:value-of></title>
        <link><xsl:value-of select='url'></xsl:value-of></link>
      </item>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>

The above XSLT stylesheet generates an RSS feed for a dynarex docment.

Tags:
Source:
0936hrs.txt
Published:
20-06-2012 09:36