Next in thread → Next in month →

RE: [docbook-apps] Idea/Mechanism how to include images from variable locations dynamically

From
Mauritz Jeanson <>
Date
2006-07-07T15:50:04+00:00
ID
000301c6a1d6$d02dbed0$71ea1a51@D7MZ171J
Thread
RE: [docbook-apps] Idea/Mechanism how to include images from variable locations dynamically
> -----Original Message-----
> From: Stefan Zander 
> 
> To put it into simpler words: I need a mechanism to tell e.g. the 
> processor or a stylesheet at the beginning of the processing which 
> location should be used.
> 
> I am thinking of using a parameter whose value determines which 
> directory is used to include the images.

There is a parameter called img.src.path. Have you considered using that?
http://docbook.sourceforge.net/release/xsl/current/doc/fo/img.src.path.html


> The code for including the images in each separate xml-file 
> looks like this:
> ...
> <figure>
>   <title>title of figure</title>
>   <mediaobject xml:base="...">
>     <imageobject >
>       <imagedata fileref="{directory}/{filename}.png" width="100%" 
> scalefit="1" format="PNG" align="center" />
>     </imageobject>
>   </mediaobject>
> </figure>
> ...
> {directory} should be replaced by the location specified e.g. by a 
> parameter whereas {filename} is a fixed entry (the filename an image).


How about using (for example) sed or Perl for search and replace operations
as a pre-processing stage?

/MJ
Next in thread → Next in month →