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] Base URI for result of transformation?

----- Original Message ----- 
From: "Stefan Seefeld" <seefeld@sympatico.ca>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, August 09, 2006 12:05 AM
Subject: Re: [docbook-apps] Base URI for result of transformation?

> Bob Stayton wrote:
>> Hi Stefan,
>> It is a bit confusing to set up graphics directories this way.  You are
>> correct that relative paths are taken relative to the document that
>> contains the path reference.  In the case of FO output, the XSL-FO
>> processor is reading the FO file and resolving the paths in the src
>> attribute of any fo:external-graphic files.   So it is interpreting the
>> paths as relative to the location of the FO file.
> Good. But shouldn't there be some adjustment that accounts for the
> relative path between the original (here docbook) input and the
> generated fo output ? How else can the fo processor find external
> graphics without me copying them around manually ?

Yes, there may be a need for some adjustment, but the stylesheet can't do 
it.  In FO output, the stylesheet has no knowledge of the location of the 
output it generates.  That is handled by either the XSLT processor with 
its -output option, or the processing shell with its > redirection.  You 
could customize the stylesheet to pass in the output location as a 
parameter, and then the stylesheet could do something with it.

> (Some digging in the xsl-fo stylesheet parameter documentation reveals
> that <xsl:param name="keep.relative.image.uris" select="0"/>
> (http://docbook.sourceforge.net/release/xsl/current/doc/fo/keep.relative.image.uris.html)
> may do exactly that: replace relative-to-input-xml image URIs by absolute
> URIs so the fo processor can find them by their absolute location. In 
> fact,
> that was what my original question was all about, admittedly poorly 
> formulated. :-)

Not quite.  The effect of that parameter is for the stylesheet to resolve 
the fileref relative to any xml:base attributes on ancestor elements.  Most 
xml:base attributes are added by an XInclude processor (only if needed, 
though).  You won't get an absolute path unless one of the xml:base 
attributes is absolute.  You could manually add one on your root element to 
do that.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

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