This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: section titles as links,turning off in non-html output
- From: Doug du Boulay <ddb at R3401 dot msl dot titech dot ac dot jp>
- To: ed dot nixon at lynnparkplace dot org
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 24 Feb 2003 13:34:25 +0900
- Subject: Re: DOCBOOK-APPS: section titles as links,turning off in non-html output
- References: <3E591506.2000308@lynnparkplace.org>
- Reply-to: ddb at R3401 dot msl dot titech dot ac dot jp
On Monday 24 February 2003 03:37, ed nixon wrote:
> I may have painted myself into a corner while trying to create some
> (hopefully) intuitive navigation functionality in a sdocbook article I'm
> working on. I've added a ULINK element to the TITLE for SECTION. Of
> course it works as expected and like a charm when I'm generating my html
> output.
>
> But, in multipurposing mode, I've just pumped out an RTF version of some
> of my document using the DSSSL stylesheets. I find that the link targets
> are enclosed in brackets after the TITLE text. This is confusing for the
> reader.
>
> Questions:
> * Being almost totally ignorant of the DSSSL side of the stylesheets, is
> there a handy parameter that might allow me to defeat this functionalisty.
under debian with the docbook dsssl stylesheets 1.77
the file /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/dbparam.dsl
contains the following:
(define %show-ulinks%
;; REFENTRY show-ulinks
;; PURP Display URLs after ULinks?
;; DESC
;; If true, the URL of each ULink will appear in parenthesis after
;; the text of the link. If the text of the link and the URL are
;; identical, the parenthetical URL is suppressed.
;; /DESC
;; AUTHOR N/A
;; /REFENTRY
#t)
you can override with the following in your dsssl customization.
(define %show-ulinks% #f)
Unfortunately that will probably switch ulinks off everywhere, and not just in
your titles.
In your customization you can probably redefine the entire
<element ulink ...... definition in modular/print/dblink.dsl
to change the following from:
(if %show-ulinks%
(make sequence
(literal " (")
(literal (attribute-string (normalize "url")))
(literal ")"))
(empty-sosofo)))
to do something along the lines of
(if (and %show-ulinks% (not (have-ancestor (normalize "title"))))
(make sequence
(literal " (")
(literal (attribute-string (normalize "url")))
(literal ")"))
(empty-sosofo)))
but I am just guessing :-)
good luck
Doug