|
Posted by cwdjrxyz on 05/02/07 16:11
On May 2, 3:54 am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> cwdjrxyz wrote:
> > Even if the code is completely valid html at the W3C validator, the
> > page on the web that someone views is not xhtml unless it is served as
> > application/xhtml+xml or application/xml, or very rarely another xhtml
> > mime type.
>
> XHTML *should* be served as application/xhtml+xml but *may* be served as
> application/xml, text/xml or text/html.
>
> An oft-quoted W3C note says that XHTML 1.1 *should not* (note: not "must
> not") be served as text/html, but the current draft of the XHTML 1.1
> Second Edition recommendation does explicitly allow for XHTML 1.1 to be
> served as text/html.
>
> Of course, served as text/html, browsers will generally treat XHTML as
> if it were HTML with a few extra slashes in some places, and won't process
> it according to XML rules. Of course, they *could* process it as XHTML,
> but browser makers tend to decide not to, as it may result in cryptic error
> messages, which aren't generally very useful for the browser user.
>
> Whether or not browsers *treat* it as XML, doesn't effect its intrinsic
> XML-ness.
What many forget is that the html/xhtml code is just part of what gets
downloaded to the browser, and that other important information is
exchanged in the initial exchange between the server and browser. The
W3C rules allow xhtml 1.1 to be downloaded under mime type text/html
although it is discouraged, and for very good reason. An xhtml page
can be all html, all xml, or any combination thereof. If the xhtml
page contains some xml content, the xml likely will not work properly
if it is treated as text/html. Since many web pages do not contain xml
content, people who translate html pages to xhtml pages may seldom run
into this problem. I do not know why the W3C did not completely ban
serving an xhtml page as text/html, as this will not work in some
cases when the page contains some xml content. The reason could be
that the widely used IE browsers including the IE7 can not handle true
xhtml served properly, and they are attempting to get people used to
writing xhtml code in hopes that Microsoft will update their very
outdated browsers. Also Microsoft likely contributes more money to the
W3C than anyone - it is a pity that they do not build their browsers
to support what they are partly paying for. Hopefully, now that their
long-delayed Vista OS has been introduced, hopefully they will have
some time to devote to updating their browsers to modern standards.
There are of course many aspects of xml that most browsers do not
support, including many xml languages. A good example is the multi-
media language SMIL. In such cases, a special player is installed on
the computer to handle the xml language program. For example, the Real
player has nearly full W3C SMIL 2 support built into it. Thus SMIL
will work on just about any OS/browser combination that can handle a
Real player, and you can even view SMIL on the old Netscape 4 series
browsers, since you can install a recent Real player on them. I
believe the QT player has very limited support of SMIL. The IE6, and
likely the IE7 browsers do directly support a very limited mutant
version of SMIL, but it will work only on IE. I believe it makes use
of some Microsoftese filters etc, but I have absolutely no interest in
the details of it because it only works on IE.
[Back to original message]
|