I can't really tell what you are trying to do so I can't correct your code but perhaps I can explain why it is obviously wrong. The expression
would only select elements like this:
that is elements whose content is equal to the value of their TemplateSet attribute. That would seem an unusual thing to want to do.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference