"Fossies" - the Fresh Open Source Software Archive

Member "ZoneMaster-0.99.2/htdocs/stylesheets/Index.xsl" (21 May 2003, 2517 Bytes) of package /linux/misc/dns/old/ZoneMaster-0.99.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <!DOCTYPE xsl:stylesheet [
    2 <!ENTITY nbsp "&#160;">
    3 ]>
    4 
    5 <xsl:stylesheet version="1.0"
    6    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    7    xmlns="http://www.w3.org/TR/xhtml1/strict">
    8 
    9    <xsl:template name="Index">
   10     <xsl:param name="view"></xsl:param>
   11 
   12         <table class="index">
   13             <tr class="index"> 
   14                 <td class="index" align="center">
   15                     <xsl:call-template name="IndexElement">
   16                         <xsl:with-param name="current">
   17                             <xsl:choose>
   18                                 <xsl:when test="$pagenum &gt; 10">
   19                                     <xsl:value-of select="$pagenum - 10"/>
   20                                 </xsl:when>
   21 
   22                                 <xsl:otherwise>
   23                                     <xsl:value-of select="1"/>
   24                                 </xsl:otherwise>
   25                             </xsl:choose>
   26                         </xsl:with-param>
   27                         <xsl:with-param name="view"><xsl:value-of select="$view"/></xsl:with-param>
   28                     </xsl:call-template>
   29                 </td>
   30             </tr>  
   31         </table>
   32    </xsl:template>
   33 
   34    <xsl:template name="IndexElement">
   35       <xsl:param name="current"/>
   36     <xsl:param name="view"></xsl:param>
   37 
   38       <xsl:choose>
   39          <xsl:when test="$current != $pagenum">
   40             <xsl:choose>
   41                <xsl:when test="$current &lt; ($pagetotal + 1)">
   42                   <xsl:text>&nbsp;[</xsl:text>
   43                   <a> 
   44                      <xsl:attribute name="href"><xsl:value-of select="$selfurl"/><xsl:text>?view=</xsl:text><xsl:value-of select="$view"/><xsl:text>&amp;keyword=</xsl:text><xsl:value-of select="$keyword"/><xsl:text>&amp;sid=</xsl:text><xsl:value-of select="$sessionid"/><xsl:text>&amp;pageindex=</xsl:text><xsl:value-of select="$current"/></xsl:attribute>
   45                      <xsl:value-of select="$current"/>
   46                   </a>
   47                   <xsl:text>]&nbsp;</xsl:text>
   48                </xsl:when>
   49 
   50                <xsl:otherwise>
   51                   <xsl:text>&nbsp;&nbsp;&nbsp;&nbsp;</xsl:text>
   52                </xsl:otherwise>
   53             </xsl:choose>
   54          </xsl:when>
   55 
   56          <xsl:otherwise>
   57             <xsl:text>&nbsp;</xsl:text>
   58             <xsl:value-of select="$current"/>
   59             <xsl:text>&nbsp;&nbsp;</xsl:text>
   60          </xsl:otherwise>
   61       </xsl:choose>
   62 
   63       <xsl:if test="$current &lt; ($pagenum + 10)">
   64         <xsl:if test="$current &lt; number($pagetotal)">
   65             <xsl:call-template name="IndexElement">
   66                <xsl:with-param name="current"><xsl:value-of select="$current + 1"/></xsl:with-param>
   67                     <xsl:with-param name="view"><xsl:value-of select="$view"/></xsl:with-param>
   68             </xsl:call-template>
   69          </xsl:if>  
   70       </xsl:if>
   71    </xsl:template>
   72 </xsl:stylesheet>
   73