Finally (so that all potential calls have been processed) delete the named template.
Why would anyone want this? Why write calls to nothing templates?
I have a template override mechanism so at build time I do not know if a named template is 'empty' or not. It would be really nice to have them removed during compression to save a few bytes of network transfer.
This is maybe a bit weird but bear with me. It involves an extension of your unused template remover.
If a named template is empty (i.e. contains no node children) then remove the named template and all calls to it.
Scenario
A template 'caller' contains the instruction:
AND the template named 'callee' is empty:
xsl:call-template
element node.Why would anyone want this? Why write calls to nothing templates?
I have a template override mechanism so at build time I do not know if a named template is 'empty' or not. It would be really nice to have them removed during compression to save a few bytes of network transfer.