2009-11-04 02:15:54 UTC
Hi Guys,
I'm new to freemarker and I am running into problems.
I have a template as shown below but I am getting the error:
freemarker.core.ParseException: Encountered "</#foreach>" at line 32, column 1 in test.ftl.
Was expecting one of: ....
I can't see anything wrong with the template. Any ideas?
Thanks
Richard
TEMPLATE HERE:
<#ftl nsprefixes={
"aus":"urn:Aon:General:BusinessPack",
"ac":"urn:ACORD:PCS:xml:specification:schema:DRAFT2.0.0Phase3.1"
} />
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<!--
SECTION: CONTACTS
This part describes the contact details
-->
<b>Contact Details</b> <BR/>
<#list doc["aus:PolicyMessage/ac:Person[@ac:Id=/aus:PolicyMessage/aus:Organization[@ac:Id='Insured1']/ac:Contact/@ac:PartyReference]"] as ref >
<#foreach phonenum in ref["ac:BusinessPhoneNumber"] >
<#if phonenum["normalize-space(ac:PhoneTypeCode)"] = "ac:Phone">
<tr>
<td>Phone:</td>
<td>${phonenum["ac:PhoneNumber"]}</td>
</tr>
<#else>
<tr>
<td>${phonenum["normalize-space(ac:PhoneTypeCode)"]}</td>
<td>${phonenum["ac:PhoneNumber"]}</td>
</tr>
<#/if>
</#foreach>
</#list>
</BODY>
</HTML>