This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: broken links when importing autotoc.xsl intocustomization layer
- From: Bob Stayton <bobs at caldera dot com>
- To: David Cramer <dcramer at broadjump dot com>, docbook-apps at lists dot oasis-open dot org
- Date: Wed, 20 Mar 2002 12:51:25 -0800
- Subject: Re: DOCBOOK-APPS: broken links when importing autotoc.xsl intocustomization layer
- References: <97B71B827DFB2B448A73EC00E5DA0EE602A038@logos.inhouse.broadjump.com>
On Wed, Mar 20, 2002 at 01:07:03PM -0600, David Cramer wrote:
> Hi there,
> When I customize a template in the docbook xsls, I copy the .xsl file
> over from the distribution to the folder containing my customization
> layer, modify the templates in the file, then import the modified file
> into my driver. Then when I need to update, I can do a 3-way diff using
> the unchanged .xsl from the current version as the common original and
> merge my changes into the new version of that .xsl. I find this easier
> to maintain than putting individual templates into my customization
> layer and then trying to figure out if anything within it has changed
> between versions.
>
> Generally, this works great. With autotoc.xsl, however, whenever I copy
> it over to my customization layer folder and then import it, then use it
> in chunked output, the links in the toc are broken: target filenames
> fail to appear, only the anchor names do, as if it were a monolithic
> html page.
>
> But if I then comment out the template:
>
> <xsl:template name="href.target">
> <xsl:param name="object" select="."/>
> <xsl:text>#</xsl:text>
> <xsl:call-template name="object.id">
> <xsl:with-param name="object" select="$object"/>
> </xsl:call-template>
> </xsl:template>
>
> the links are no longer broken. Since the workaround is easy, it's not
> really a problem for me, but I'm curious as to why it happens and
> whether it's a bug or a feature ;-)
It sounds like you are having a problem with sequencing of
imports. There is a template named href.target in
chunk.xsl that should be overriding the one in autotoc.xsl
for chunked output. Generally, the last one in the
sequence wins.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
Caldera International, Inc. fax: (831) 429-1887
email: bobs@caldera.com