weird, I write two paragraph:

For this:
<def tag="s1">
<div param="content" class="a1" merge-attrs>
</div>
</def>
<s1 class="s1">
<content: class="s2">very
</content:>
</s1>
It produces
<div class="a1 s1 content s2">very
</div>

It lost one paragraph, compare to my original post:
It seems hobo have different handling for internal tag(html/head/div) etc
and defined tag:
you see, for internal tag, the one even very outside <s1 class="s1"> will
passed into the div and merge-attrs,
but for defined tag, the <s1 class="s1"> doesn't have effect,
I must say it's very subtle.
besides, when param and merge-attrs, merge-params etc all apear on the same
tag, what's the correct evaluation order?
(and It seems param means doesn't replace the whole param placeholder, it
will evalute the param tag's and putting things
into its body: this one, <div param="content" class="a1" merge-attrs> getts
evaluated and then be replaced by param
<def tag="s1">
<div param="content" class="a1" merge-attrs>
</div>
</def>
<s1 class="s1">
<content: class="s2">very
</content:>
</s1>
It produces
<div class="a1 s1 content s2">very
</div>

I've tested this:
For this:
<% def foo(s)
puts s
s
end
%>

<def tag="s1">
<div merge-attrs a3="#{puts 'a3'}" a4="#{puts 'a4'}">
</div>
</def>
<s1 a1="#{puts 'a1'}" a2="#{puts 'a2'}" />

It outputs
a1
a2
a3
a4
in console(generating html is

<div a1="" a2="" a3="" a4="">
</div>of course no interesting).


On Thu, Jul 8, 2010 at 5:36 PM, Tom Locke <[email protected]> wrote:

> > no, the source code and produces result is just like I type,
> > I just copy and paste.
>
> OK. What is it you are confused about?
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<hobousers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.
>
>


-- 
http://hi.baidu.com/femto

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to