[ic] Nested tags
Kevin Walsh
interchange-users@icdevgroup.org
Thu Feb 20 12:57:47 2003
Marc Brevoort [marc.brevoort@armazemdedados.com] wrote:
>
> It turns out that if I do
>
> [parsexml][posttourl url="[cgi url]" params="[cgi params]"][/parsexml]
>
> the outer tag blindly tries to parse all the xml that is in the literal
> string "[posttourl ........]" which of course doesn't contain any XML at
> all.
>
Add the following to your parsexml UserTag definition:
UserTag parsexml Interpolate 1
That would cause the body text to be interpolated for other tags
before passing the resulting text to your UserTag.
>
> I suppose the correct evaluation order could be forced
> with something like
>
> [parsexml xml="[posttourl url=".....]"]
>
> but the quotes are in the way. After over 200 IC server restarts, my
> brain is jelly and I'm overlooking the simplest things.
>
[parsexml xml="[posttourl url='.....']"]
>
> What if I would want to nest the tags even deeper? Both the tag
> [parsexml] and [posttourl] contain 'use' clauses, so they can't be used
> in a perl block with $Tag->parsexml/$Tag->posttourl.
>
It would depend upon your nesting method.
Interchange tags supply [if] and [loop] etc., so you could use those
and then jump into small [calc] blocks from within a [loop] iteration,
or whatever.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/