Vincent Massol wrote:
On Feb 23, 2009, at 9:22 AM, Marius Dumitru Florea
wrote:
[snip]
I'm
surprised. Without knowing too much about how macros are
executed, I
fill it's natural that if we support nested macros then the inner
macros
should be executed first so that the outer macros can use the output
for
their own purpose.
Here's how it works:
* There's no notion of nested macros. Each macro does whatever it
wants with its content. Some examples:
- The HTML macro considers it has HTML content and does 3 things:
- call the HTML cleaner on its content to make it valid XHTML
and thus valid XML
- use an XML parser to parse the content
- for each XML element, call the wiki syntax parser on it (if
wiki=true which is the default)
- The velocity macro calls velocity on its content
- The code macro doesn't call any wiki parser on its content even
if it contains {{...}} symbols
* The macro execution order is about top level macros present in the
page and finding which ones to execute first. This works recursively
so that macros can generate other macros (such as the {{include}}
macro for ex - it has the a high priority so that it's executed first).
* Thus as you can see it's the top level macro that controls what it
does and is executed *first*.
Hope it's more clear and hope it's intuitive enough once you
understand it.
Yes, it's clear now. Thanks a lot for the explanations.
Marius
Thanks
-Vincent
[snip]