FreeMarker inline template (load from database) in Smooks not interpreted
===

All,

I try to load the FreeMarker template from database in the Smooks configuration file and use the build-ins INTERPRET to parse the string as template. However, the output is exactly the template I stored in the database. 

The following is part of the Smooks configuration file:
 -----------------------

....

	<resource-config selector="hs:TravelerProfile">
		<resource>org.milyn.delivery.DomModelCreator</resource>
	</resource-config>
	
  <!-- more stuff -->

	<db:executor executeOnElement="hs:TravelerProfile" datasource="StagingDS">
              <db:statement>select freeMarker_template from template_lookup where agencyid='111'; 
              </db:statement>
              <db:resultSet name="mytemplate" />
        </db:executor>

	<ftl:freemarker applyOnElementNS="www.travel.com" applyOnElement="TravelerProfile">
		 
		<ftl:template>
		< !--		
		<#assign templateSource = r"${mytemplate[0].freeMarker_template}">
		<#assign inlineTemplate = [templateSource, "myInlineTemplate"]?interpret>
		<@inlineTemplate/> 
		-- >
		</ftl:template>
	</ftl:freemarker>
.....

----------------------

<b>The template I stored in the database is like following:</b>

    <#ftl ns_prefixes={"D":"www.hhs.gov/travel"}>
    <?xml version="1.0" encoding="UTF-8"?>
    <po:PoHeadersInterfaceCollection xmlns:po="https://www.travel.com/xmlns/financial/po112007.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://www.travel.com/xmlns/financial/po112007.xsd">
      <po:PoHeadersInterface>
        <po:interfaceSourceCode>VendorName</po:interfaceSourceCode>
        <po:poLinesInterfaceCollection>
          <po:PoLinesInterface>
            <po:PoDistributionsInterfaceCollection>
              <po:PoDistributionsInterface>
                <po:destinationOrganizationId>${TravelerProfile.TravelerOfficeCode}
                </po:destinationOrganizationId>
              </po:PoDistributionsInterface>
            </po:PoDistributionsInterfaceCollection>
          </po:PoLinesInterface>
        </po:poLinesInterfaceCollection>
      </po:PoHeadersInterface>
    </po:PoHeadersInterfaceCollection>

====================================

For some reason, the output is exactly the above template itself. "${TravelerProfile.TravelerOfficeCode}" has not been evaluated! Please help!!! 

Thank you!!!

Agnes
