docbook: Thread: Adding headers to html output


[<<] [<] Page 2 of 2 [>] [>>]
Subject: Re: Adding headers to html output
From: Togan Muftuoglu ####@####.####
Date: 3 Dec 2002 08:05:22 -0000
Message-Id: <20021203080530.GC26583@dinamizm.com>

* Tabatha Persad; ####@####.#### on 02 Dec, 2002 wrote:
>Another couple of questions!
>
>Now that I have the header graphic displaying on the title page of the
>html output, how can I get it to appear as a header on all the html
>pages?  Also, any thoughts on how to get the navigation graphics
>working, would that go into the bookinfo section as well?

for XML it is much better to use XSL stylesheets as what you want is
already there

docbook-xsl-1.58.1/html/param.xsl

<xsl:param name="navig.graphics.extension" select="'.gif'"/>
<xsl:param name="navig.graphics" select="0"/>
<xsl:param name="navig.graphics.path">images/</xsl:param>
<xsl:param name="navig.showtitles">1</xsl:param>

For DSSL its been a long time I have used it but as far as I remember
you need to tweek dbnavig.dsl :-(
 

-- 

Togan Muftuoglu

Subject: Re: Adding headers to html output
From: Jaime Davila ####@####.####
Date: 4 Dec 2002 15:37:25 -0000
Message-Id: <12A10CDD8C8E3449A58AC0EAC99E1447010F983C@bilbo.engr.uconn.edu>

On tues, 03-12-2002 at 02:41, Tabatha Persad wrote
> Now that I have the header graphic displaying on the title page of the
> html output, how can I get it to appear as a header on all the html
> pages?  

        To do this with dsssl you have to redefine the function nav-banner
(which you can find on dbnavig.dsl). You can do this by 
including a line like this in your customized stylesheet:

(define (nav-banner elemnode)
  (let* ((rootelem       (sgml-root-element))
         (info           (info-element rootelem))
         (subtitle-child (select-elements (children rootelem)
                                          (normalize "subtitle")))
         (subtitle-info  (select-elements (children info)
                                          (normalize "subtitle")))
         (subtitle       (if (node-list-empty? subtitle-info)
                             subtitle-child
                             subtitle-info))
         (banner-text    (inherited-dbhtml-value elemnode "banner-text"))
         (banner-href    (inherited-dbhtml-value elemnode "banner-href"))
         (banner         (if (and banner-text (not (string=? banner-text
"")))
                             (literal banner-text)
                             (make sequence
                               (element-title-sosofo rootelem)
                               (if (node-list-empty? subtitle)
                                   (empty-sosofo)
                                   (make sequence
                                     (literal ": ")
                                     (with-mode subtitle-mode
                                       (process-node-list subtitle))))))))
    (make sequence
      (make empty-element gi: "img"
            attributes: '(("SRC" "logo.png")))
      (if banner-href
          (make element gi: "A"
                attributes: (list (list "HREF" banner-href))
                banner)
          banner))))


        Note that this is the function that you can find on dbnavig.dsl,
only
that we have add the line:

 (make empty-element gi: "img" 
       attributes: '(("src" "logo.png")))


>Also, any thoughts on how to get the navigation graphics
> working, would that go into the bookinfo section as well?

        I would do this by changing a little the function 
default-header-nav-tbl-noff (which is on dbnavig.dsl) and adding code just 
like in the previous example. In case you are not familiar with dsssl I
would suggest to read http://docbook.org/tdg/en/html/ch04.html#dsssl.

        Regards, 
--
Jaime Davila
[<<] [<] Page 2 of 2 [>] [>>]


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.