473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

XHTML 1.1 as text/html

I've found some contradiction I want to resolve.

<http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states:
Why is it disallowed to send XHTML 1.1 documents as text/html?

XHTML 1.1 is pure XML, and only intended to be XML. It cannot
reliably be sent to legacy browsers. Therefore XHTML 1.1 documents
must be sent with an XML-related media type, such as
application/xhtml+xml.
I've noted "_disallowed_ text/html" and "_must_ be sent with an
XML-related media type" here as strong requirement.

On the other hand the current XHTML 1.1 draft
<http://www.w3.org/TR/2007/WD-xhtml11-20070216/conformance.html#strict>
states (at the end of the section):
XHTML 1.1 documents SHOULD be labeled with the Internet Media Type
text/html as defined in [RFC2854] or application/xhtml+xml as
defined in [RFC3236]. For further information on using media types
with XHTML, see the informative note [XHTMLMIME].
The previous XHTML 1.1 recommendation doesn't include this paragraph
(or what should be the MIME type at all) but the "SHOULD be labeled
with text/html" statment gives me a strong suggestion I can serve
XHTML 1.1 as text/html. Which is de facto correct?

Further in the referenced [XHTMLMIME] I see a table
<http://www.w3.org/TR/xhtml-media-types/#summarywhich suggest I
"SHOULD NOT" use text/html with XHTML 1.1 documents, but doesn't
state a strong "MUST NOT" requirement. In the "3.1. 'text/html'"
<http://www.w3.org/TR/xhtml-media-types/#text-htmlsection I don't
see any mention of XHTML 1.1.

Given the last document is the oldest I don't see a necessary
logical development:

August 2002: text/html for XHTML 1.1 is discouraged;
July 2004: text/html for XHTML 1.1 is disallowed;
February 2007: text/html for XHTML 1.1 is permitted (if not encouraged).

--
Stanimir
Jun 27 '08 #1
14 1805
Hi

On Tue, 24 Jun 2008 23:52:17 +0300, Stanimir Stamenkov wrote:
I've found some contradiction I want to resolve.

<http://www.w3.org/MarkUp/2004/xhtml-faq#mime11states:
>XHTML 1.1 ... must be sent with an XML-related media type
On the other hand the current XHTML 1.1 draft states
>XHTML 1.1 documents SHOULD be labeled ... text/html
Don't expect the w3c to have the slightest bit of clue about mime types.
They basically just make it up as they go along and regularly get it
completely wrong. I mean, html4 and other standards state that CSS
should be text/css!

This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.

So basically, the answer is, ignore the botchers at the w3c, and test
browsers to see what works and if it is treated differently. Use your
judgement. I would say that according to rfc2046 3(1) you should
probably use a text/* type. The acid test for if you should use text/*
is "can it be read if it was displayed as text/plain?".

HTH
viza
Jun 27 '08 #2
..oO(viza)
>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.
Who says that text/* has to be natural language text?

Micha
Jun 27 '08 #3
Hi

On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
.oO(viza)
>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is
that css is not natural language text and so cannot be described by any
text/* MIME type.

Who says that text/* has to be natural language text?
I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3

HTH
viza
Jun 27 '08 #4
viza wrote:
Hi

On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
>.oO(viza)
>>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is
that css is not natural language text and so cannot be described by any
text/* MIME type.
Who says that text/* has to be natural language text?

I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3
No it says just the subtype plain:

'The subtype "plain" in particular indicates plain text containing no
formatting commands or directives of any sort. Plain text is intended to
be displayed "as-is".'

I guess you could possibly make the case for type 'application'.
Typically binary but not always. As it says in the RFC

'Other expected uses for "application" include spreadsheets,
data for mail-based scheduling systems, and languages for "active"
(computational) messaging, and word processing formats that are not
directly readable.'

Yes CSS is formating instruction, but the rules are directly readable
(at least if you have some familiarity with stylesheets!) Now where I
think is a better argument is with 'text/javascript'.
'application/javascript' make more sense but good luck with that with
lack of MS support.
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #5
..oO(viza)
>On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
>.oO(viza)
>>This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is
that css is not natural language text and so cannot be described by any
text/* MIME type.

Who says that text/* has to be natural language text?

I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3
I've read that, but it doesn't answer my question.

Micha
Jun 27 '08 #6
Michael Fesser <ne*****@gmx.dewrites:
.oO(viza)
>>On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
>>.oO(viza)

This is completely wrong and although they tried to make it standard by
publishing an "informational" (not standard) rfc (2318), the fact is
that css is not natural language text and so cannot be described by any
text/* MIME type.

Who says that text/* has to be natural language text?

I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3

I've read that, but it doesn't answer my question.
Indeed - that document says that text/* should be readable by any
application that can work with plain text, instead of requiring an app
that understands a specific format. HTML certainly fits that bill.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
Jun 27 '08 #7
Hi

On Fri, 27 Jun 2008 15:25:10 +0200, Michael Fesser wrote:
.oO(viza)
>>On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
>>.oO(viza)

This is completely wrong and although they tried to make it standard
by publishing an "informational" (not standard) rfc (2318), the fact
is that css is not natural language text and so cannot be described
by any text/* MIME type.

Who says that text/* has to be natural language text?

I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3

I've read that, but it doesn't answer my question.
Read on a bit. Do you want me to turn the page for you? :-D

4.1:
...
Beyond plain text, there are many formats for representing what might
be known as "rich text". An interesting characteristic of many such
representations is that they are to some extent readable even without
the software that interprets them. It is useful, then, to
distinguish them, at the highest level, from such unreadable data as
images, audio, or text represented in an unreadable form. ...
Jun 27 '08 #8
..oO(viza)
>>>http://tools.ietf.org/html/rfc2046#section-3

I've read that, but it doesn't answer my question.

Read on a bit. Do you want me to turn the page for you? :-D

4.1:
...
Beyond plain text, there are many formats for representing what might
be known as "rich text". An interesting characteristic of many such
representations is that they are to some extent readable even without
the software that interprets them.
HTML and CSS also are to some extent readable even without a browser.

And from the same section:

| The "text" media type is intended for sending material which is
| principally textual in form.

HTML and CSS are textual in form. So again, where does it say that
text/* has to be natural language text? All currently defined subtypes
perfectly fit the above definition.

Micha
Jun 29 '08 #9
viza wrote:
Hi

On Fri, 27 Jun 2008 15:25:10 +0200, Michael Fesser wrote:
>.oO(viza)
>>On Fri, 27 Jun 2008 11:44:43 +0200, Michael Fesser wrote:
.oO(viza)

This is completely wrong and although they tried to make it standard
by publishing an "informational" (not standard) rfc (2318), the fact
is that css is not natural language text and so cannot be described
by any text/* MIME type.
Who says that text/* has to be natural language text?
I already said, but you snipped it:

http://tools.ietf.org/html/rfc2046#section-3
I've read that, but it doesn't answer my question.

Read on a bit. Do you want me to turn the page for you? :-D

4.1:
...
Beyond plain text, there are many formats for representing what might
be known as "rich text". An interesting characteristic of many such
representations is that they are to some extent readable even without
the software that interprets them. It is useful, then, to
distinguish them, at the highest level, from such unreadable data as
images, audio, or text represented in an unreadable form. ...
Why are you being condescending, when the excerpt you provided says
nothing that supports your position? You do realize the CSS is
*readable*, don't you? It isn't an image, it isn't audio, it isn't
video. As for the application type, well, the RFC says:

The "application" media type is to be
used for discrete data which do not fit
in any of the other categories, and
particularly for data to be processed
by some type of application program.
This is information which must be processed
by an application before it is viewable
or usable by a user.

CSS doesn't have to be processed by an application before it is viewable
or usable by a user. It is easy to write verbatim and it can be read by
human beings perfectly without preliminary processing.
Jun 29 '08 #10
Wed, 25 Jun 2008 11:17:24 GMT, /viza/:
... the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.
I'm not really sure text/* types are reserved only for natural
language text, but AFAIK the point application/* types are preferred
over the corresponding text/* ones, e.g. application/xml vx.
text/xml, is just because text/* is specified to have a default
'charset' of US-ASCII, where it doesn't fit well with the XML
default of UTF-8.

--
Stanimir
Jun 29 '08 #11
Wed, 25 Jun 2008 11:17:24 GMT, /viza/:
... the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.
I'm not really sure text/* types are reserved only for natural
language text, but AFAIK the point application/* types are preferred
over the corresponding text/* ones, e.g. application/xml vs.
text/xml, is just because text/* is specified to have a default
'charset' of US-ASCII, where it doesn't fit well with the XML
default of UTF-8.

--
Stanimir
Jun 29 '08 #12
Wed, 25 Jun 2008 11:17:24 GMT, /viza/:
... the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.
I'm not really sure text/* types are reserved only for natural
language text, but AFAIK the point application/* types are preferred
over the corresponding text/* ones, e.g. application/xml vs.
text/xml, is just because text/* is specified to have a default
'charset' of US-ASCII, where it doesn't fit well with the XML
default of UTF-8.

--
Stanimir
Jun 29 '08 #13
Wed, 25 Jun 2008 11:17:24 GMT, /viza/:
... the fact is that
css is not natural language text and so cannot be described by any text/*
MIME type.
I'm not really sure text/* types are reserved only for natural
language text, but AFAIK the point application/* types are preferred
over the corresponding text/* ones, e.g. application/xml vs.
text/xml, is just because text/* is specified to have a default
'charset' of US-ASCII, where it doesn't fit well with the XML
default of UTF-8.

--
Stanimir
Jun 29 '08 #14
Sun, 29 Jun 2008 19:42:56 +0300, /Stanimir Stamenkov/:
I'm not really sure text/* types are reserved only for natural language
text...
Sorry about the multiple replies - my connection got messed up and
it didn't appear my reply has been successfully posted, initially.

--
Stanimir
Jun 29 '08 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
30
by: Patrick | last post by:
Hello, i'm trying to get my page to XHTML 1.1 compliance, i used the validator from validator.w3.org but i still get one error message which i cant explain. Would be nice if someone can take a...
32
by: jp29 | last post by:
My take on problems composing, serving and rendering XHTML documents/web pages: 1. Typical conscientious web authors are producing XHTML documents (Web pages) that feature valid Markup and with...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
82
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a...
3
by: Frank Thomas | last post by:
So, where are we (as an industry) with regards to XHTML? I've been going through a book published in 2002 that promotes the idea that we should all be looking to create new projects as compliant...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.