My suggestion: if it ain't broke, don't fix it.
Of course if you have some spare time and want to mess about with the identity template, by all means go ahead. But pretty much everything you said in that last post doesn't apply. For example:
if the program realizes the parent node it is trying to match doesn't match with any of the templates
The identity program's templates match every single node. And:
the loop should not even go inside <a>. It should just copy <a>
Copying an <a> element also involves copying its children (what you call "going inside"). The recursive template does this automatically.
But as I said, messing about with that template could be a useful learning experience.