olimits7 olimits7 - 4 months ago 15
CSS Question

Error loading stylesheet: An unknown error has occurred (805303f4)?

I'm trying to generate a shipping label from an XML response file I received from the shipper's API, however, when I try to access the XML via my browser I get this Error loading stylesheet: An unknown error has occurred (805303f4) error.

XML Response File:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<?xml-stylesheet href="http://shippers-website.com/label.xsl" type="text/xsl"?>

XSL File:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">

I then tried to open this XML file locally on my PC and I saved a local copy of the XML and XSL files, but when I did this I would get this Error loading stylesheet: Parsing an XSLT stylesheet failed. error.

I then changed the XSL file namespace from http://www.w3.org/TR/WD-xsl to http://www.w3.org/1999/XSL/Transform and that seemed to work on my local XML copy; which is a good sign, however, I need this to work properly with the URL from my shipper's website that is listed in the XML file (e.g. http://shippers-website.com/label.xsl).

They tell me that this same XML type response file works for their other customers, so I'm not sure why it's not working for me.

Does anyone have an idea of why I'm getting this error when I call the XML file when it's pointing to my shipper's server XSL file (e.g. http://shippers-website.com/label.xsl)?

Thank you!


The namespace xmlns:xsl="http://www.w3.org/TR/WD-xsl" identifies an implementation of an early draft of XSLT 1.0 shipped by Microsoft in 1998 in IE4, if I remember right. It was obsolete within a year. The W3C spec published in 1999 differed substantially from the draft which Microsoft implemented (and indeed, the Microsoft product differed significantly from the early W3C drafts), and Microsoft quickly realised their mistake and scrambled to replace WD-xsl with a conformant implementation.

Because the WD-xsl language has so many differences from XSLT 1.0, changing the namespace to the XSLT 1.0 namespace is not usually enough to effect a successful conversion. At one time I believe Microsoft had a tool to assist with conversion but I doubt it is obtainable today after 18 years.

Indeed, documentation for WD-xsl is almost impossible to find nowadays (interesting that in the days of paper specs, it was much harder to bury things). I don't know whether current versions of IE still recognize it, but certainly no other browser does.

Incidentally, my DNS server cannot locate the domain name shippers-website.com.