maybe there are better ways to do this, but a simple approach is to parse/evaluate the contents of the custom variables.
set custom variables to attribute value pairs
user < include src= ... custom_variables=\@custom_variables@>
and do e.g. an "array set" in the included tcl script