[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] IE9 and application/xhtml+xml
- From: Jesper Tverskov <jesper.tverskov@gmail.com>
- To: xml-dev@lists.xml.org
- Date: Sat, 20 Aug 2011 01:47:08 +0200
Rand McRanderson wrote:
> However, there are cases where correct serving to browsers is important in
> the practical sense. That is if you are using namespaces or if you don't
> want to follow html endtag rules. My understanding (correct me if I am
> wrong) is that xhtml that doesn't match html5 standards (ie, no namespace
> usage, only certain tags self-closing) must have the proper mimetype.
"HTML5" is a brand name for both HTML5 and XHTML5. If you want to use
XHTML5 you must use mimetype "application/xhtml+xml" to get XML
parsing instead of HTML parsing. That is so to speak the definition of
"XHTML5".
A nice thing about HTML5 using a HTML parser is that you can use
well-formed markup as a valid subset. If you also use lower-case for
element and attribute names and declare the XHTML namespace explicitly
(HTML5 uses that namespace implicitly or explicitly), you end up with
markup that is "XHTML" as a valid subset of HTML5.
It is true that you must only use single tag elements like <meta/> and
<input/>, <img/> and <br/> when this almost XHTML is used as a subset
of HTML5 with the "text/html" mimetype. You must not use e.g. <p/>
instead of <p></p>.
That is, XHTML is at least three different things:
1. Old XHTML 1.0/1.1 specs, etc.
2. XHTML5 as a sibling to HTML5.
3 "XHTML" as a subset of valid HTML5.
Cheers
Jesper Tverskov
http://www.xmlplease.com
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]