birdFEEDER Posted September 26, 2007 Share Posted September 26, 2007 Hello All,So, I was following this tutorial (http://www.w3schools.com/xsl/xsl_transformation.asp) and things were working very nicely. That is until I changed the link within <?xml-stylesheet> to point to a remote URL.So my simple question is this: is it allowable to use an absolute remote URL as the value of the href?To be clear, when I put this in my XML document, it works as desired:<?xml-stylesheet type="text/xsl" href="local_file.xsl"?>however, if I put my xsl file on another server (read: different domain), this doesn't work:<?xml-stylesheet type="text/xsl" href="http://www.another-domain.com/remote_file.xsl"?>So are we restricted to our local domain only?Thanks in advance for any/all help... Link to comment Share on other sites More sharing options...
boen_robot Posted September 26, 2007 Share Posted September 26, 2007 I'm afarid so. It's the same case with all languages used on the client side (notably JavaScript) with (X)HTML being the big exclusion. Link to comment Share on other sites More sharing options...
birdFEEDER Posted September 26, 2007 Author Share Posted September 26, 2007 Argh, that's what I was afraid of. :)I was lead to believe otherwise because w3.org says that the attributes of xml-stylesheet follow that of HTML's <link> attributes.Style Sheets can be associated with an XML[xml10] document by using a processing instruction whose target is xml-stylesheet. This processing instruction follows the behaviour of the HTML 4.0 <LINK REL="stylesheet">With that I assumed that it would be possible. All browsers are client side, when we link an <img src="http://some-remote-site/img.png"> this is allowable and client-side.Oh well, thanks for the quick reply, sorry to hear about this limitation. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.