<?xml version="1.0"?>

<!-- XSLT style sheet for the uiListingScroll control. 
     Besides the columns from the XML source It generates a column with the icon. -->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="imp_nodeTypeIcon.xsl" />
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="imageUrl">./ui/default/</xsl:param>
<xsl:param name="hiRowClass">uiAlternatingRow</xsl:param>


<xsl:template match="/">
   <table>
   <xsl:apply-templates select="*/node"><xsl:sort data-type="text" order="descending"/>
   </xsl:apply-templates>
   </table>
</xsl:template>



 <xsl:template match="node">
      <tr><xsl:attribute name="class"><xsl:if test="position() mod 2 = 0"><xsl:value-of select="$hiRowClass" /></xsl:if>
	      </xsl:attribute>
		  <xsl:call-template name="firtsCol"/>
		  <xsl:apply-templates select="*"/>
      </tr>
 </xsl:template>


 <!-- ## First Column -->
 <xsl:template name="firtsCol">
 <td><xsl:if test="@type != ''">
 	   <xsl:call-template name="nodeTypeIcon"/>
	 </xsl:if>
 </td>
 <td><xsl:value-of select="@title"/></td>
 </xsl:template>
 
 
 <!-- ## Other Columns -->
 <xsl:template match="node/info">
   <td><xsl:apply-templates select="text()"/></td>
 </xsl:template>

   
</xsl:stylesheet>
