XML & NN7

Discussion in 'XML' started by Alan Whitener, Jul 20, 2003.

  1. Hi!

    I can't get a simple XML document to display in Netscape Navigator 7. Am I
    doing something wrong?


    TIA
     
    Alan Whitener, Jul 20, 2003
    #1
    1. Advertising

  2. In article <cuvSa.13011$>,
    says...

    > I can't get a simple XML document to display in Netscape Navigator 7. Am I
    > doing something wrong?


    What MIME type is your web server providing for the XML file? I believe
    text/xml is appropriate (or is it application/xml?). I know that Mozilla
    is fussy about this matter. In some configurations of Apache, at least,
    there is no MIME type declared for *.xml files and the result is that
    Mozilla doesn't know they are XML and won't process them appropriately.
    I'm assuing NN is the same story.

    Peter
     
    Peter C. Chapin, Jul 20, 2003
    #2
    1. Advertising

  3. Alan Whitener

    Mark Preston Guest

    On Sun, 20 Jul 2003 11:59:04 GMT, "Alan Whitener"
    <> wrote:

    >I can't get a simple XML document to display in Netscape Navigator 7. Am I
    >doing something wrong?
    >

    Yes.

    Netscape 7 (ie. Mozilla) displays XML perfectly correctly - which
    means that you probably don't know what "perfectly correctly" means in
    this context

    It means the text nodes. And I bet that is what you see. What you
    probably _want_ to know is "why doesn't it look like it does on MSIE?"

    And the answer to that is that MSIE does _not_ display XML unformatted
    (which is what Netscape does) - it does it through an in-built XSLT
    script. Theirs, unless you provide your own.
    --
    Mark A. Preston, The Magpie's Nest, Lancashire, UK
    Website : www.magpiesnest.co.uk
     
    Mark Preston, Jul 20, 2003
    #3
  4. "Mark Preston" <> schrieb im Newsbeitrag
    news:...
    > On Tue, 22 Jul 2003 13:45:08 GMT, "Alan Whitener"
    > <> wrote:
    >
    > >Sounds right. It does just display the flat xml file. But I define a

    XSL:
    > ><?xml version="1.0"?>
    > ><?xml-stylesheet type="text/xsl" href="index_gallery01.xsl"?>
    > >It just doesn't use it, or so it seems. Does the file extension (xslt

    vs.
    > >xsl) make any difference?
    > >

    > Got to say, so far I have only used raw XML and CSS in Netscape and
    > have not yet tried the XSLT - but they do keep saying it works, and I
    > trust them that far at least.
    >
    > Have you tried submitting the XSL to the W3C validator to see if there
    > are any problems? Failing that - does it work locally on your own PC
    > and does the same stylesheet work when you run it through a processor
    > like Saxon or xsltproc?
    >
    > Anyone else have any ideas why an XSL wouldn't work in Netscape 7?


    Maybe #1 on http://www.mozilla.org/projects/xslt/faq.html?
     
    Julian F. Reschke, Jul 23, 2003
    #4
  5. Mark Preston <> writes:

    > On Tue, 22 Jul 2003 13:45:08 GMT, "Alan Whitener"
    > <> wrote:
    >
    > >Sounds right. It does just display the flat xml file. But I define a XSL:
    > ><?xml version="1.0"?>
    > ><?xml-stylesheet type="text/xsl" href="index_gallery01.xsl"?>
    > >It just doesn't use it, or so it seems. Does the file extension (xslt vs.
    > >xsl) make any difference?
    > >

    ....
    > Have you tried submitting the XSL to the W3C validator to see if there
    > are any problems? Failing that - does it work locally on your own PC
    > and does the same stylesheet work when you run it through a processor
    > like Saxon or xsltproc?
    >
    > Anyone else have any ideas why an XSL wouldn't work in Netscape 7?


    Yes. As has been mentioned, Mozilla is picky about MIME types.
    I assume that NN inherits this pickiness. If you're seeing the
    flat XML file, I would guess that one or more of the following is
    the case:

    (a) your XML is being served as text/plain (use View / Page Info
    to find out for sure)
    (b) your XSL is being served with a MIME type Mozilla doesn't like.
    If I recall correctly, application/xml and text/xml work fine, but
    if your server administrator looked too hard at the xml-stylesheet
    processing instruction and decided to serve XSL as text/xsl, Mozilla
    won't be happy. (At least, this is my diagnosis of a problem I
    encountered recently; once I changed from text/xsl to application/xml
    it all started working.)

    -C. M. Sperberg-McQueen
    World Wide Web Consortium
     
    C. M. Sperberg-McQueen, Jul 26, 2003
    #5
  6. On Sat, Jul 25, C. M. Sperberg-McQueen inscribed on the eternal scroll:

    > Yes. As has been mentioned, Mozilla is picky about MIME types.


    In general I would interpret that as a mandatory requirement of the
    applicable HTTP RFC (currently 2616), rather than "pickyness". "If
    and only if" the server does not provide a content-type, is the client
    software permitted to guess. (But the server "should" always provide
    an appropriate content-type.)

    If the server presents a content-type that the client considers
    inappropriate, then it could be permissible to consult with the user
    about an error fixup, but it's impermissible, according to RFC2616,
    for the software to silently DWIM. Mozilla is behaving correctly,
    according to this general principle.

    Any client software which fails to conform with this requirement
    represents an unnecessary extra security exposure, and is in violation
    of the interworking specification, as I interpret it. There are
    several demonstration pages around which demonstrate this
    vulnerability in IE.

    (That's the general position. I'm not arguing with what you said
    about the specifics of text/xsl, OK?).

    best regards
     
    Alan J. Flavell, Jul 26, 2003
    #6
  7. "Alan J. Flavell" <> writes:

    > On Sat, Jul 25, C. M. Sperberg-McQueen inscribed on the eternal scroll:
    >
    > > Yes. As has been mentioned, Mozilla is picky about MIME types.

    >
    > In general I would interpret that as a mandatory requirement of the
    > applicable HTTP RFC (currently 2616), rather than "pickyness".


    Point taken. My word choice was off.

    -C. M. Sperberg-McQueen
     
    C. M. Sperberg-McQueen, Jul 29, 2003
    #7
    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. Stephen T. Fox

    javascript in IE6 v NN7.1 & Firefox

    Stephen T. Fox, Jun 11, 2004, in forum: HTML
    Replies:
    1
    Views:
    1,028
  2. Phil N

    innerHTML / IE6 /NN7

    Phil N, Jul 13, 2003, in forum: Javascript
    Replies:
    5
    Views:
    272
    Phil N
    Jul 14, 2003
  3. that guy over there
    Replies:
    2
    Views:
    91
    that guy over there
    Aug 11, 2003
  4. Andy Fish

    problem with style.display="none" in NN7

    Andy Fish, Aug 11, 2003, in forum: Javascript
    Replies:
    7
    Views:
    108
    gavin long
    Aug 15, 2003
  5. Carl

    problem with window.print (NN7)

    Carl, Sep 12, 2003, in forum: Javascript
    Replies:
    0
    Views:
    87
Loading...

Share This Page