Re: problem calling macro with < />
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Friday, June 8, 2012, 7:19:58 PM, freemarkeruserirving wrote: > In my freemarker xml file, I have this line: > > <header name="id" value="<@getId />" /> > > The macro is: > > <#macro getId> > 20 > </#macro> > > But the above macro is never evaluated, so the above code doesn't become: > > <header name="id" value="20" /> > > Any idea? The problem is that you have <@getId /> instead of <@getId />. And why do you have "-s instead of "-s? FreeMarker isn't XML; just type them as you want them in the output. Also, getId probably should be a #function, not a #macro. > Thanks. -- Best regards, Daniel Dekany ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/