#set ($invokeOnLoad = "")
#foreach ($script in $item.onLoadScripts)
  #if ($language.isClientScript($script))
    #set ($typeParam = ${language.getParam("type", $script.type)})
    #set ($srcParam = ${language.getParam("src", $script.src)})
    <script $typeParam $srcParam>
        $script.content
    </script>
    #set ($invokeOnLoad = "${invokeOnLoad} ${script.invokeFunction};")
  #elseif ($language.isValidScript($script))
    $language.asFtlScript($script)
  #end
#end
#set ($invokeOnSubmit = "")
#foreach ($script in $item.onSubmitScripts)
    #set ($typeParam = ${language.getParam("type", $script.type)})
    #set ($srcParam = ${language.getParam("src", $script.src)})
    <script $typeParam $srcParam>
        $script.content
    </script>
    #set ($invokeOnLoad = "${invokeOnLoad} ${script.invokeFunction};")
#end
## TODO List<FBValidation> validations = form.getFormValidations();
## TODO Map<String, InputData> inputs = form.getInputs();
## TODO Map<String, OutputData> outputs = form.getOutputs();
#set( $onSubmitParam = ${language.getParam("onsubmit", $invokeOnSubmit)})
#set($onLoadParam = ${language.getParam("onload", $invokeOnLoad)})
#set($nameParam = ${language.getParam("id", $item.name)})
#set($actionParam = ${language.getParam("action", $item.action)})
#set($methodParam = ${language.getParam("method", $item.method)})
#set($enctypeParam = ${language.getParam("enctype", $item.enctype)})

<xforms:model xmlns:xforms="http://www.w3.org/2002/01/xforms">
  <xforms:submitInfo #if($enctypeParam)$enctypeParam#end#if($actionParam)$actionParam#end#if($methodParam)$methodParam#end $nameParam xmlns:xforms="http://www.w3.org/2002/01/xforms"/>
</xforms:model>

<!-- taskId: $item.taskId -->
#foreach ($subItem in $item.formItems)
  ${language.translateItem($subItem)}
#end
