Messages per Month
|Tony Graham||Jul 28, 2006 12:22 pm|
|Bob Stayton||Jul 29, 2006 11:53 am|
|Stefan Seefeld||Aug 7, 2006 8:32 am|
|Bob Stayton||Aug 8, 2006 1:28 am|
|Stefan Seefeld||Aug 8, 2006 3:48 am|
|Bob Stayton||Aug 8, 2006 11:19 am|
|Stefan Seefeld||Aug 9, 2006 12:06 am|
|Bob Stayton||Aug 9, 2006 12:38 am|
|Stefan Seefeld||Aug 9, 2006 1:02 am|
|Stefan Seefeld||Aug 9, 2006 4:40 am|
|Tony Graham||Aug 9, 2006 6:06 am|
|Subject:||Re: [docbook-apps] Base URI for result of transformation?|
|From:||Bob Stayton (bo...@sagehill.net)|
|Date:||Aug 9, 2006 12:38:36 am|
----- Original Message ----- From: "Stefan Seefeld" <seef...@sympatico.ca> To: <docb...@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 bo...@sagehill.net