docbook: Adding headers to html output


Previous by date: 4 Dec 2002 15:37:25 -0000 Re: Adding headers to html output, Togan Muftuoglu
Next by date: 4 Dec 2002 15:37:25 -0000 Errors from missing vars, jacob.keystreams.com
Previous in thread: 4 Dec 2002 15:37:25 -0000 Re: Adding headers to html output, Togan Muftuoglu
Next in thread:

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

Previous by date: 4 Dec 2002 15:37:25 -0000 Re: Adding headers to html output, Togan Muftuoglu
Next by date: 4 Dec 2002 15:37:25 -0000 Errors from missing vars, jacob.keystreams.com
Previous in thread: 4 Dec 2002 15:37:25 -0000 Re: Adding headers to html output, Togan Muftuoglu
Next in thread:


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