The regex matches ".xsl" anywhere in the path of the visited file, not just at the end of its name, so for example, if I visit ~/projects/bdsyslog.xsl/js/bdsyslog.js xsl-mode will be used instead of javascript-mode. Reproducible: Always
I'm attaching a patch.
Created attachment 291437 [details, diff] Patches the regexes used in auto-mode-alist.
Fixed, without revbump. I've also replaced the append by an add-to-list (otherwise the list will become longer each time site-gentoo.el is reloaded). Thank you for reporting this bug.