File: vg-html-chunk.xsl

package info (click to toggle)
valgrind 1%3A3.12.0~svn20160714-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 120,428 kB
  • ctags: 70,855
  • sloc: ansic: 674,645; exp: 26,134; xml: 21,574; asm: 7,570; cpp: 7,567; makefile: 7,380; sh: 6,188; perl: 5,855; haskell: 195
file content (123 lines) | stat: -rw-r--r-- 4,089 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0"?> <!-- -*- sgml -*- -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!-- import the common styles -->
<xsl:import href="vg-html-common.xsl"/>


<!-- use our custom html stylesheet -->
<xsl:param name="html.stylesheet" select="'vg_basic.css'"/>


<!-- custom header for html documentation -->
<xsl:template name="header.navigation">
  <xsl:param name="prev" select="/foo"/>
  <xsl:param name="next" select="/foo"/>
  <xsl:param name="nav.context"/>

  <xsl:variable name="home" select="/*[1]"/>
  <xsl:variable name="up" select="parent::*"/>

  <xsl:variable name="row1" select="$navig.showtitles != 0"/>
  <xsl:variable name="row2" select="count($prev) &gt; 0
                            or (count($up) &gt; 0 
                            and generate-id($up) != generate-id($home) )
                            or count($next) &gt; 0"/>

<div>
<!-- never show header nav stuff on title page -->
<xsl:if test="count($prev)>0">
 <xsl:if test="$row1 or $row2">
  <table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header">
   <xsl:if test="$row2">
    <tr>
     <!-- prev -->
     <td width="22px" align="center" valign="middle">
      <xsl:if test="count($prev)>0">
       <a accesskey="p">
        <xsl:attribute name="href">
         <xsl:call-template name="href.target">
          <xsl:with-param name="object" select="$prev"/>
         </xsl:call-template>
        </xsl:attribute>
        <img src="images/prev.png" width="18" height="21" border="0">
         <xsl:attribute name="alt">
          <xsl:call-template name="gentext">
           <xsl:with-param name="key">nav-prev</xsl:with-param>
          </xsl:call-template>
         </xsl:attribute>
        </img>
       </a>
      </xsl:if>
     </td>
     <!-- up -->
     <xsl:if test="count($up)>0">
      <td width="25px" align="center" valign="middle">
       <a accesskey="u">
        <xsl:attribute name="href">
         <xsl:call-template name="href.target">
          <xsl:with-param name="object" select="$up"/>
         </xsl:call-template>
        </xsl:attribute>
        <img src="images/up.png" width="21" height="18" border="0">
         <xsl:attribute name="alt">
          <xsl:call-template name="gentext">
           <xsl:with-param name="key">nav-up</xsl:with-param>
          </xsl:call-template>
         </xsl:attribute>
        </img>
       </a>
      </td>
     </xsl:if>
     <!-- home -->
     <xsl:if test="$home != . or $nav.context = 'toc'">
      <td width="31px" align="center" valign="middle">
       <a accesskey="h">
        <xsl:attribute name="href">
         <xsl:call-template name="href.target">
          <xsl:with-param name="object" select="$home"/>
         </xsl:call-template>
        </xsl:attribute>
        <img src="images/home.png" width="27" height="20" border="0">
         <xsl:attribute name="alt">
          <xsl:call-template name="gentext">
           <xsl:with-param name="key">nav-up</xsl:with-param>
          </xsl:call-template>
         </xsl:attribute>
        </img>
       </a>
      </td>
     </xsl:if>
     <!-- chapter|section heading -->
     <th align="center" valign="middle">
       <xsl:apply-templates select="$up" mode="object.title.markup"/>
     </th>
     <!-- next -->
      <td width="22px" align="center" valign="middle">
        <xsl:if test="count($next)>0">
         <a accesskey="n">
          <xsl:attribute name="href">
           <xsl:call-template name="href.target">
            <xsl:with-param name="object" select="$next"/>
           </xsl:call-template>
          </xsl:attribute>
          <img src="images/next.png" width="18" height="21" border="0">
           <xsl:attribute name="alt">
            <xsl:call-template name="gentext">
             <xsl:with-param name="key">nav-next</xsl:with-param>
            </xsl:call-template>
           </xsl:attribute>
          </img>
         </a>
        </xsl:if>
       </td>
      </tr>
    </xsl:if>
   </table>
 </xsl:if>
</xsl:if>
</div>
</xsl:template>


</xsl:stylesheet>