On macOS Sierra using lxml 4.2.1, the stereotype templates do not seem to be applied correctly.
Furthermore, XSLT parsers are not generally very efficient on large srcML documents.
In order to fix the incorrect output and improve efficiency, recommend using srcml or libsrcml.
For immediate time, srcml would be best to use first until Python bindings are finalized.