I'm grabbing some data with PHP from an online database. It spits out XML and the data is displayed inside a .php document. With some fancy CSS I can achieve most of want I need to, but looking at all the extra interesting things you can do with XSL I would much rather use it.
So I've got XML data inside a .php document that I want to style with xsl.
My problem comes in how to link the .xsl document with the .php. If I input:
<?xml-stylesheet type="text/xsl" href="special.xsl"?>
then I receive an error (unexpected string etc.).
I'm a PHP newbie so I am sure there is a way to have the file recognize the xsl sheet, but I have been unable to find any information that is clear to me how to do that. Any info I have discovered (some stuff about DomDocument) is just pieces and I end up not being able to figure out how to make it work.
Looking at similar issues on this topic, I have a hunch that I am going about this all wrong and that I am missing something even easier when pulling the data into the .php document.