home *** CD-ROM | disk | FTP | other *** search
/ Freelog 116 / FreelogNo116-JuilletSeptembre2013.iso / Musique / amarok / amarok-x86-setup-2.7.0-1.exe / share / apps / ksgmltools2 / customization / kde-navig-online.xsl < prev    next >
Text File  |  2013-04-28  |  7KB  |  180 lines

  1. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2.   version="1.0">
  3.  
  4. <!-- only for the online version -->
  5. <!-- obfuscate email addresses -->
  6.   <xsl:template match="email">
  7.     <xsl:call-template name="inline.monoseq">
  8.       <xsl:with-param name="content">
  9.         <xsl:text>(</xsl:text>
  10.         <xsl:call-template name="replaceCharsInString">
  11.           <xsl:with-param name="stringIn" select="."/>
  12.           <xsl:with-param name="charsIn" select="'@'"/>
  13.           <xsl:with-param name="charsOut" select="'  '"/>
  14.         </xsl:call-template>
  15.         <xsl:text>)</xsl:text>
  16.       </xsl:with-param>
  17.     </xsl:call-template>
  18.   </xsl:template>
  19.   <xsl:template name="replaceCharsInString">
  20.     <xsl:param name="stringIn"/>
  21.     <xsl:param name="charsIn"/>
  22.     <xsl:param name="charsOut"/>
  23.     <xsl:choose>
  24.       <xsl:when test="contains($stringIn,$charsIn)">
  25.         <xsl:value-of select="concat(substring-before($stringIn,$charsIn),$charsOut)"/>
  26.         <xsl:call-template name="replaceCharsInString">
  27.           <xsl:with-param name="stringIn" select="substring-after($stringIn,$charsIn)"/>
  28.           <xsl:with-param name="charsIn" select="$charsIn"/>
  29.           <xsl:with-param name="charsOut" select="$charsOut"/>
  30.         </xsl:call-template>
  31.       </xsl:when>
  32.       <xsl:otherwise>
  33.         <xsl:value-of select="$stringIn"/>
  34.       </xsl:otherwise>
  35.     </xsl:choose>
  36.   </xsl:template>
  37. <!-- end "only for the online version" -->
  38.  
  39.   <xsl:template name="header.navigation">
  40.     <xsl:param name="prev" select="/foo"/>
  41.     <xsl:param name="next" select="/foo"/>
  42.     <xsl:variable name="home" select="/*[1]"/>
  43.     <xsl:variable name="up" select="parent::*"/>
  44.     <xsl:if test="$suppress.navigation = '0'">
  45.       <div id="header">
  46.         <div id="header_content">
  47.           <div id="header_left">
  48.             <div id="header_right">
  49.               <img src="{$kde.common}top-kde.jpg" width="36" height="34" />
  50.               <!-- The space is for spacing between the logo and title text -->
  51.               <xsl:text> </xsl:text>
  52.               <xsl:apply-templates
  53.                 select="." mode="title.markup"/>
  54.             </div>
  55.           </div>
  56.         </div>
  57.       </div>
  58.  
  59.       <!-- output navigation links -->
  60.       <div class="navCenter">
  61.         <table class="navigation">
  62.           <tr>
  63.             <td class="prevCell">
  64.               <xsl:if test="count($prev)>0">
  65.                 <a accesskey="p">
  66.                   <xsl:attribute name="href">
  67.                     <xsl:call-template name="href.target">
  68.                       <xsl:with-param name="object" select="$prev"/>
  69.                     </xsl:call-template>
  70.                   </xsl:attribute>
  71.                   <xsl:call-template name="gentext.nav.prev"/>
  72.                 </a>
  73.               </xsl:if>
  74.             </td>
  75.             <td class="upCell">
  76.               <xsl:choose>
  77.                 <xsl:when test="count($up) > 0 and $up != $home">
  78.                   <xsl:apply-templates select="$up" mode="title.markup"/>
  79.                 </xsl:when>
  80.                 <xsl:otherwise> </xsl:otherwise>
  81.               </xsl:choose>
  82.             </td>
  83.             <td class="nextCell">
  84.               <xsl:if test="count($next)>0">
  85.                 <a accesskey="n">
  86.                   <xsl:attribute name="href">
  87.                     <xsl:call-template name="href.target">
  88.                       <xsl:with-param name="object" select="$next"/>
  89.                     </xsl:call-template>
  90.                   </xsl:attribute>
  91.                   <xsl:call-template name="gentext.nav.next"/>
  92.                 </a>
  93.               </xsl:if>
  94.             </td>
  95.           </tr>
  96.         </table>
  97.       </div>
  98.     </xsl:if>
  99.   </xsl:template>
  100.  
  101. <!-- ==================================================================== -->
  102.  
  103. <xsl:template name="footer.navigation">
  104.   <xsl:param name="prev" select="/foo"/>
  105.   <xsl:param name="next" select="/foo"/>
  106.   <xsl:variable name="home" select="/*[1]"/>
  107.   <xsl:variable name="up" select="parent::*"/>
  108.  
  109.   <xsl:if test="$suppress.navigation = '0'">
  110.     <div id="footer">
  111.       <!-- output navigation links -->
  112.       <div class="navCenter">
  113.         <table class="navigation">
  114.           <tr>
  115.             <td class="prevCell">
  116.               <xsl:if test="count($prev)>0">
  117.                 <a accesskey="p">
  118.                   <xsl:attribute name="href">
  119.                     <xsl:call-template name="href.target">
  120.                       <xsl:with-param name="object" select="$prev"/>
  121.                     </xsl:call-template>
  122.                   </xsl:attribute>
  123.                   <xsl:call-template name="gentext.nav.prev"/>
  124.                 </a>
  125.               </xsl:if>
  126.             </td>
  127.             <td class="upCell">
  128.               <xsl:choose>
  129.                 <xsl:when test="$home != .">
  130.                   <a accesskey="h">
  131.                     <xsl:attribute name="href">
  132.                       <xsl:call-template name="href.target">
  133.                         <xsl:with-param name="object" select="$home"/>
  134.                       </xsl:call-template>
  135.                     </xsl:attribute>
  136.                     <xsl:call-template name="gentext.nav.home"/>
  137.                   </a>
  138.                 </xsl:when>
  139.                 <xsl:otherwise> </xsl:otherwise>
  140.               </xsl:choose>
  141.             </td>
  142.             <td class="nextCell">
  143.               <xsl:if test="count($next)>0">
  144.                 <a accesskey="n">
  145.                   <xsl:attribute name="href">
  146.                     <xsl:call-template name="href.target">
  147.                       <xsl:with-param name="object" select="$next"/>
  148.                     </xsl:call-template>
  149.                   </xsl:attribute>
  150.                   <xsl:call-template name="gentext.nav.next"/>
  151.                 </a>
  152.               </xsl:if>
  153.             </td>
  154.           </tr>
  155.           <tr>
  156.             <td class="prevCell">
  157.               <xsl:apply-templates select="$prev" mode="title.markup"/>
  158.               <xsl:text> </xsl:text>
  159.             </td>
  160.             <td class="upCell">
  161.               <xsl:choose>
  162.                 <xsl:when test="count($up) > 0 and $up != $home">
  163.                   <xsl:apply-templates select="$up" mode="title.markup"/>
  164.                 </xsl:when>
  165.                 <xsl:otherwise> </xsl:otherwise>
  166.               </xsl:choose>
  167.             </td>
  168.             <td class="nextCell">
  169.               <xsl:text> </xsl:text>
  170.               <xsl:apply-templates select="$next" mode="title.markup"/>
  171.             </td>
  172.           </tr>
  173.         </table>
  174.       </div>
  175.     </div>
  176.   </xsl:if>
  177. </xsl:template>
  178.  
  179. </xsl:stylesheet>
  180.