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

Re: Bug report



On Mon, 8 Feb 1999, David Mentre wrote:

> PROBLEM DESCRIPTION:
> Table Of Content does not work with home-defined containers.
> 
> * The following code :
> #use wml::std::all
> 
> <define-container h2>
>  <h2* align=center>%body</h2*>
> </define-container>
[snip}

Hi David, thanks for the report.
Unfortunately, i do not consider your problem as a bug. As explained in
the doc (wml_tutorial)

       WML also provides a way to overwrite existing HTML tags,
       i.e.  you can define a custom tag with the same name as an
       already known HTML tag and use the original HTML tag
       inside it.

       Input:

          1| <define-tag br whitespace=delete>
          2| <br*><br*>
          4| </define-tag>
          5|
          6| Some Text<br>
          7| Some more Text

When you invoke toc.wml, you redefine the <h1>..<h6> tags. What you want
is to redefine this new tags once again. You could try this:

<copy-var *user-functions*::h2 *user-functions*::myh2>
<define-container h2>
<set-var %attributes>
  <myh2 align=center %attributes>%body</myh2>
</define-container>

It's tricky, but i see no other solutions.

Denis
--
D. Barbier
http://imacs.polytechnique.fr

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