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

Re: small problem with wml


On Tue, Dec 12, 2000 at 03:54:42PM -0500, James A. Treacy wrote:
> There is clearly something wrong in the following:

Yes. You forgot the doublequotes around the argument, which are
essential at least in this example. :-)

> Running wml on the following:
>   <define-tag URL whitespace=delete>
>      <: if(q{%0} eq "") { print "&lt;none&gt;";}
>         else { $tmp=q{%0}; print "<a href=\"$tmp\">$tmp</a>";}
>   :> </define-tag>
>   <URL http://a.b.c/cd/>
>   <URL http://a.b.c/cd/ >
> gives
> <a href="http://a.b.c/cd">http://a.b.c/cd</a>
> <a href="http://a.b.c/cd/">http://a.b.c/cd/</a>

Yep. And

  <URL "http://a.b.c/cd/">
  <URL "http://a.b.c/cd/" >

should give

  <a href="http://a.b.c/cd">http://a.b.c/cd/</a>
  <a href="http://a.b.c/cd/">http://a.b.c/cd/</a>

> Why is the last slash disappearing?

Because of WML interprets the last slash in the first example as the
XML conform ending slash of a single tag in opposite to double tags,
where the ending slash is the first character in the closing tag.

That means, 

  <URL http://a.b.c/cd/> 

is treated like 

  <URL "http://a.b.c/cd" />

and not like 

  <URL "http://a.b.c/cd/" >

See http://www.engelschall.com/sw/wml/docs/docs/wml_macros.html in the
section "About Simple Tags".


		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-Administrator IBFI Schloss Dagstuhl; Students Representative
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com