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

problem undrstanding cotainers



Hi,
	I have defined multiple containers in my code which have the same set
of attributes. My requirements are such that I have to include one
container in another and pass the attributes of the top-level container
to the nested container. The problem is that the values of the
attributes seem to be lost when they get to the second container.

	If I have different attribute names for the containers, then the
example works fine. I'd appreciate any explanations for this phenomenon
and suggestions for alternate ways of accomplishing the task.

Here is the example:

Definition:
-----------

<define-container top>
<preserve attr>
<set-var %attributes>

  <child attr=<get-var attr>>
  %body
  </child>

<restore attr>
</define-container>


<define-container child>
<preserve attr>
<set-var %attributes>

Hello <get-var attr>,
Here is your body:
%body

<restore attr>
</define-container>

Usage:
-----

<top attr="user">
This is a test body
</top>

Output:
------

Hello ,
Here is your body:
This is a test body


Thanks,
Krishna
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com