It seems a bit more painfull to write.. But it's ok Ludovic
Vincent Massol wrote: > Hi, > > Contrary to what is described here > http://dev.xwiki.org/xwiki/bin/view/Design/NewRenderingArchitecture#HA6IntroduceaVelocitymacro > > I'd like to propose instead to use a nested {xhtml} macro whenever > you want your velocity script to generate XHTML. > > So the example would be transformed into: > > {velocity}{xhtml} > <div> > <h1>Hello $customer.Name!</h1> > <table> > #foreach( $mud in $mudsOnSpecial ) > #if ( $customer.hasPurchased($mud) ) > <tr> > <td> > * [link>$flogger.getPromo( $mud )] > </td> > </tr> > #end > #end > </table> > </div> > {/xhtml}{/velocity} > > It seems to me much more logical to do it this way, especially since > we allow nested macros. > > Note1: that it'll work because the velocity macro supports wiki syntax > and {xhtml} is wiki syntax. > > Note2: This is not equivalent to writing {xhtml}{velocity}... since > the xhtml macro only accepts valid XHTML. This is valid though: > > {xhtml} > <div> > <a href="...">{somemacro/}</a> > </div> > {/xhtml} > > WDYT? Is it ok with you? > > Thanks > -Vincent > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > > -- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

