This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: [docbook] ulink and alternate transformations
- From: Bob Stayton <bobs at sco dot com>
- To: Jeffery Biss <jeff at marco-inc dot com>
- Cc: docbook at lists dot oasis-open dot org
- Date: Mon, 27 Oct 2003 21:58:12 -0800
- Subject: Re: [docbook] ulink and alternate transformations
- References: <3F9DEFFF.2040402@marco-inc.com>
On Mon, Oct 27, 2003 at 10:26:39PM -0600, Jeffery Biss wrote:
> Hello all,
>
> I just realized that if I use the ulink element and wish to produce say,
> for simplicity's sake, two output formats: PDF (with links) and html I
> had no idea how to deal with that in the XML source. As I see it now
> there are two possible options:
>
> 1) Two source files, one for each output format:
>
> ulink for html output: <ulink url="someFile.html">some file</ulink>
>
> unlink for PDF output: <ulink url="someFile.pdf">some file</ulink>
>
> 2) One source where the file name is supplied without an extension:
> <ulink url="someFile.">some file</ulink>
> where the stylesheet must add the appropriate extension.
>
> Which way is correct? I would think that there must be a method that
> allows a single source to produce a large variety of transformed output
> without requiring rework of the source. Any help would be greatly
> appreciated.
You could use an inlinemediaobject with two textobject
elements. With the right role attributes, the stylesheet
will select one automatically:
<inlinemediaobject>
<textobject role="html">
<phrase><ulink url="someFile.html">some file</ulink></phrase>
</textobject>
<textobject role="fo">
<phrase><ulink url="someFile.pdf">some file</ulink></phrase>
</textobject>
</inlinemediaobject>
The nice thing about this approach is that the
two urls can be completely different if necessary.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs@sco.com
To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.