add check for templateName in base renderer

this is so you can override a template name to be called, like when
tabular nests under table (see docbook class and template).