source: stylesheets/xhtml/lfs-navigational.xsl@ 11b36cd

Last change on this file since 11b36cd was 11b36cd, checked in by Matthew Burgess <matthew@…>, 20 years ago

Upgraded to lfs-xsl-0.9 (Manuel)

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/b5_1/BOOK@3518 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 5.4 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns="http://www.w3.org/1999/xhtml"
7 version="1.0">
8
9 <!-- Dropping the HEAD links -->
10 <xsl:template name="html.head">
11 <head>
12 <xsl:call-template name="system.head.content"/>
13 <xsl:call-template name="head.content"/>
14 <xsl:call-template name="user.head.content"/>
15 </head>
16 </xsl:template>
17
18 <!-- Header Navigation-->
19 <xsl:template name="header.navigation">
20 <xsl:param name="prev" select="/foo"/>
21 <xsl:param name="next" select="/foo"/>
22 <xsl:param name="nav.context"/>
23 <xsl:variable name="home" select="/*[1]"/>
24 <xsl:variable name="up" select="parent::*"/>
25 <xsl:variable name="row" select="count($prev) &gt; 0 or (count($up) &gt; 0
26 and generate-id($up) != generate-id($home)) or count($next) &gt; 0"/>
27 <xsl:if test="$row and $home != .">
28 <div class="navheader">
29 <xsl:if test="$home != .">
30 <div class="headertitles">
31 <p>
32 <xsl:apply-templates select="$home" mode="object.title.markup"/>
33 <xsl:text> - </xsl:text>
34 <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
35 </p>
36 <xsl:if test="$up != $home">
37 <p><b>
38 <xsl:apply-templates select="$up" mode="object.title.markup"/>
39 </b></p>
40 </xsl:if>
41 </div>
42 </xsl:if>
43 <ul class="headerlinks">
44 <xsl:if test="count($prev)&gt;0 and $prev != $home">
45 <li>
46 <a accesskey="p">
47 <xsl:attribute name="href">
48 <xsl:call-template name="href.target">
49 <xsl:with-param name="object" select="$prev"/>
50 </xsl:call-template>
51 </xsl:attribute>
52 <xsl:text>Prev</xsl:text>
53 </a>
54 </li>
55 </xsl:if>
56 <li>
57 <a accesskey="h">
58 <xsl:attribute name="href">
59 <xsl:call-template name="href.target">
60 <xsl:with-param name="object" select="$home"/>
61 </xsl:call-template>
62 </xsl:attribute>
63 <xsl:text>Home</xsl:text>
64 </a>
65 </li>
66 <xsl:if test="count($next)&gt;0">
67 <li>
68 <a accesskey="n">
69 <xsl:attribute name="href">
70 <xsl:call-template name="href.target">
71 <xsl:with-param name="object" select="$next"/>
72 </xsl:call-template>
73 </xsl:attribute>
74 <xsl:text>Next</xsl:text>
75 </a>
76 </li>
77 </xsl:if>
78 </ul>
79 </div>
80 <hr/>
81 </xsl:if>
82 </xsl:template>
83
84 <!-- Footer Navigation-->
85 <xsl:template name="footer.navigation">
86 <xsl:param name="prev" select="/foo"/>
87 <xsl:param name="next" select="/foo"/>
88 <xsl:param name="nav.context"/>
89 <xsl:variable name="home" select="/*[1]"/>
90 <xsl:variable name="up" select="parent::*"/>
91 <xsl:variable name="row" select="count($prev) &gt; 0 or count($up) &gt; 0
92 or count($next) &gt; 0 or generate-id($home) != generate-id(.)"/>
93 <xsl:if test="$row">
94 <hr/>
95 <div class="navfooter">
96 <ul>
97 <xsl:if test="count($prev)&gt;0 and $prev != $home">
98 <li>
99 <a accesskey="p">
100 <xsl:attribute name="href">
101 <xsl:call-template name="href.target">
102 <xsl:with-param name="object" select="$prev"/>
103 </xsl:call-template>
104 </xsl:attribute>
105 <xsl:text>Prev</xsl:text>
106 </a>
107 <xsl:text> </xsl:text>
108 <xsl:apply-templates select="$prev" mode="object.title.markup"/>
109 </li>
110 </xsl:if>
111 <xsl:if test="count($up)&gt;0 and $up != $home">
112 <li>
113 <a accesskey="u">
114 <xsl:attribute name="href">
115 <xsl:call-template name="href.target">
116 <xsl:with-param name="object" select="$up"/>
117 </xsl:call-template>
118 </xsl:attribute>
119 <xsl:text>Up</xsl:text>
120 </a>
121 </li>
122 </xsl:if>
123 <xsl:if test="$home != .">
124 <li>
125 <a accesskey="h">
126 <xsl:attribute name="href">
127 <xsl:call-template name="href.target">
128 <xsl:with-param name="object" select="$home"/>
129 </xsl:call-template>
130 </xsl:attribute>
131 <xsl:text>Home</xsl:text>
132 </a>
133 </li>
134 </xsl:if>
135 <xsl:if test="count($next)&gt;0">
136 <li>
137 <a accesskey="n">
138 <xsl:attribute name="href">
139 <xsl:call-template name="href.target">
140 <xsl:with-param name="object" select="$next"/>
141 </xsl:call-template>
142 </xsl:attribute>
143 <xsl:text>Next</xsl:text>
144 </a>
145 <xsl:text> </xsl:text>
146 <xsl:apply-templates select="$next" mode="object.title.markup"/>
147 </li>
148 </xsl:if>
149 </ul>
150 </div>
151 </xsl:if>
152 </xsl:template>
153
154</xsl:stylesheet>
155
156
Note: See TracBrowser for help on using the repository browser.