Reputation: 536
I'm new to all of this, and I've been searching like hell, and can't find any guide that assumes little prior knowledge. So if you could keep answers as simple as possible, that would be great for us newbies :)
I have a document, xml.xml, that I would like to transform using another file called xslt.xsl
I've used the W3schools tryit editor to get the code for both files.
Now how do I get them to work together on my computer?
I've tried adding
<?xml-stylesheet type='text/xsl" href="http://www.dansitrepairs.com/XSLT.xsl"?>
to the second line of my xml file, but it doesn't work.
I've tried linking it in Dreamweaver and msxsl too. Clearly I must have ignored something important, because it shouldn't be this hard (I don't think)
Thanks
Added
As outilined in the comments, it was partly due to a typo in the code I provided, namely type='text/xsl" should be double quoted.
However, it only works when both files are local. When the xsl reference is on a server, I get this instead of what I want:
Added #2
It probably is a cross-origin policy implemented on your browser. It should work when both files are on a server on the same domain.
This was the other problem
Upvotes: 2
Views: 238
Reputation: 3237
It probably is a cross-origin policy implemented on your browser. It should work when both files are on a server on the same domain.
Upvotes: 2