<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hello,<br>
<br>
I took some time to discover why it was not possible to access a child
content from within an element :)<br>
<br>
The instance variable @_children should have been declared as a class
variable @@_children. Otherwise you will lose what you have filled in
after calling the method add_child in
raw/lib/raw/compiler/filter/elements/element.rb.<br>
<br>
Also, i'm a bit confused about how to use it.<br>
<br>
If you write something like,<br>
<br>
&lt;Page&gt;<br>
&lt;Box id="mybox"&gt;<br>
&nbsp; Jack<br>
&lt;/Box&gt;<br>
&lt;/Page&gt;<br>
<br>
and you declare a class Box<br>
<br>
Class Page<br>
Class Box &lt; Raw::Element<br>
&nbsp; %{<br>
&nbsp;&nbsp;&nbsp; &lt;div id="mylayout"&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp; Oh Jack ...<br>
&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>
&nbsp; }<br>
end<br>
end<br>
<br>
the layout </tt><tt>mylayout </tt><tt>of the class Box&nbsp; will be
completely ignored if you call the child "mybox" directly<br>
<br>
def render<br>
&nbsp; #{content :mybox}<br>
end<br>
<br>
otherwise the layout will be used when you access the whole page like
that:<br>
<br>
def render<br>
&nbsp; #{content}<br>
end<br>
<br>
That could be really confusing for anyone and it can be also hard to
decide where to declare css layouts for an element in the class, the
render or the htmlx file. :(<br>
<br>
Jj</tt><br>
<div class="moz-signature">-- <br>
<div class="moz-signature">
<meta content="text/html;" http-equiv="Content-Type">
<pre class="moz-signature" cols="72">
            |\      _,,,---,,_
      ZZZzz /,`.-'`'    -.  ;-;;,_
           |,4-  ) )-,_. ,\ (  `'-'
          '---''(_/--'  `-'\_)

<big><font face="Comics">
</font></big></pre>
</div>
</div>
</body>
</html>