You can split your template into 2 pieces and call "ns_adp_parse
-file filename" for each piece.
ReturnHeaders
ns_write [ns_adp_parse -file /path/to/top_half.template.adp]
ns_write "the long stuff here"
ns_write [ns_adp_parse -file /path/to/bottom_half.template.adp]