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?


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 ?

(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. :-)

>> What you are saying is that it is relative to the current working
>> directory,
>> i.e. the one the processor was invoked from. Is that really the case ?
>> I find that rather surprising !
> 
> The current working directory is not considered. For example, you could
> process the test files from within the testdocs/tests directory and
> write the FO output one level up in testdocs, and the relative paths
> would still resolve since that is where the graphics directory resides. 
> Likewise, you could process the test files from above in the testdocs
> directory and write the FO output to tests, and the paths would not
> resolve, because tests does not contain a graphics directory.  That
> shows that the current working directory is not used.  The testdocs
> setup assumes the FO output will be placed in testdocs, as specified by
> the Makefile.

I see. Thanks for the clarification ! Wouldn't it be clearer to
set up the file layout such that the URIs work as relative URIs
w.r.t. the input xml ? At least it seems more consistent to me.


Thanks,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...


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