By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,689 Members | 1,915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,689 IT Pros & Developers. It's quick & easy.

XHTML 1.1 as text/html

P: n/a
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
Share this Question
Share on Google+
14 Replies


P: n/a
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

P: n/a
..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

P: n/a
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

P: n/a
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

P: n/a
..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

P: n/a
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

P: n/a
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

P: n/a
..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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.