How can i include more than one template in Freemarker configuration file using Smooks?
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd">
<params>
<param name="stream.filter.type">SAX</param>
<param name="default.serialization.on">false</param>
</params>
<ftl:freemarker applyOnElement="Response">
<ftl:template>template1.ftl</ftl:template>
<ftl:template>template2.ftl</ftl:template>
</ftl:freemarker>
This doesnt seem to work. Throws an error at the second template line
If you look at example you will see that each ftl:template
tag should be inside ftl:freemarker
tag. in your case:
<ftl:freemarker applyOnElement="Response">
<ftl:template>template1.ftl</ftl:template>
</ftl:freemarker>
<ftl:freemarker applyOnElement="Response">
<ftl:template>template2.ftl</ftl:template>
</ftl:freemarker>
来源:https://stackoverflow.com/questions/49118454/freemarker-include-multiple-templates-inside-config-file