docbook:
& titles


Previous by date: 26 Jan 2001 01:02:32 -0000 Re:
Next by date: 26 Jan 2001 01:02:32 -0000 Re: empty/strange toc entries, Dan York
Previous in thread: 26 Jan 2001 01:02:32 -0000 Re:
Next in thread:

Subject: Re:
& titles
From: "Greg Ferguson" ####@####.####
Date: 26 Jan 2001 01:02:32 -0000
Message-Id: <10101251957.ZM281@hoop.timonium.sgi.com>

On Jan 25, 10:55pm, Martin WHEELER wrote:
> Subject: Re: <article> & <articleinfo> titles
> On Thu, 25 Jan 2001, Greg Ferguson wrote:
>
> > Anyway, this looks like a bug to me; something didn't carry over
> > with the change from artheader to articleinfo.
>
> That's how it looks to me.
>
> > So you'd like to see the title carried over to all pages
> > (3.1 behavior), correct?
>
> Please.
>
> > What about the subtitles? Do we want soemthing like this on
> > all HTML pages (centered; as in Bootdisk-HOWTO):
> >
> > 	my_title<br>
> >         my_subtitle
>
> Would be nice, yes.  (Although something in the back of my mind is
> telling me that this position is sometimes used for version or edition?)
>
> TIA
> (Could you let us know *where* the fix takes place?  Might help in
> future debugging exercises.)

I didn't get to the <br> for the subtitle, but I do have
a fix for getting the article title on all pages of the document.
Described below...

In common/dbcommon.dsl, approx line #1001, there is this processing
code:

------

(define (article-title nd)
  (let* ((artchild  (children nd))
         (artheader (select-elements artchild (normalize "artheader")))
         (ahtitles  (select-elements (children artheader)
                                     (normalize "title")))
...

------

This function tries to prepare a proper title string, but in this
case, the code was never updated to roll with the changeover to using
"articleinfo" v. "artheader".

So in ldp.dsl I provide a fix for this method, which works for either
permutation ("articleinfo" or "artheader") :

------

(define (article-title nd)
  (let* ((artchild  (children nd))
         (artheader (select-elements artchild (normalize "artheader")))
         (artinfo   (select-elements artchild (normalize "articleinfo")))
         (ahdr (if (node-list-empty? artheader)
                   artinfo
                   artheader))
         (ahtitles  (select-elements (children ahdr)
                                     (normalize "title")))
         (artitles  (select-elements artchild (normalize "title")))
         (titles    (if (node-list-empty? artitles)
                        ahtitles
                        artitles)))
    (if (node-list-empty? titles)
        ""
        (node-list-first titles))))

------

The results can be seen in the Nvidia-OpenGL-Configuration mini-HOWTO
which I re-published (a DocBook 4.1 sgml file):

  http://linuxdoc.org/HOWTO/mini/Nvidia-OpenGL-Configuration/

(I ran a 3.1 DocBook file thru as well, to verify that works ok)

The modifed ldp.dsl is checked into our CVS tree and is available
in the author's resource area of the web site; or directly from:

  http://linuxdoc.org/authors/tools/ldp.dsl

r,

-- 
Greg Ferguson     - s/w engr / mtlhd         | gferg at sgi.com
SGI Tech Pubs     - http://techpubs.sgi.com/ |
Linux Doc Project - http://www.linuxdoc.org/ | gferg at metalab.unc.edu


Previous by date: 26 Jan 2001 01:02:32 -0000 Re:
Next by date: 26 Jan 2001 01:02:32 -0000 Re: empty/strange toc entries, Dan York
Previous in thread: 26 Jan 2001 01:02:32 -0000 Re:
Next in thread:


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