[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: Nested tags
- From: Denis Barbier <nospam@thanx>
- Date: Tue, 11 Apr 2000 08:25:24 +0200 (CET)
On Mon, 10 Apr 2000, Xose Manoel Ramos wrote:
> I wonder if there is a simple way to define nested tags (i.e. tags
> that have a special meaning inside another tags).
>
> Something like:
>
> <macro>
> <title>Just the master</title>
> <content>
> This is the content
> </content>
> </macro>
>
> I mean, this tags should have only this meaning when used inside the
> <macro> tag, and otherwise have their normal meaning.
>
> I worked out a system using 'perl' & 'redirectors'. Later I have
> looked at 'grid.wml' and I discovered Ralph has used the same
> approach as me.
>
> I just wonder if somebody has thought of a better, and simpler method
> to do this. I thought of something like:
>
> <define-container macro>
> <preserve __inside>
> <set-var __inside="macro">
> %body
> <restore __inside>
> </define-container>
>
> <define-container title>
> <when <eq <get-var __inside> macro>>
> (...something...)
> </when>
> </define>
</define-container>
^^^^^^^^^^
> But this does not work as I should have expected.
The <eq> tag is for arithmetic comparison, use <string-eq> here.
Anyway could you explain what you expect and what result you obtain?
--
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