Next in thread → Next in month →

Re: [docbook-apps] docbook xsl: prefix for link and xref in (x)html

From
Bob Stayton <>
Date
2004-11-24T17:32:25+00:00
ID
03a101c4d24b$8f00c8f0$6600a8c0@toshiro
Thread
Re: [docbook-apps] docbook xsl: prefix for link and xref in (x)html
Do you want *all* internal links to have this prefix?  That is, including
links that are generated by the stylesheet, such as TOC, index, Next,
Previous?  I presume so.

If so, then you can achieve that behavior without actually changing the
hrefs.  Set the 'html.base' parameter to "/myprefix/", and then your HTML
files will have <base href="/myprefix/"> in the HEAD, and so browsers will
add the prefix when they follow a link.

If you need to change the actual href attributes, then you will have to
write a new href.target as you discovered (or file a feature request for a
new prefix parameter).

Bob Stayton
Sagehill Enterprises
DocBook Consulting



----- Original Message ----- 
From: "J. Marc Roth" <>
To: <>
Sent: Tuesday, November 23, 2004 5:00 PM
Subject: [docbook-apps] docbook xsl: prefix for link and xref in (x)html


> Hello,
> maybe I'm missing the obvious but here's my problem.
> I'd like to prefix any internal link (e.g. <link> or <xref>) with a
> fixed string.
> E.g. <link linkend="bla"> will result in the following HTML code: <a
> href="/myprefix/ch01.htm">
> As far as I came I found out that customization layers won't really
> help, since in case I override/replace a template I can't just "catch"
> the old template's output (in this case href.target or similar) and
> prefix it with something. I would've liked the solution to be upwards
> compatible with future docbook xsl stylesheets.
> Any idea? Thanks.
> ~jm
>
>
Next in thread → Next in month →