[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] changes to relative image path generation ?
Hi Stefan,
Are you using XIncludes to assemble your content? If so, then
the xml:base attributes that are generated when XIncludes
are processed are likely causing your difficulties. There should
be a parameter to turn off xml:base processing, but it
doesn't exist yet.
Until there is, you'll need a small customization to fix your problem.
The pathname remapping is handled by this template
in html/chunk-code.xsl:
<!-- Resolve xml:base attributes -->
<xsl:template match="@fileref">
<!-- need a check for absolute urls -->
<xsl:choose>
<xsl:when test="contains(., ':')">
<!-- it has a uri scheme so it is an absolute uri -->
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<!-- its a relative uri -->
<xsl:call-template name="relative-uri">
<xsl:with-param name="destdir">
<xsl:call-template name="dbhtml-dir">
<xsl:with-param name="context" select=".."/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
To turn off the use of the relative-uri template, just use this template
instead:
<xsl:template match="@fileref">
<xsl:value-of select="."/>
</xsl:template>
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Stefan Seefeld" <seefeld@sympatico.ca>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, November 09, 2005 9:25 PM
Subject: [docbook-apps] changes to relative image path generation ?
> Hi there,
>
> I'm writing docbook documentation and transforming it to html
> with the latest released stylesheets. My build system uses
> distinct source and build trees, i.e. images are copied out
> of the source tree into the build tree to preserve the relative
> reference structure between document and resources.
>
> This used to work fine, but now I realize that with the current
> stylesheets the filename I use in mediaobjects isn't passed
> through to the generated html any more, but instead is
> replaced with a relative path to the source directory.
>
> Why is that ? This has the very unfortunate effect that
> I somehow have to check in my build system what stylesheet
> version users are using so I can work around this issue
> appropriately.
>
> Is there any new parameters that come with this feature
> that I could use to get back the old behavior ?
>
> Thanks,
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]