Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any HTML 5 construct that is ONLY supported in the XML serialization?

Does there exist any "thing"(element, DOM manipulation, styling, nesting of elements, attributes, anything of that sort...) one can do in XHTML 5, that one CANNOT do in HTML 5? I remember reading on the web about one such case, but I cannot recall where it is I saw it.

This is apart from the use of content from external namespaces such as SVG and MathML (which is supported in HTML as well).

For reference, the number of answers to the converse question "what can you do in HTML 5 that you can't in XHTML 5?" are very large, given the strictness of XHTML. Hence I'm looking for answers to this question.

like image 203
Milind R Avatar asked Feb 12 '23 01:02

Milind R


1 Answers

Yes, for example entity declarations and references to entities so defined. They are part of XML, so they must be supported when using XML serialization, as it is required to follow generic XML rules. Example:

<!DOCTYPE html [
<!ENTITY foo "Hello world">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Demo</title>
</head>
<body>
&foo;
</body>
</html>
like image 190
Jukka K. Korpela Avatar answered Feb 13 '23 16:02

Jukka K. Korpela