home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 June / PCWorld_2004-06_cd.bin / software / vyzkuste / problemy / problemy.exe / M2Combo.exe / Template / fav_search.xsl < prev   
Extensible Markup Language  |  2003-11-17  |  3KB  |  78 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3.     <xsl:template match="/">
  4.         <table id="listing" style="width:100%; table-layout:fixed;">
  5.             <tr>
  6.                 <th align="left" onclick="check_all(this)" class="td_download_title" style="width:25%;">
  7.                     <input type="checkbox" name="title_all" value="checkbox">
  8.                         <a href="#" style="color:#fcfcfc;" title="Sort by title" onclick="sort('@title','text')">
  9.                             <xsl:value-of select="/ItemTemplate/DispName/@title"/>
  10.                         </a>
  11.                     </input>
  12.                 </th>
  13.                 <th align="left" class="td_download_title" style="width:10%;">
  14.                     <a href="#" style="color:#fcfcfc;" title="Sort by number of visits" onclick="sort('@visit_count','number')">
  15.                         <xsl:value-of select="/ItemTemplate/DispName/@visit_count"/>
  16.                     </a>
  17.                 </th>
  18.                 <th align="left" class="td_download_title" style="width:50%;">
  19.                     <a href="#" style="color:#fcfcfc;" title="Sort by URL" onclick="sort('@URL','text')">
  20.                         <xsl:value-of select="/ItemTemplate/DispName/@URL"/>
  21.                     </a>
  22.                 </th>
  23.                 <th align="left" class="td_download_title" style="width:50%;">
  24.                     <a href="#" style="color:#fcfcfc;" title="Sort by FileName" onclick="sort('@local_file','text')">
  25.                         <xsl:value-of select="/ItemTemplate/DispName/@FileName"/>
  26.                     </a>
  27.                 </th>
  28.  
  29.             </tr>
  30.             <xsl:apply-templates select="ItemTemplate/Item">
  31.                 <xsl:sort select="@title" data-type="text" order="ascending"/>
  32.             </xsl:apply-templates>
  33.         </table>
  34.     </xsl:template>
  35.     <xsl:template match="Item">
  36.         <tr>
  37.             <xsl:apply-templates select="@title"/>
  38.             <xsl:apply-templates select="@visit_count"/>
  39.             <xsl:apply-templates select="@URL"/>
  40.             <xsl:apply-templates select="@local_file"/>
  41.         </tr>
  42.     </xsl:template>
  43.     <xsl:template match="@title">
  44.         <td id="col1" class="td_download_main">
  45.             <input type="checkbox" id="check_item" value="checkbox">
  46.                 <xsl:if test="../@icon">
  47.                     <img align="middle" hspace="3">
  48.                         <xsl:attribute name="src"><xsl:value-of select="../@icon"/></xsl:attribute>
  49.                     </img>
  50.                 </xsl:if>
  51.                 <a id="url" target="blank">
  52.                     <xsl:attribute name="href"><xsl:value-of select="../@URL"/></xsl:attribute>
  53.                     <xsl:attribute name="title"><xsl:value-of select="../@URL"/></xsl:attribute>
  54.                     <xsl:value-of select="."/>
  55.                 </a>
  56.             </input>
  57.             <input type="hidden" id="local_file">
  58.                 <xsl:attribute name="value"><xsl:value-of select="../@local_file"/></xsl:attribute>
  59.             </input>
  60.         </td>
  61.     </xsl:template>
  62.     <xsl:template match="@visit_count">
  63.         <td class="td_download_main">
  64.             <xsl:value-of select="."/>
  65.         </td>
  66.     </xsl:template>
  67.     <xsl:template match="@URL">
  68.         <td class="td_download_main">
  69.             <xsl:value-of select="."/>
  70.         </td>
  71.     </xsl:template>
  72.         <xsl:template match="@local_file">
  73.         <td class="td_download_main">
  74.             <xsl:value-of select="."/>
  75.         </td>
  76.     </xsl:template>
  77. </xsl:stylesheet>
  78.