XML & NN7

A

Alan Whitener

Hi!

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


TIA
 
P

Peter C. Chapin

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
 
M

Mark Preston

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

Julian F. Reschke

Mark Preston said:
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?
 
C

C. M. Sperberg-McQueen

Mark Preston said:
....
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
 
A

Alan J. Flavell

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
 
C

C. M. Sperberg-McQueen

Alan J. Flavell said:
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
 

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
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top