[ZPT] [Weakness] "metal:fill-slot" and "metal:use-macro" not together
Evan Simpson
evan@zope.com
Wed, 26 Sep 2001 18:14:00 -0400
Dieter Maurer wrote:
> Currently, ZPT refuse to have
> "metal:fill-slot" and "metal:use-macro" together on one element.
>
> This is unfortunate, because it is quite natural to
> fill a slot with a macro call
I agree. I'm trying to straighten out several METAL implementation
details over the next week, and this is one of them.
It is my intention that METAL will work like this:
During parsing:
1. 'define-macro' and 'use-macro' are always valid, subject to #3.
2. 'fill-slot' is only valid in a 'use-macro', and 'define-slot' is only
valid in a 'define-macro'.
3. Inside a 'use-macro', all METAL statements other than 'fill-slot' are
ignored.
As a consequence, macro definitions can be nested within each other,
within slot definitions, and within filled slots. Macro *uses* can only
be nested by using one in the filled slot of another, since the rest of
a macro use body is placeholder text.
During source macro expansion:
1. METAL statements in the page are left unchanged. METAL statements in
expanded macros are stripped out.
This means that if you use a macro that has embedded macro definitions,
or that uses other macros itself, none of that METAL markup will appear
in the expanded macro text.
Cheers,
Evan