My XSLT solution works on Firefox, not in IE

Peter Laman

Usenet Archive
Joined
Apr 10, 2008
Messages
15
Reaction score
0
Hello,

A webserver I'm writing is accessed both by "browser clients" for interactive use and by "program clients" that request XML formatted data. To streamline error handling, the server always returns errors in XML format, linked to an XSLT stylesheet for browser display. This way both browsers and programs can be served error messages the same way.

One of these error content is as follows:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl"?> <powxml generator="Protecs On The Web" fileversion="4.0" powurl="http://notepeter/pow/protecs.dll"> <exception message="Invalid use of keyword.
Token:
%&quot;
ORDER
Line Number: 3Aanvullende informatie over BDE
fout: "
dbierr="$2A12 (Invalid use of keyword.)"
bdetable="N.V.T."
processid="0x000005B0 (Decimaal: 1456)"/>
</powxml>

Firefox handles this perfectly, the linked stylesheet is used to render the data in XHTML format. However, Internet Explorer 6.0 simply displays the raw XML tree. Further investigation on the server side shows that it doesn't even request the stylesheet. However if I request the stylesheet by entering its URL (http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl) on the address bar, it shows up. So the URL is accessible. The question is: why doesn't IE even request the stylesheet?
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
Peter said:
One of these error content is as follows:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl"?>
Firefox handles this perfectly, the linked stylesheet is used to render the data in XHTML format. However, Internet Explorer 6.0 simply displays the raw XML tree. Further investigation on the server side shows that it doesn't even request the stylesheet. However if I request the stylesheet by entering its URL (http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl) on the address bar, it shows up. So the URL is accessible. The question is: why doesn't IE even request the stylesheet?

Is the XML document also served from http://notepeter/?
 

pr

Usenet Archive
Joined
Sep 27, 2000
Messages
200
Reaction score
0
Peter Laman wrote:
[...]
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl"?> [...] Firefox handles this perfectly, the linked stylesheet is used to render the data in XHTML format. However, Internet Explorer 6.0 simply displays the raw XML tree. Further investigation on the server side shows that it doesn't even request the stylesheet.
[...]

I believe IE is objecting to the ampersand in the URL. Although XML 1.0 permits ampersands to appear in processing instructions, <URL:
http://www.w3.org/TR/xml-stylesheet> says you must use '&amp;' in that particular processing instruction.
 

Peter Laman

Usenet Archive
Joined
Apr 10, 2008
Messages
15
Reaction score
0
Peter Laman wrote:

[...]
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl"?> [...] Firefox handles this perfectly, the linked stylesheet is used to render the data in XHTML format. However, Internet Explorer 6.0 simply displays the raw XML tree. Further investigation on the server side shows that it doesn't even request the stylesheet.

[...]

I believe IE is objecting to the ampersand in the URL. Although XML 1.0 permits ampersands to appear in processing instructions, <URL:http://www.w3.org/TR/xml-stylesheet> says you must use '&amp;' in that particular processing instruction.

Thanks. That fixed it for IE,... But Firefox doesn't accept it. I've changed the URI needed to get the stylesheet in order to make it acceptable by all browsers and it works now.
 

Peter Laman

Usenet Archive
Joined
Apr 10, 2008
Messages
15
Reaction score
0
Peter Laman wrote:

[...]
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://notepeter/pow/ protecs.dll/doc?ref=Exception.xsl&fld=tpl"?> [...] Firefox handles this perfectly, the linked stylesheet is used to render the data in XHTML format. However, Internet Explorer 6.0 simply displays the raw XML tree. Further investigation on the server side shows that it doesn't even request the stylesheet.

[...]

I believe IE is objecting to the ampersand in the URL. Although XML 1.0 permits ampersands to appear in processing instructions, <URL:http://www.w3.org/TR/xml-stylesheet> says you must use '&amp;' in that particular processing instruction.

Thanks, that fixes it for IE... Unfortenately, Firefox doesn't swallow the '&amp;', so I've simply changed the URL needed to get the stylesheet to one that packs all info in a single field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top