This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
bobs@sagehill.net


----- Original Message ----- 
From: "J. Marc Roth" <jmroth@mpi-sb.mpg.de>
To: <docbook-apps@lists.oasis-open.org>
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
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]