My XSLT solution works on Firefox, not in IE

Discussion in 'XML' started by Peter Laman, Apr 10, 2008.

  1. Peter Laman

    Peter Laman Guest

    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?
     
    Peter Laman, Apr 10, 2008
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Apr 10, 2008
    #2
    1. Advertising

  3. Peter Laman

    pr Guest

    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.
     
    pr, Apr 10, 2008
    #3
  4. Peter Laman

    Peter Laman Guest

    On 10 apr, 14:05, pr <> 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.
     
    Peter Laman, Apr 11, 2008
    #4
  5. Peter Laman

    Peter Laman Guest

    On 10 apr, 14:05, pr <> 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.
     
    Peter Laman, Apr 11, 2008
    #5
  6. Peter Laman

    pr Guest

    Peter Laman wrote:
    > On 10 apr, 14:05, pr <> 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.
     
    pr, Apr 11, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Blickstein
    Replies:
    14
    Views:
    6,448
    Harrie
    Oct 16, 2005
  2. F. GEIGER
    Replies:
    3
    Views:
    815
    F. GEIGER
    Aug 6, 2004
  3. =?Utf-8?B?Y2FzaGRlc2ttYWM=?=

    Solution file not in the solution folder

    =?Utf-8?B?Y2FzaGRlc2ttYWM=?=, Sep 12, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,156
    Laurent Bugnion
    Sep 12, 2006
  4. Robert Mark Bram
    Replies:
    4
    Views:
    796
    Robert Mark Bram
    Feb 13, 2008
  5. Alexander Burger

    getMethod() works and works not

    Alexander Burger, Nov 27, 2010, in forum: Java
    Replies:
    25
    Views:
    1,853
    Alexander Burger
    Nov 29, 2010
Loading...

Share This Page