The examples at
http://en.wikipedia.org/wiki/XSLT
or
http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog
seem to be independent XML and XSLT files. Don't they have to be linked? Or do you somehow put them into a same file? Otherwise, how does one file know how to suck in data from the other file?
You can add this after the xml declaration
<?xml-stylesheet type="text/xsl" href="yourxsl.xsl"?>