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

Nested tags



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>

But this does not work as I should have expected.

-- 
Saudos:
><ose        xmanoel@bigfoot.com   (Vigo/Galicia/Espaņa)
         http://pagina.de/xmanoel/
         http://w3.to/mikkeli/

04/10	Paul McCartney announces that he's quitting the Beatles, 1970
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com