OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] [docbook-xsl] relative links in chunked HTML

On Tue, Jun 03, 2003 at 03:50:33PM +0200, Peter Klotz wrote:
> Hi,
> how can one influence the links that are generated in chunked HTML with
> the DocBook XSL stylesheets? I use base.dir to define the location where
> the chunked files are generated and that works fine, but the links are
> still refering to the document without this path.
> So even if I set base.dir=work/test and the chunker writes its files into
> work/test/index.html e.g. links in index.html are refering to
> ch01s12.html#N10102. I would like to at least get a link to
> work/test/ch01s12.html#N10102 or some other prefix that I can set.

There isn't a built-in prefix for hrefs that you can add.

But I don't understand why you need a prefix at all.
A relative URL is taken as relative to the address of
the calling file.  A link from an address
to a relative URL href="ch01s12.html#N10102" should be resolved
by the browser to

If href="work/test/ch01s12.html#N10102",
then the browser would be requesting
Or else I'm missing something.

> I'm using this inside Cocoon and the prefix needs to be something that I 
> can use to choose the pipeline. "test" would be a variable directory 
> coming from a parameter, so with only ch01s12.html I don't know in which 
> directory the files are.

So Cocoon is doing something with the files that make
normal relative URLs not work, right?
Can you give an example?

Since there is no parameter for such a prefix, you'll have
to customize one of the DocBook templates to add it.
Take a look at the "href-target-uri" template in 
html/chunk-common.xsl.  It generates the href
for all cross reference targets.  You should be
able to add a new parameter as a prefix
to the path if you need it.  Then pass the parameter
value when you call the stylesheet customization.


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

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]