Michael Gratton wrote:
> 
> Matthew Thomas wrote:
>...
> > Please lose your fixation with Microsoft. This is nothing to do with
> > what some company `thinks' a plain XML file looks like;
>...
> I was trying to point out that you were (at least trivially) wrong
> when you argued that IE's behaviour is correct because it does "...
> what people want and expect, instead of what they don't want or
> expect".

That's not wrong. Computer programs are supposed to do what people want
and expect. That's what they're *for*. If they don't do what a majority
of their users want and expect, they're wrong.

(There are a few caveats with respect to disenfranchising future users
by current actions, but those caveats don't apply here.)

>...
> > That's exactly what View Source is for.
> 
> So what is view source for when viewing a text file?

The same thing as for HTML or XML: showing the unadulterated source of
the file. Mozilla currently doesn't do this, which is a major bug.

It just so happens that for text/plain there's *currently* no special
rendering in the browser, so the browser view and the source view are
exactly the same. However, Mozilla's text/plain rendering would be
considerably more useful if it did the same things that it does for
text/plain in e-mail messages -- coloring quoted text, highlighting
*bold* and /italics/, and linking URIs. This would be very useful when
reading text/plain e-zines, for example, since they often link to other
Web pages.

>                                                      What if a file
> containing XML or HTML markup is served as text/plain? Moz renders it
> as text and view source displays the same thing as the browser window.

At the moment, yes.

> <rant>
> The reason Moz applies style to HTML is because the style for HTML is
> well known.

No, the reason Mozilla applies style to HTML is because that is what
users expect. Mozilla 1.x applied style to HTML back in the days when
Mosaic and Cello and various other Web browsers had noticable market
share amongst Web users, and to a large extent all the browsers rendered
HTML in different ways. The style certainly was not well known in those days.

>             The HMTL REC defines and suggests style for HTML elements,

No, it does not. (There are a few exceptions, mainly media-specific
presentational elements like B and I.)

> and Moz can follow that. Moz can only apply style to XML if it too is
> well known (XHTML, SVG, MathML, etc) or if it is specified using, say,
> an xml-stylesheet PI. If it has neither then these, then sure, apply
> some default style to it. You can't call it correct though,

I can, and do.

>                                                             and at
> least make it configurable,

It is configurable. If you want the stream of text, hit Ctrl+U. If you
want the tree, don't hit Ctrl+U.

>                             through a hidden pref or something similar
> to userStyle.css or userChrome.css, so people who (sanely enough)
> don't like their XML initially displayed as a tree can fix it.
> </rant>
>...

No, because the amount of work required for those masochists who prefer
unstyled XML to appear as a meaningless stream of text to hit Ctrl+U on
those occasions where they felt agitated enough that they really really
did want the meaningless stream of text instead of a slightly less
meaningless and definitely more manipulable pretty tree would be
considerably less than the amount of work required to implement and test
and maintain a hidden pref to control whether or not unstyled XML was
shown as a pretty tree when in the browser rather than the source view.

Hmmm, perhaps I should have drawn that last sentence as a tree.

-- 
Matthew `mpt' Thomas, Mozilla UI Design component default assignee thing
<http://mozilla.org/>


Reply via email to