ricksbrown / xslmin

An XSLT minifier
4 stars 0 forks source link

Enhancement Request: handling empty named templates #10

Open ghost opened 9 years ago

ghost commented 9 years ago

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

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.