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

Re: Problem with ifeq


Bela Kovac wrote:
> A friend recommended the software wml and i like it.

That's fine. :-)

> <ifeq "{#VAR#}" "fubar" "Yes!" "No? Why not?!">
> <define-tag test whitespace=delete
> attributes=verbatim>{#VAR#:%0:##}</define-tag>
> So my question: why is fubar <> fubar?

This does not work, because of the order of the different passes.
<ifeq ...> is from mp4h (pass 2) and {#VAR#} is from divert (pass5).

When evaluating the <ifeq ...> statement in pass 2, "{#VAR#}" is still
"{#VAR#}", it gets replaced later in pass 5.

Try "wml -p12 test.wml" to see how the file looks like after pass 2.

There will be written a "No? Why not?!" already at this stage, because
"{#VAR#}" hasn't been evaluated yet.

> Has this something to fo with "invisible" chars (like line-feed or
> something similar)?



		Regards, Axel
Axel Beckert - abe@cs.uni-sb.de - http://abe.home.pages.de/
Student of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-/FTP-Administrator IBFI Schloß Dagstuhl; Students Representative CS

PGP signature