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

<xsl:template match="CATEGORY">
    <td style="padding-top:4px; padding-right:4px; vertical-align:top; text-align: left;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td valign="top" style="padding-right:5px;">
                    <xsl:choose>
                        <xsl:when test="IMAGE">
                            <a>
                                <xsl:apply-templates select="ACTIONS" mode="CATEGORY"/>
                                <xsl:apply-templates select="IMAGE"/>
                            </a>
                        </xsl:when>
                        <xsl:otherwise>
                            &#160;
                        </xsl:otherwise>
                    </xsl:choose>
                </td>
                <td class="pageContent" style="padding-left:2px;"  valign="top">
                    <a>
                        <xsl:apply-templates select="ACTIONS" mode="CATEGORY"/>
                        <xsl:value-of select="TITLE"/> [<xsl:value-of select="ITEMS-NUMBER"/>]
                    </a>
                    <br/>
                    <xsl:value-of select="DESCRIPTION"/>
                </td>
            </tr>
        </table>
    </td>
</xsl:template>

<xsl:template match="ACTIONS" mode="CATEGORY">
        <xsl:apply-templates select="CONTENT/ACTION[@TYPE='onclick']" mode="CATEGORY-LINK"/>
</xsl:template>

<xsl:template match="ACTION" mode="CATEGORY-LINK">
        <xsl:attribute name="href">
                <xsl:value-of select="ADDRESS"/>
        </xsl:attribute>
</xsl:template>

</xsl:stylesheet>
