XML entity references are expanded by the XML parser (that is, replaced by their replacement text) before the XSLT processor gets to see them. The data model defining what XSLT sees does not include entities. If you want to manipulate XML at this physical level you need a lower-level tool than XSLT.
One trick that's sometimes used is to modify the entity replacement text to include element tags, which are then visible to the XSLT processor.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference