[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Problems with relative paths

On Fri, Oct 06, 2000 at 06:58:14PM +0200, Jan Ulrich Hasecke wrote:

> Hi,
> I always run into this problem. Again in my new site
> www.generationenprojekt.de
> This is 
> www.generationenprojekt.de/.wmlrc:
> -DROOT~.
> -I $HOME/.wml
> -D BASE_URL=http://www.generationenprojekt.de
> -E $HOME/bin/epilog
> In the directory ./Texte I have a file with the following imagepath:
> ./Texte/file.wml:
> <img src="$(ROOT)/GIFS/marliese.gif"> 
> This file is diverted into two files by the lang-shebang-line:
> ./Texte/file.html
> ./Texte/print/file.html
> In the first file the imagepath is correct, in the second not.
> I think the reason is. The pathes are resolved earlier than the
> divertion into two files.

Sure, variable expansion is performed during pass1 and file diversion is
the latest pass.

> How can I set the path right? Do I have to create the directory
> "print" on the same level as "Texte"? Or do I have to divert it like
> this:
> ./Texte/file.html
> ./Texte/file-print.html

This solution is certainly what i would have implemented.
I see no easy solution to your problem, because you want
  <img src="$(ROOT)/GIFS/marliese.gif">
to be written into 2 files with different expansion, which does not make
much sense.  But you may try something like
  <img src="[PRINT:../:]$(ROOT)/GIFS/marliese.gif">
to add a parent directory in print/file.html. Of course, this will break
wml_p7_htmlfix, and certainly other things, so using such a trick is not
a good idea unless you exactly know what you are doing.

Denis Barbier
WML Maintainer
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com