[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Imagedata fileref - wrong path
----- Original Message ----- From: "Stefan Seefeld" <seefeld@sympatico.ca> To: "Bob Stayton" <bobs@sagehill.net> Cc: <donna@terpsichore.ws>; <docbook-apps@lists.oasis-open.org> Sent: Friday, November 18, 2005 2:28 PM Subject: Re: [docbook-apps] Imagedata fileref - wrong path > Hi Bob, > Bob Stayton wrote: > > Hi Donna, > > The XInclude process inserts xml:base attributes into the elements that are > > included to indicate what directory (actually what file) the element came > > from. The image filerefs in an element are assumed to be taken as relative > > to that location, not the location of the including file. So, for example, > > if you unit test a chapter without Xincludes, then images are taken relative > > to the chapter file and it works. When you then XInclude that chapter from > > a book file in another location, the stylesheet uses the xml:base attributes > > to recompute the path to the images so that they are taken as relative to > > the master book file. > > I had read your earlier remarks about the generated xml:base attributes, > yet I'm not sure I understand them. The reason is that all the files my document > is composed of are located in the same directly (the 'source dir'), while > I'm building from within a distinct place (the 'build dir'). > > The images I reference in my document are placed in a subdirectory of the > source dir, and so the fileref attribute reads 'images/ast.svg' (say). > > When combining the xml:base attribute (which would be the relative path > from build dir to source dir) with the fileref attribute, I get a path > from the build dir to the original location of the image files. > That doesn't seem right. Yes, that isn't right. But I don't get that result when I build from another directory. I'm using xsltproc 1.1.14. When I do so, the image references in the output do not include any information about the build directory. All references are relative to the book.xml file in the source directory. > I believe what should happen is that the fileref should be adjusted to > account for the relative path from master document to the xincluded parts, > in an attempt to make the xinclude processing as transparent to the infoset > processing as possible. But that's not quite what happens, quite in the contrary. Can you provide a short example that illustrates the problem you are seeing? Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]