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

Re: defining tags

On Sun, 23 Jan 2000, Carsten Wartmann wrote:

> This works but is not very self explaining, so I tried this:
> <news date="19.01.2000" link="www.dunbar.com" text="Python Doc Browser">
> As I understand the documentation I came up with this:
> <define-tag news2 date link text>
> <tr><td bgcolor="#00FFFF" width="168">
> <get-var date>:&nbsp; <a href="http://<get-var link>/"><get-var text></a>
> </td></tr>
> </define-tag>
> which doesn't works quite as expected, a <get-var date> expands to
> date="19.01.2000" and not only "19.01.2000". So is it possible to
> define tags like the second?

You are right, documentation has not been my priority since i maintain
WML. This is bad, but if anyone want to rewrite some parts of docs, it
will really help me.

For your problem, here is the ``standard'' way:
  #   <preserve> and <restore> are defined in wml::std::tags
  #use wml::std::tags

  <define-tag news>
  <preserve date>
  <preserve link>
  <preserve text>
  <set-var %attributes>
  <tr><td bgcolor="#00FFFF" width="168">\
  <get-var date>:&nbsp; <a href="http://<get-var link>/"><get-var text></a>\
  <restore text>
  <restore link>
  <restore date>

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