njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> <!-- -*- sgml -*- --> |
de | 9bec93c | 2005-11-25 05:36:48 +0000 | [diff] [blame] | 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 3 | |
de | 97ab7e7 | 2005-11-27 18:19:40 +0000 | [diff] [blame] | 4 | <!-- import the common styles --> |
| 5 | <xsl:import href="vg-html-common.xsl"/> |
de | 9bec93c | 2005-11-25 05:36:48 +0000 | [diff] [blame] | 6 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 7 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 8 | <!-- use our custom html stylesheet --> |
| 9 | <xsl:param name="html.stylesheet" select="'vg_basic.css'"/> |
de | 9bec93c | 2005-11-25 05:36:48 +0000 | [diff] [blame] | 10 | |
| 11 | |
de | 97ab7e7 | 2005-11-27 18:19:40 +0000 | [diff] [blame] | 12 | <!-- custom header for html documentation --> |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 13 | <xsl:template name="header.navigation"> |
| 14 | <xsl:param name="prev" select="/foo"/> |
| 15 | <xsl:param name="next" select="/foo"/> |
| 16 | <xsl:param name="nav.context"/> |
| 17 | |
| 18 | <xsl:variable name="home" select="/*[1]"/> |
| 19 | <xsl:variable name="up" select="parent::*"/> |
| 20 | |
| 21 | <xsl:variable name="row1" select="$navig.showtitles != 0"/> |
| 22 | <xsl:variable name="row2" select="count($prev) > 0 |
| 23 | or (count($up) > 0 |
| 24 | and generate-id($up) != generate-id($home) ) |
| 25 | or count($next) > 0"/> |
| 26 | |
| 27 | <div> |
| 28 | <!-- never show header nav stuff on title page --> |
| 29 | <xsl:if test="count($prev)>0"> |
| 30 | <xsl:if test="$row1 or $row2"> |
| 31 | <table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header"> |
| 32 | <xsl:if test="$row2"> |
| 33 | <tr> |
| 34 | <!-- prev --> |
| 35 | <td width="22px" align="center" valign="middle"> |
| 36 | <xsl:if test="count($prev)>0"> |
| 37 | <a accesskey="p"> |
| 38 | <xsl:attribute name="href"> |
| 39 | <xsl:call-template name="href.target"> |
| 40 | <xsl:with-param name="object" select="$prev"/> |
| 41 | </xsl:call-template> |
| 42 | </xsl:attribute> |
| 43 | <img src="images/prev.png" width="18" height="21" border="0"> |
| 44 | <xsl:attribute name="alt"> |
| 45 | <xsl:call-template name="gentext"> |
| 46 | <xsl:with-param name="key">nav-prev</xsl:with-param> |
| 47 | </xsl:call-template> |
| 48 | </xsl:attribute> |
| 49 | </img> |
| 50 | </a> |
| 51 | </xsl:if> |
| 52 | </td> |
| 53 | <!-- up --> |
| 54 | <xsl:if test="count($up)>0"> |
| 55 | <td width="25px" align="center" valign="middle"> |
| 56 | <a accesskey="u"> |
| 57 | <xsl:attribute name="href"> |
| 58 | <xsl:call-template name="href.target"> |
| 59 | <xsl:with-param name="object" select="$up"/> |
| 60 | </xsl:call-template> |
| 61 | </xsl:attribute> |
| 62 | <img src="images/up.png" width="21" height="18" border="0"> |
| 63 | <xsl:attribute name="alt"> |
| 64 | <xsl:call-template name="gentext"> |
| 65 | <xsl:with-param name="key">nav-up</xsl:with-param> |
| 66 | </xsl:call-template> |
| 67 | </xsl:attribute> |
| 68 | </img> |
| 69 | </a> |
| 70 | </td> |
| 71 | </xsl:if> |
| 72 | <!-- home --> |
| 73 | <xsl:if test="$home != . or $nav.context = 'toc'"> |
| 74 | <td width="31px" align="center" valign="middle"> |
| 75 | <a accesskey="h"> |
| 76 | <xsl:attribute name="href"> |
| 77 | <xsl:call-template name="href.target"> |
| 78 | <xsl:with-param name="object" select="$home"/> |
| 79 | </xsl:call-template> |
| 80 | </xsl:attribute> |
| 81 | <img src="images/home.png" width="27" height="20" border="0"> |
| 82 | <xsl:attribute name="alt"> |
| 83 | <xsl:call-template name="gentext"> |
| 84 | <xsl:with-param name="key">nav-up</xsl:with-param> |
| 85 | </xsl:call-template> |
| 86 | </xsl:attribute> |
| 87 | </img> |
| 88 | </a> |
| 89 | </td> |
| 90 | </xsl:if> |
| 91 | <!-- chapter|section heading --> |
| 92 | <th align="center" valign="middle"> |
| 93 | <xsl:apply-templates select="$up" mode="object.title.markup"/> |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 94 | </th> |
| 95 | <!-- next --> |
| 96 | <td width="22px" align="center" valign="middle"> |
| 97 | <xsl:if test="count($next)>0"> |
| 98 | <a accesskey="n"> |
| 99 | <xsl:attribute name="href"> |
| 100 | <xsl:call-template name="href.target"> |
| 101 | <xsl:with-param name="object" select="$next"/> |
| 102 | </xsl:call-template> |
| 103 | </xsl:attribute> |
| 104 | <img src="images/next.png" width="18" height="21" border="0"> |
| 105 | <xsl:attribute name="alt"> |
| 106 | <xsl:call-template name="gentext"> |
| 107 | <xsl:with-param name="key">nav-next</xsl:with-param> |
| 108 | </xsl:call-template> |
| 109 | </xsl:attribute> |
| 110 | </img> |
| 111 | </a> |
| 112 | </xsl:if> |
| 113 | </td> |
| 114 | </tr> |
| 115 | </xsl:if> |
| 116 | </table> |
| 117 | </xsl:if> |
| 118 | </xsl:if> |
| 119 | </div> |
| 120 | </xsl:template> |
| 121 | |
| 122 | |
njn | 3e986b2 | 2004-11-30 10:43:45 +0000 | [diff] [blame] | 123 | </xsl:stylesheet> |