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

Re: use of slices restricted with <img>-tag

On Sun, 12 Dec 1999, Jan Holler wrote:

> hi
> while working on my sources and implementing all those
> hints i got recently i run into some new problem. since i
> know that i do not know all different things about wml i
> let you make the decision if i'm right and besides calling
> htmlfix on each html-file again what to do about it:
> supposed the files image.gif and image_f.gif are there 
> test.wml is:
> ---------------------
> #!wml -o (ALL-LANG_*)uLANG_DE:%BASE.html \
>     -o (ALL-LANG_*)uLANG_FR:%BASE_f.html
> #use wml::std::lang
> <lang:new id=de short>
> <lang:new id=fr short>
> <html><head><title>test</title></head><body>
> <img src="$(ROOTIMG)/t_akt<de: ><fr: _f>_lo.gif">
> </body></html>
> ---------------------
> compile it:
> $ wml -E "weblint -s" test.wml
> line 2: setting WIDTH and HEIGHT attributes on IMG tag can
> improve rendering performance on some browsers.
> test.html:
> <img src="image.gif">
> test_f.html
> <img src="image_f.gif">
> so how is that?
> cheers
>  -jan

Hi Jan,

to understand what happens, try
  prompt$ wml -p1-7 -v test.wml
you will see something like
  <img src="t_akt[LANG_DE::][LANG_FR:_f:]_lo.gif" alt="">

Thus when wml_p7_htmlfix is invoked, image file can not be found and
height and width attributes cannot be inserted. One solution is to call
htmlfix as an epilog filter. Define a script htmlfix.sh
/path/to/wml_p7_htmlfix $1 > $1.$$ && mv $1.$$ $1

Now run wml this way:
  prompt$ wml -E /path/to/htmlfix.sh test.wml

Note: the <de: > tag is useless in your example.

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