Anyway, I'm wondering about the first sentence in this section:
http://bit.ly/dqBgUR
"""The following example is output with NOT <div class="foo">foo</div>
like <div>foo</div> because LibXML cannot find class attribute in
<div>."""
I think this should be:
"""The following example is NOT output as <div class="foo">foo</div>
but instead as <div>foo</div> because LibXML cannot find class
attribute in <div>."""
What do the English experts in the group think?
Indeed, greetings and welcome!
I was comparing Template::Semantic with my DOMTemplate, and the biggest
difference (for the API, internals are quite a bit better for
Template::Semantic) is that my templates use 'set' which is similar to
'process'. The big difference is that 'set' modifies the document
in-place. So I have some code that I'll change from this:
my $tpl = DOMTemplate->new('tpl/accounting.html');
$tpl->set('.username' => $username);
$tpl->set('#item_name' => "Deposit for $username");
# ...
$self->display( $tpl->render );
to this:
my $tpl = Template::Semantic->new('tpl/accounting.html');
$tpl = $tpl->process('.username' => $username);
$tpl = $tpl->process('#item_name' => "Deposit for $username");
# ...
$self->display( $tpl->as_string );
after fixing up my template a bit to be more parseable, of course. So
the question is -- any chance of getting a ->set that does ->process in
place for Template::Semantic? :)
The table-looping mechanism is different too, but I like how
Template::Semantic does it. In DOMTemplate I have a fill_rows method
that is more specific to tables, so less useful overall.
Good stuff! :)
--Brock
> I think this should be:
>
> """The following example is NOT output as <div class="foo">foo</div>
> but instead as <div>foo</div> because LibXML cannot find class
> attribute in <div>."""
>
> What do the English experts in the group think?
I think that you are an expert from me ;)
committed it.
http://github.com/tomi-ru/Template-Semantic/commit/4874be595cae972e305f696f808478fa64f6f172