Vladimir Prus wrote:
> [1] Boost navigation links and "standalone": links are not generated when
> the doc.standalone parameter is set to 'true'.


I've tried that and see that links are no longer links, but you still have the
standard Boost header, with "Home", "Libraries" and so on. Just those words
are no links -- which still can be confusing for users of Boost.Build only.
Is it possible to just drop everything but the Boost logo?

I have attached the diff for html.xsl that provides a combined header/navigation. What do people think? In standalone mode, the Boost-specific likns are not displayed.


Also, I have seperated out the code that modifies the DocBook behaviour to docbook-layout.xsl. This new code also contains a modification of the table generation that does not have border="1", hopefully sorting the problem Chris pointed out.

Regards,
Reece

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger
Index: html.xsl
===================================================================
RCS file: /cvsroot/boost/boost/tools/boostbook/xsl/html.xsl,v
retrieving revision 1.10
diff -u -w -r1.10 html.xsl
--- html.xsl 5 Feb 2004 15:16:39 -0000 1.10
+++ html.xsl 9 Feb 2004 18:03:20 -0000
@@ -6,8 +6,9 @@
<!-- Import the HTML chunking stylesheet -->
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+ <xsl:import href="docbook-layout.xsl"/>


-  <xsl:param name="html.stylesheet" select="'reference.css'"/>
+  <xsl:param name="html.stylesheet" select="'boostbook.css'"/>
  <xsl:param name="navig.graphics" select="1"/>
  <xsl:param name="navig.graphics.extension" select="'.png'"/>
  <xsl:param name="chapter.autolabel" select="1"/>
@@ -19,38 +20,134 @@
  <xsl:param name="generate.manifest" select="1"/>
  <xsl:param name="generate.section.toc.level" select="3"/>

+ <xsl:param name="doc.standalone" select="'false'"/>
+ <xsl:param name="boost.root" select="'../../../..'"/>
+ <xsl:param name="image.boost.src" select="'../../c++boost.gif'"/>
+ <xsl:param name="image.boost.alt" select="'c++boost.gif (8819 bytes)'"/>
+ <xsl:param name="image.boost.w" select="277"/>
+ <xsl:param name="image.boost.h" select="86"/>
+
<xsl:template name="header.navigation">
- <table border="1" cellpadding="2" bgcolor="#007F7F">
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+
<!-- top-level navigation: based on
+
docbook/html/chunk-common.xsl[footer.navigation] -->
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="count($prev) &gt; 0
+ or count($up) &gt; 0
+ or count($next) &gt; 0"/>
+
+ <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
+ or (generate-id($home) != generate-id(.)
+ or $nav.context = 'toc')
+ or ($chunk.tocs.and.lots != 0
+ and $nav.context != 'toc')
+ or ($next and $navig.showtitles != 0)"/>
+
+ <table width = "100%" class = "navheader">
<tr>
- <td bgcolor="#FFFFFF">
- <img src="../../c++boost.gif"
- alt="c++boost.gif (8819 bytes)" width="277" height="86"/>
- </td>
- <td>
- <a href="../../index.htm">
- <font color="#FFFFFF" size="4" face="Arial">Home</font>
- </a>
- </td>
- <td>
- <a href="libraries.html">
- <font color="#FFFFFF" size="4" face="Arial">Libraries</font>
- </a>
- </td>
- <td>
- <a href="../../people/people.htm">
- <font color="#FFFFFF" size="4" face="Arial">People</font>
+ <td width = "{$image.boost.w}" rowspan = "3">
+ <img src="{$image.boost.src}" alt="{$image.boost.alt}"
+ width="{$image.boost.w}" height="{$image.boost.h}"/>
+ </td><td align = "left" valign = "top" width = "40%">
+ <!-- prev:name -->
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td><td align = "center" valign = "top" width = "20%">
+ <!-- home -->
+ <xsl:choose>
+ <xsl:when test="$home != . or $nav.context = 'toc'">
+ <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>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
</a>
- </td>
- <td>
- <a href="../../more/faq.htm">
- <font color="#FFFFFF" size="4" face="Arial">FAQ</font>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text>&#160;|&#160;</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <a accesskey="t">
+ <xsl:attribute name="href">
+ <xsl:apply-templates select="/*[1]"
+ mode="recursive-chunk-filename"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'nav-toc'"/>
+ </xsl:call-template>
</a>
+ </xsl:if>
+ </td><td align = "right" valign = "top" width = "40%">
+ <!-- next:name -->
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$next" mode="object.title.markup"/>
+ </xsl:if>
</td>
- <td>
- <a href="../../more/index.htm">
- <font color="#FFFFFF" size="4" face="Arial">More</font>
+ </tr><tr>
+ <td align = "left" valign = "top" width = "40%">
+ <!-- prev -->
+ <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>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td><td align = "center" valign = "top" width = "20%">
+ <!-- up -->
+ <xsl:choose>
+ <xsl:when test="count($up)>0">
+ <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>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
</a>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ </td><td align = "right" valign = "top" width = "40%">
+ <!-- next -->
+ <xsl:text>&#160;</xsl:text>
+ <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>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a></xsl:if>
</td>
+ </tr><tr>
+ <xsl:choose>
+ <xsl:when test = "$doc.standalone = 'true'">
+ <td colspan = "3">&#xA0;</td> <!-- padding -->
+ </xsl:when><xsl:otherwise>
+ <!-- Libraries? (libraries.htm) -->
+ <td align = "left" ><a href = "{$boost.root}/people/people.htm">People</a></td>
+ <td align = "center"><a href = "{$boost.root}/more/faq.htm">FAQ</a></td>
+ <td align = "right" ><a href = "{$boost.root}/more/index.htm">More</a></td>
+ </xsl:otherwise>
+ </xsl:choose>
</tr>
</table>
</xsl:template>


<?xml version = "1.0" encoding = "utf-8"?>

<xsl:stylesheet version = "1.0"
   xmlns:xsl = "http://www.w3.org/1999/XSL/Transform";
   xmlns:rev = "http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision";
>
  <!--
     Override the behaviour of some DocBook elements for better
     integration with the new look & feel.
  -->

  <xsl:template match = "programlisting[ancestor::informaltable]">
     <pre class = "table-{name(.)}"><xsl:apply-templates/></pre>
  </xsl:template>

  <xsl:template match = "refsynopsisdiv">
     <h2 class = "{name(.)}-title">Synopsis</h2>
     <div class = "{name(.)}"><xsl:apply-templates/></div>
  </xsl:template>

  <!-- table: remove border = '1' -->

  <xsl:template match = "table|informaltable">
     <xsl:choose>
        <xsl:when test = "self::table and tgroup|mediaobject|graphic">
           <xsl:call-template name = "calsTable"/>
        </xsl:when><xsl:when test = "self::informaltable and tgroup|mediaobject|graphic">
           <xsl:call-template name = "informal.object">
              <xsl:with-param name = "class"><xsl:choose>
                 <xsl:when test = "@tabstyle">
                    <xsl:value-of select = "@tabstyle"/>
                 </xsl:when><xsl:otherwise>
                    <xsl:value-of select = "local-name(.)"/>
                 </xsl:otherwise>
              </xsl:choose></xsl:with-param>
           </xsl:call-template>
        </xsl:when><xsl:otherwise>
           <table class = "table"><xsl:copy-of select = "@*[not(local-name(.)='border')]"/>
              <xsl:call-template name = "htmlTable"/>
           </table>
        </xsl:otherwise>
     </xsl:choose>
  </xsl:template>

  <xsl:template match = "tgroup" name = "tgroup">
     <xsl:variable name="summary"><xsl:call-template name="dbhtml-attribute">
        <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
        <xsl:with-param name="attribute" select="'table-summary'"/>
     </xsl:call-template></xsl:variable>

     <xsl:variable name="cellspacing"><xsl:call-template name="dbhtml-attribute">
        <xsl:with-param name="pis" select="processing-instruction('dbhtml')"/>
        <xsl:with-param name="attribute" select="'cellspacing'"/>
     </xsl:call-template></xsl:variable>

     <xsl:variable name="cellpadding"><xsl:call-template name="dbhtml-attribute">
        <xsl:with-param name="pis" select="processing-instruction('dbhtml')[1]"/>
        <xsl:with-param name="attribute" select="'cellpadding'"/>
     </xsl:call-template></xsl:variable>

     <table border = '0' class = "table">
        <xsl:choose>
           <xsl:when test="../textobject/phrase">
              <xsl:attribute name="summary">
                 <xsl:value-of select="../textobject/phrase"/>
              </xsl:attribute>
           </xsl:when><xsl:when test="$summary != ''">
              <xsl:attribute name="summary">
                 <xsl:value-of select="$summary"/>
              </xsl:attribute>
           </xsl:when><xsl:when test="../title">
              <xsl:attribute name="summary">
                 <xsl:value-of select="string(../title)"/>
              </xsl:attribute>
           </xsl:when>
           <xsl:otherwise/>
        </xsl:choose><xsl:if test="$cellspacing != '' or $html.cellspacing != ''">
           <xsl:attribute name="cellspacing"><xsl:choose>
              <xsl:when test="$cellspacing != ''"><xsl:value-of select="$cellspacing"/></xsl:when>
              <xsl:otherwise><xsl:value-of select="$html.cellspacing"/></xsl:otherwise>
           </xsl:choose></xsl:attribute>
        </xsl:if><xsl:if test="$cellpadding != '' or $html.cellpadding != ''">
           <xsl:attribute name="cellpadding"><xsl:choose>
              <xsl:when test="$cellpadding != ''"><xsl:value-of select="$cellpadding"/></xsl:when>
              <xsl:otherwise><xsl:value-of select="$html.cellpadding"/></xsl:otherwise>
           </xsl:choose></xsl:attribute>
        </xsl:if><xsl:if test="../@pgwide=1">
           <xsl:attribute name="width">100%</xsl:attribute>
        </xsl:if>

        <xsl:variable name="colgroup">
           <colgroup><xsl:call-template name="generate.colgroup">
              <xsl:with-param name="cols" select="@cols"/>
           </xsl:call-template></colgroup>
        </xsl:variable>

        <xsl:variable name="explicit.table.width"><xsl:call-template name="dbhtml-attribute">
           <xsl:with-param name="pis" select="../processing-instruction('dbhtml')[1]"/>
           <xsl:with-param name="attribute" select="'table-width'"/>
        </xsl:call-template></xsl:variable>

        <xsl:variable name="table.width"><xsl:choose>
           <xsl:when test="$explicit.table.width != ''">
              <xsl:value-of select="$explicit.table.width"/>
           </xsl:when><xsl:when test="$default.table.width = ''">
              <xsl:text>100%</xsl:text>
           </xsl:when><xsl:otherwise>
              <xsl:value-of select="$default.table.width"/>
           </xsl:otherwise>
        </xsl:choose></xsl:variable>

        <xsl:if test="$default.table.width != '' or $explicit.table.width != ''">
           <xsl:attribute name="width"><xsl:choose>
              <xsl:when test="contains($table.width, '%')">
                 <xsl:value-of select="$table.width"/>
              </xsl:when><xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0">
                 <xsl:choose>
                    <xsl:when test="function-available('stbl:convertLength')">
                       <xsl:value-of select="stbl:convertLength($table.width)"/>
                    </xsl:when><xsl:when test="function-available('xtbl:convertLength')">
                       <xsl:value-of select="xtbl:convertLength($table.width)"/>
                    </xsl:when><xsl:otherwise>
                       <xsl:message terminate="yes">
                          <xsl:text>No convertLength function available.</xsl:text>
                       </xsl:message>
                    </xsl:otherwise>
                 </xsl:choose>
              </xsl:when><xsl:otherwise>
                 <xsl:value-of select="$table.width"/>
              </xsl:otherwise>
           </xsl:choose></xsl:attribute>
        </xsl:if>

        <xsl:choose>
           <xsl:when test="$use.extensions != 0 and $tablecolumns.extension != 0">
              <xsl:choose>
                 <xsl:when test="function-available('stbl:adjustColumnWidths')">
                    <xsl:copy-of select="stbl:adjustColumnWidths($colgroup)"/>
                 </xsl:when><xsl:when test="function-available('xtbl:adjustColumnWidths')">
                    <xsl:copy-of select="xtbl:adjustColumnWidths($colgroup)"/>
                 </xsl:when><xsl:when test="function-available('ptbl:adjustColumnWidths')">
                    <xsl:copy-of select="ptbl:adjustColumnWidths($colgroup)"/>
                 </xsl:when><xsl:otherwise>
                    <xsl:message terminate="yes">
                       <xsl:text>No adjustColumnWidths function available.</xsl:text>
                    </xsl:message>
                 </xsl:otherwise>
              </xsl:choose>
           </xsl:when><xsl:otherwise>
              <xsl:copy-of select="$colgroup"/>
           </xsl:otherwise>
        </xsl:choose>

        <xsl:apply-templates select="thead"/>
        <xsl:apply-templates select="tfoot"/>
        <xsl:apply-templates select="tbody"/>

        <xsl:if test=".//footnote"><tbody class="footnotes">
           <tr><td colspan="[EMAIL PROTECTED]">
              <xsl:apply-templates select=".//footnote" mode="table.footnote.mode"/>
           </td></tr>
        </tbody></xsl:if>
     </table>
  </xsl:template>
</xsl:stylesheet>

Reply via email to