This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: text output from DocBook
- To: Gregory Leblanc <gleblanc at cu-portland dot edu>
- Subject: Re: DOCBOOK-APPS: text output from DocBook
- From: Nik Clayton <nik at nothing-going-on dot demon dot co dot uk>
- Date: Sun, 12 Nov 2000 12:27:22 +0000
- Cc: docbook-apps at lists dot oasis-open dot org
- Organization: Nik at home, where there's nothing going on
- References: <0G3R00B13NUZQJ@eListX.com>
On Fri, Nov 10, 2000 at 01:44:52AM +0800, Gregory Leblanc wrote:
> > Right. That's the same route we're (FreeBSD) doing (and the reason why
> > I wanted the 'ASCII art' support working in <mediaobject>.
>
> We're using a similar method over at the LDP, but we're using Lynx by
> default, as it seems to do a slightly better job with anchor tags.
> Now for a real question. I can create some markup like <ulink
> type="http" url="http://www.LinuxDoc.org/FAQ">Faq Section of the
> LDP</ulink>, and it looks and works fine for HTML, and produces
> something like <a href="http://www.LinuxDoc.org/FAQ">Faq Section of the
> LDP</a>. When I convert this to text using lynx (with no url list) or
> with w3m, then I just get "Faq Section of the LDP" inline in my
> document. Is there a way to specify something in our DSSSL stylesheets
> that will change that to a more useful format for print output?
For print output, just define %show-ulinks% to true, which does exactly
what you want.
The HTML sheets don't honour %show-ulinks%, so you have to roll your own.
Put this in your HTML stylesheet customisation layer.
(define %show-ulinks% #t)
(element ulink
(make sequence
(make element gi: "A"
attributes: (list
(list "HREF" (attribute-string (normalize
"url")))
(list "TARGET" "_top"))
(if (node-list-empty? (children (current-node)))
(literal (attribute-string (normalize "url")))
(process-children)))
(if %show-ulinks%
(make sequence
(make element gi: "TT"
(literal " (")
(literal (attribute-string (normalize "url")))
(literal ")")))
(empty-sosofo))))
which will do what you want.
N
--
Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95.
Telephone line, $24.95 a month. Software, free. USENET transmission,
hundreds if not thousands of dollars. Thinking before posting, priceless.
Somethings in life you can't buy. For everything else, there's MasterCard.
-- Graham Reed, in the Scary Devil Monastery