Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > My XSLT solution works on Firefox, not in IE

Reply
Thread Tools

My XSLT solution works on Firefox, not in IE

 
 
Peter Laman
Guest
Posts: n/a
 
      04-10-2008
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.&#xA;Token:
%&quot;&#xA;ORDER&#xA;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?
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      04-10-2008
Peter Laman wrote:

> 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/?

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
pr
Guest
Posts: n/a
 
      04-10-2008
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.
 
Reply With Quote
 
Peter Laman
Guest
Posts: n/a
 
      04-11-2008
On 10 apr, 14:05, pr <p...@porl.globalnet.co.uk> wrote:
> 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.
 
Reply With Quote
 
Peter Laman
Guest
Posts: n/a
 
      04-11-2008
On 10 apr, 14:05, pr <p...@porl.globalnet.co.uk> wrote:
> 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.
 
Reply With Quote
 
pr
Guest
Posts: n/a
 
      04-11-2008
Peter Laman wrote:
> On 10 apr, 14:05, pr <p...@porl.globalnet.co.uk> wrote:
>> Peter Laman wrote:
>>> <?xml version="1.0"?>
>>> <?xml-stylesheet type="text/xsl" href="http://notepeter/pow/
>>> protecs.dll/doc?ref=Exception.xsl&fld=tpl"?>

>>
>> 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.


You're right. There's a bug <URL:
https://bugzilla.mozilla.org/show_bug.cgi?id=286132>, which, happily, is
fixed in version 3.0.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT rendering in Firefox - works from Apache, but not from WAS Robert Mark Bram XML 4 02-13-2008 02:19 AM
Solution file not in the solution folder =?Utf-8?B?Y2FzaGRlc2ttYWM=?= ASP .Net 2 09-12-2006 11:04 AM
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
[py2exe.i18n] English works, German works, but not French. What do I miss? F. GEIGER Python 3 08-06-2004 10:01 AM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57