$tree = $tree->guts unless $tmpl eq 'skel';
$tree->defmap(smap => \%args);
my $process = __PACKAGE__->can("process_$tmpl");
$process->($tree, %args) if $process;
$_->detach for $tree->look_down(static => $args{static} ? 'no' : 'yes');
$_->attr('static', undef) for $tree->look_down(sub {$_[0]->attr('static')});
$tree = $tree->guts unless $tmpl eq 'skel';
$tree->defmap(smap => \%args);
my $process = __PACKAGE__->can("process_$tmpl");
$process->($tree, %args) if $process;
$_->detach for $tree->look_down(static => $args{static} ? 'no' : 'yes');
$_->attr('static', undef) for $tree->look_down(sub {$_[0]->attr('static')});