RFC 3236

The 'application/xhtml+xml' Media Type

πŸ“… published January 2002, from ietf

RFC 3236: The 'application/xhtml+xml' Media Type πŸ’–

okay so this is RFC 3236 πŸŽ€, published in January 2002 by Mark Baker (Planetfred, Inc.) and P. Stark (Ericsson Mobile Communications). It's Category: Informational πŸ“š, which means it shares info with the Internet community and doesn't set an Internet standard. The big job is registering a brand new MIME media type, application/xhtml+xml ✨. It doesn't obsolete or update anything. It's only meant to sit alongside RFC 2854, which registers text/html. Let's go πŸ¦‹

Status of This Memo 🌸

this memo gives info to the Internet community. it's not an Internet standard of any kind, and it can be shared freely with no limits ✨

Copyright (C) The Internet Society (2002). All Rights Reserved.

Abstract 🧚

this document defines the application/xhtml+xml MIME media type for XHTML based markup languages 🌈. it's not meant to replace any earlier IETF documents, especially RFC 2854, which registers text/html.

1. Introduction πŸŽ€

okay so back in 1998 the W3C HTML working group started rebuilding HTML on top of XML 1.0 [XML] and XML Namespaces [XMLNS] πŸ’…. the first chunk of that work wrapped up in January 2000 with the XHTML 1.0 Recommendation [XHTML1], which is basically HTML 4.01 [HTML401] reformulated as XML πŸ”₯.

the work didn't stop there. the Modularization of XHTML Recommendation [XHTMLM12N] breaks XHTML 1.0 into modules you can mix and match to build brand new XHTML based languages, plus a framework for making that composition work 🫢

this document's whole thing is registering one new MIME media type, application/xhtml+xml πŸ’œ. it doesn't define anything beyond what that registration needs, so no extra drama ✨

it follows the naming convention in [XMLMIME] for MIME subtypes πŸ¦‹. the "+xml" suffix says the content follows the XML syntax from XML 1.0 [XML] 🌸

this doc was written by people in the W3C HTML working group, using the structure and some of the content from RFC 2854, the text/html registration πŸ‘‘. if you have comments, send them to www-html@w3.org. it's a public mailing list (you need to subscribe to post), and the archives live at http://lists.w3.org/Archives/Public/www-html/ πŸ“¬

2. Registration of MIME media type application/xhtml+xml πŸ’–

here's the registration form, with the exact field names and values in a code block so nothing gets lost in translation πŸŽ€:

MIME media type name:      application
MIME subtype name:         xhtml+xml
Required parameters:       none
Optional parameters:

Optional parameters 🌈

  • charset: this one works exactly like the charset parameter of the application/xml media type, as specified in [XMLMIME] πŸ’…
  • profile: see Section 8 of this document 🧚

Encoding considerations πŸ¦‹: see Section 4 of this document.

Security considerations πŸ”₯: see Section 7 of this document.

Interoperability considerations πŸ‘‘

okay this part is kind of a big deal 😭. XHTML 1.0 [XHTML10] sets out user agent conformance rules, and those rules spell out how user agents have to behave with stuff like unrecognized elements. they're not optional vibes, they're requirements πŸ’€

XHTML Modularization [XHTMLMOD] also means there are XHTML based languages (called XHTML family members) that aren't XHTML 1.0 conformant. it's possible application/xhtml+xml gets used to describe some of those documents too 🌸. for interoperability for now, it's enough that user agents accepting application/xhtml+xml content use the user agent conformance rules in [XHTML1] 🫢

here's the catch: conformant application/xhtml+xml interpreters can count on receiving well-formed XML (as defined in [XML]) πŸŽ€. but they can't be sure the content is valid XHTML (as defined in [XHTML1]). a big reason is the stuff from the paragraph above πŸ™ˆ

Published specification 🌈

XHTML 1.0 is now a W3C Recommendation, and the latest published version is [XHTML1] ✨. it lets some conformant content be described as text/html, but it doesn't rule out other content types either, so this new type is totally possible πŸ’œ

Applications which use this media type πŸ’…

some content authors have already started hand-authoring and tool-authoring on the Web with XHTML 1.0 🧚. but that content is currently described as text/html, so existing Web browsers can process it without any reconfiguring for a new media type πŸ¦‹

there's no experimental, vendor specific, or personal tree predecessor to application/xhtml+xml 🌸. this new type is being registered so XHTML can be deployed on the World Wide Web as a first class XML application πŸ‘‘. authors can expect user agents to be conformant XML 1.0 [XML] processors πŸ”₯

Additional information πŸ’–

Magic number πŸŽ€: there's no single initial byte sequence that always shows up in XHTML files πŸ™ˆ. but Section 5 below has some guidelines for recognizing XHTML files. see also section 3.1 in [XMLMIME] ✨

File extension 🌈: three file extensions are currently in use for XHTML 1.0: ".xht", ".xhtml", and ".html" πŸ’…

it's not recommended to use the ".xml" extension (defined in [XMLMIME]), since web servers may be set up to serve that content as type "text/xml" or "application/xml" 😭. [XMLMIME] covers how unreliable that approach is in section 3 πŸ“š. of course, if the author wants that behaviour, the ".xml" extension is fine to use 🫢

Macintosh File Type code: TEXT πŸ“

Person & email address to contact for further information πŸ“¬

Mark Baker <mark.baker@canada.sun.com> πŸ’œ

Intended usage: COMMON πŸ¦‹

Author/Change controller πŸ‘‘

the XHTML specifications are work products of the World Wide Web Consortium's HTML Working Group 🌸. the W3C has change control over these specifications πŸ’…

8. The "profile" optional parameter ✨

okay so this parameter is basically a fix for a short-term problem πŸŽ€ When you use MIME media type based content negotiation (like the HTTP "Accept" header) to ask for a bunch of different XHTML based languages, things get messy, and profile helps clean that up πŸ’…

It is only meant to be used during content negotiation. It is not expected to be used for delivering content, and origin web servers don't need to know it exists (though they're totally welcome to know about it 🫢). It's mainly for proxies in the HTTP chain that change data formats, like transcoders πŸ”₯

The parameter is designed to match the meaning of the "profile" attribute on the HEAD element from [HTML401] (section 7.4.4.3) 🌸 The big difference is that it applies to the whole document instead of just the META elements. The value is a URI that works as a name for a language. You don't have to actually resolve the URI to make it useful as a name, and it could be a namespace, a schema, or a language specification πŸ¦‹

Here's why it's needed. User agents that only support XHTML Basic (see http://www.w3.org/TR/xhtml-basic) have no standard way to say "hey, I can't handle the extra stuff in XHTML 1.0 [XHTML1] that isn't in XHTML Basic" 😭 XHTML Basic user agent conformance rules are identical to XHTML 1.0, and they give some guidance for handling extra content, but the extra content in XHTML 1.0 is substantial. Those rules just aren't enough for practical processing and rendering for the end user. There's also the issue of the potentially heavy burden on the user agent when it has to receive and parse all that extra content πŸ’€

You can get this same functionality with at least two other, more general content description frameworks: the "Content-features" MIME header described in RFC 2912, and UAPROF from the WAPforum (see http://www.wapforum.org/what/technical.htm) ✨ The catch is that picking one of these means excluding the other, because interoperability between the two hasn't been defined yet. So for now, the suggestion is to use this parameter until that issue gets sorted out 🌈

An example of using this parameter in an HTTP GET transaction looks like this:

      Accept: application/xhtml+xml;
        profile="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"

9. Author's Address 🧚

   Mark A. Baker
   Planetfred, Inc.
   44 Byward Market, Suite 240
   Ottawa, Ontario, CANADA. K1N 7A2
   Phone: +1-613-789-1818
   EMail: mbaker@planetfred.com
   EMail: distobj@acm.org

   Peter Stark
   Ericsson Mobile Communications
   Phone: +464-619-3000
   EMail: Peter.Stark@ecs.ericsson.com

10. References πŸ“š

[HTML401] Raggett, D., et al., "HTML 4.01 Specification", W3C Recommendation. Available at <http://www.w3.org/TR/html401> (or <http://www.w3.org/TR/1999/REC-html401-19991224>).

[MIME] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.

[URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[XHTML1] "XHTML 1.0: The Extensible HyperText Markup Language: A Reformulation of HTML 4 in XML 1.0", W3C Recommendation. Available at <http://www.w3.org/TR/xhtml1>.

[XML] "Extensible Markup Language (XML) 1.0", W3C Recommendation. Available at <http://www.w3.org/TR/REC-xml> (or <http://www.w3.org/TR/2000/REC-xml-20001006>).

[TEXTHTML] Connolly, D. and L. Masinter, "The 'text/html' Media Type", RFC 2854, June 2000.

[XMLMIME] Murata, M., St.Laurent, S. and D. Kohn, "XML Media Types", RFC 3023, January 2001.

[XHTMLM12N] "Modularization of XHTML", W3C Recommendation. Available at: <http://www.w3.org/TR/xhtml-modularization>


Copyright (C) The Internet Society (2002). All Rights Reserved.

okay this part is the legal bit, so I'm keeping every single clause 🫢 You can copy this document and share it with others, and you can make derivative works that comment on or explain it, or help with implementing it. Those can be prepared, copied, published and distributed, in whole or in part, with no restrictions of any kind. The one condition is that the above copyright notice and this paragraph have to be included on all those copies and derivative works ✨ But this document itself can't be modified in any way, like removing the copyright notice or the references to the Internet Society or other Internet organizations. The exceptions are when it's needed for developing Internet standards (then the copyright procedures in the Internet Standards process must be followed), or when it's being translated into languages other than English 🌸

The limited permissions above are perpetual, and the Internet Society or its successors or assigns won't revoke them πŸ’œ

This document and the information in it is provided on an "AS IS" basis, and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE 😭

Acknowledgement 🌷

Funding for the RFC Editor function is currently provided by the Internet Society 🫢

πŸ“¦ where this page comes from