Click here to get back home

XHTML 1.1 as text/html

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
XHTML 1.1 as text/html Stanimir Stamenkov 06-24-2008
Posted by Stanimir Stamenkov on June 24, 2008, 4:52 pm
Please log in for more thread options
I've found some contradiction I want to resolve.

<http://www.w3.org/MarkUp/2004/xhtml-faq#mime11> states:

> 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/#summary> which 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-html> section 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

Posted by viza on June 25, 2008, 7:17 am
Please log in for more thread options
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#mime11> states:
>
>> 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

Posted by Michael Fesser on June 27, 2008, 5:44 am
Please log in for more thread options
.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

Posted by viza on June 27, 2008, 6:18 am
Please log in for more thread options
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

Posted by Jonathan N. Little on June 27, 2008, 9:09 am
Please log in for more thread options
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

Similar ThreadsPosted
More accurate testing of XHTML documents with XHTML Proxy June 5, 2006, 6:50 pm
Javascript failing xhtml [xhtml newbe] August 9, 2005, 2:49 pm
Serving XHTML as XHTML does *really* weird things. June 18, 2007, 10:46 am
Old XHTML to new XHTML/CSS: Paragraph line? January 17, 2007, 6:00 am
html 4.01, xhtml 1.0 or xhtml 1.1 July 19, 2008, 3:31 pm
Re: xhtml 1.0, xhtml 1.1, html 4.01, or html 5.X? -Guy Macon July 20, 2008, 12:28 am
Re: xhtml 1.0, xhtml 1.1, html 4.01, or html 5.X? -Guy Macon July 20, 2008, 1:56 am
Re: xhtml 1.0, xhtml 1.1, html 4.01, or html 5.X? -Guy Macon July 21, 2008, 6:05 am
Re: xhtml 1.0, xhtml 1.1, html 4.01, or html 5.X? -Guy Macon July 25, 2008, 8:57 am
XHTML & SSI July 16, 2004, 6:47 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap