Sunday, October 20, 2002, 4:15:22 AM, Derick Fernando wrote: > Acutally yes, Granted my templates are simple, I only use logic between > tags: > > Velocity: > #foreach( $bozo in $bozos ) > <td>$bozo.name</td> > #end
(Even in this case, it is not valid XHTML. <tr> does not allow text around <td>s.) > Freemarker: > <foreach bozo in bozos> > <td>${bozo.name}<td> > </foreach> > > Simple reader class removes #lines and validates templates recursively (they > are xml). Aha. So your templates are *not* valid XHTML-s, but you preprocess them before validation. You can do exactly the same with FreeMarker templates. -- Daniel > Derick. > ----- Original Message ----- > From: "Daniel Dekany" <[EMAIL PROTECTED]> > To: "Velocity Users List" <[EMAIL PROTECTED]> > Sent: Saturday, October 19, 2002 5:32 PM > Subject: Re: Freemarker Syntax (was: a lot of junk) >> Sunday, October 20, 2002, 12:20:08 AM, Derick Fernando wrote: >> >> > Ewww, that is horrible, there goes validation, and readability. This > crap is >> > what all the fuss is about? I wouldn't use it with any of my XML or > HTML. >> > #set for example stands out against any other markup. >> > >> > Derick. >> >> Man... I hope you write these totally stupid things, because you are >> *very* angry. You can't tell it seriously, that you look at that 10 >> lines of FreeMarker, and you know that FM is a "crap". Also, "there >> goes validation"... you used to validate your *templates* against some >> DTD??? Don't answer... >> >> > ----- Original Message ----- >> > From: "Daniel Dekany" <[EMAIL PROTECTED]> >> > To: "Velocity Users List" <[EMAIL PROTECTED]> >> > Sent: Saturday, October 19, 2002 12:15 PM >> > Subject: Re: Freemarker Syntax (was: a lot of junk) >> >> >> >> Saturday, October 19, 2002, 8:28:46 PM, Jeff Schnitzer wrote: >> >> >> >> > On 10/19/02 9:43 AM, "Daniel Dekany" <[EMAIL PROTECTED]> wrote: >> >> >> >> >> >> <if foo> >> >> >> a >> >> >> <elseif bar> >> >> >> b >> >> >> <elseif baaz> >> >> >> c >> >> >> <else> >> >> >> d >> >> >> </if> >> >> > >> >> > Ugh. This is probably the #2 reason I will avoid freemarker: >> >> > It looks waaay too much like the surrounding XML-ish content. >> >> >> >> Well, I guess the original intent was that the designer feels that he >> >> just works with an extended HTML... so, it intentionally looks like >> >> the surrounding XML or HTML. >> >> >> >> > The worst of it is not when you are filling in big textual >> >> > areas of XML elements, but attributes. JSTL has the same >> >> > awful problem. >> >> > >> >> > <table> >> >> > <tr> >> >> > <td class="<if foo>a<elseif bar>b<else>c</if>"> >> >> > </td> >> >> > </tr> >> >> > </table> >> >> > >> >> > That just creeps me out, and XML compliance is out the window. >> >> >> >> XML compliance? If you say that you want the *template* to be >> >> well-formed XML, them it is out the window. If you want produce XML >> >> with FreeMarker templates, then that's not a problem. >> >> >> >> What would be a syntax what you would prefer? (How would your example >> >> looks with that syntax?) >> >> >> >> >> >> -- >> >> To unsubscribe, e-mail: >> > <mailto:velocity-user-unsubscribe@;jakarta.apache.org> >> >> For additional commands, e-mail: >> > <mailto:velocity-user-help@;jakarta.apache.org> >> >> >> >> >> > -- >> > To unsubscribe, e-mail: > <mailto:velocity-user-unsubscribe@;jakarta.apache.org> >> > For additional commands, e-mail: > <mailto:velocity-user-help@;jakarta.apache.org> >> >> >> -- >> To unsubscribe, e-mail: > <mailto:velocity-user-unsubscribe@;jakarta.apache.org> >> For additional commands, e-mail: > <mailto:velocity-user-help@;jakarta.apache.org> >> > -- > To unsubscribe, e-mail: <mailto:velocity-user-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:velocity-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:velocity-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:velocity-user-help@;jakarta.apache.org>