{
import("Part1.d");
XMLNode toXML()
{
//...
}
}
Not quite as tiny as what you request, but close enough in my opinion
and they allow better reuse. Of course you probably would give the
moduals better logical and reusable names.

Actually, the code above dosen't compile: "parenthesized
TemplateParameterList expected following TemplateIdentifier".
So you have to write:
template Part1()
{
void process()
{
XMLNode node = this.toXML();
//...
}
};
Is there any reason the parenthesis are mandatory for no-arguments
templates?
I propose to remove this restriction to allow cleaner syntax for
templates that dosen't recieve any parameters.