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

Re: Home of WML and other stuff

On Wed, 10 Mar 1999, Tobias Oetiker wrote:

> what I would like to do is to setup a wml system where the basic 'look and
> feel' elements are defined in a special file these would be things like
> colors and names of background gif files. Now the resolution of these names
> should happen in the first pass so that I can use the real values in every
> subsequent pass ... 
> defining these things in .wmlrc looks a bit strange to me ... I thought
> having a file with 
> #define PageBG=#ffffff
> #define PageFG=#000000
> .
> .
> .
> would be nicer ... 

You're totally right.
But... all the 9 passes are independant, and require different statements
(or command-line options) to define variables. When you invoke wml with a
-D option (idem via .wmlrc), wml translates -Dfoo=bar to 
* --set foo bar              for pass 2
* -d foo=var                 for pass 3
* -Dm4_foo=var               for pass 4, and so on.

If the variable substitution is performed by wml_p1_ipp, an auxiliary
file has to be written, which contains the definitions.
After the first pass, wml will read this file and translate variable
substitutions for the others.

The current solution is better because wml gathers all informations
before invoking the 9 passes. If you want more flexibility, i can
- let #define be a synonym of -D in the .wmlrc files
- add a ``-c file'' wml option to load config files. We have to
  decide whether this file is read before, after or instead of .wmlrc.


D. Barbier
** Soutien  Altern ** http://www.altern.org/defense/

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