Jump to content

Remote URL in xml-stylesheet?


birdFEEDER
 Share

Recommended Posts

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...