XML & NN7

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Whitener

    XML & NN7

    Hi!

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


    TIA


  • Peter C. Chapin

    #2
    Re: XML & NN7


    In article <cuvSa.13011$Mc .947147@newsrea d1.prod.itd.ear thlink.net>,
    arwhitener@eart hlink.net says...
    [color=blue]
    > I can't get a simple XML document to display in Netscape Navigator 7. Am I
    > doing something wrong?[/color]

    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

    Comment

    • Mark Preston

      #3
      Re: XML &amp; NN7

      On Sun, 20 Jul 2003 11:59:04 GMT, "Alan Whitener"
      <arwhitener@ear thlink.net> wrote:
      [color=blue]
      >I can't get a simple XML document to display in Netscape Navigator 7. Am I
      >doing something wrong?
      >[/color]
      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

      Comment

      • Julian F. Reschke

        #4
        Re: XML &amp; NN7

        "Mark Preston" <usenet@noemail address.co.uk> schrieb im Newsbeitrag
        news:sj7thvo8af 3mmkreb580auhqe thga8cvl7@4ax.c om...[color=blue]
        > On Tue, 22 Jul 2003 13:45:08 GMT, "Alan Whitener"
        > <arwhitener@ear thlink.net> wrote:
        >[color=green]
        > >Sounds right. It does just display the flat xml file. But I define a[/color][/color]
        XSL:[color=blue][color=green]
        > ><?xml version="1.0"?>
        > ><?xml-stylesheet type="text/xsl" href="index_gal lery01.xsl"?>
        > >It just doesn't use it, or so it seems. Does the file extension (xslt[/color][/color]
        vs.[color=blue][color=green]
        > >xsl) make any difference?
        > >[/color]
        > 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?[/color]

        Maybe #1 on http://www.mozilla.org/projects/xslt/faq.html?


        Comment

        • C. M. Sperberg-McQueen

          #5
          Re: XML &amp; NN7

          Mark Preston <usenet@noemail address.co.uk> writes:
          [color=blue]
          > On Tue, 22 Jul 2003 13:45:08 GMT, "Alan Whitener"
          > <arwhitener@ear thlink.net> wrote:
          >[color=green]
          > >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_gal lery01.xsl"?>
          > >It just doesn't use it, or so it seems. Does the file extension (xslt vs.
          > >xsl) make any difference?
          > >[/color][/color]
          ....[color=blue]
          > 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?[/color]

          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

          Comment

          • Alan J. Flavell

            #6
            Re: XML &amp; NN7

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

            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

            Comment

            • C. M. Sperberg-McQueen

              #7
              Re: XML &amp; NN7

              "Alan J. Flavell" <flavell@mail.c ern.ch> writes:
              [color=blue]
              > On Sat, Jul 25, C. M. Sperberg-McQueen inscribed on the eternal scroll:
              >[color=green]
              > > Yes. As has been mentioned, Mozilla is picky about MIME types.[/color]
              >
              > In general I would interpret that as a mandatory requirement of the
              > applicable HTTP RFC (currently 2616), rather than "pickyness" .[/color]

              Point taken. My word choice was off.

              -C. M. Sperberg-McQueen

              Comment

              Working...