On Sat, Sep 03, 2005 at 01:36:25AM +0900, itsme213 wrote:
> I'm looking for a template library that will allow me to define text
> templates (mostly html, at least initially) with embedded Ruby calls, with
> some specific needs / preferences:

erb is the accepted way to do this.

Frankly, though, I'm of the group that thinks code and templates should
not mix. (It's why I joined PageTemplate - I liked it so much, I took up
the project)

> - Be valid (x)html even with the embedded Ruby

Technically, you can *probably* do this with any templating system. How?
Just use comments.

<!--
  <% ruby code here %>
-->

I still stand by my statement that code doesn't belong in templates :D.

(And for the record: you can use either the comment-style above, or
HTML::Template syntax in PageTemplate)

> - Allow selected Ruby calls in the template to return full (nested) html
> structures (perhaps by that call itself dynamically using another template)

Most systems should have an include command.

> Any Suggestions? A search on RAA listed lots of candidates and I'm not sure
> where to start.