Re: Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype
You are starting to send data (the echo statement) before setting the MIME-type header. If you put the header() statement first, you should fix the problem.
Note, though, that you may have some trouble with the MIME type in any case -- some user agents may be okay with "text/html", while others may demand "application/xml" (and others, notably IE, reject the notion of "application/xml" altogether on some sort of religious basis nobody has been able to make sense of).
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)