[Bug 27973] Easy identification of XHTML5

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27973

--- Comment #4 from Stephan Kreutzer <stephankreutzer@gmx.net> ---
If a program encounters a XML file, it can check for unique identifiers of the
format to determine if it is capable of processing the file or not. Namespaces,
some special identifier within the XML or for previous XHTML versions the
DOCTYPE declaration would tell the program in which format and version thereof
it is composed, while the program may be able to handle some custom XML formats
and a particular XHTML version, but not others, and would select corresponding
validation mechanisms and transformations based on this information.

In my particular situation, to give a concrete example, I've written a small
program to package XHTML 1.0 Strict to EPUB2 (uses internally XHTML 1.1), but
if I want to implement EPUB3 support (uses internally HTML5), it will become
difficult because if the user provides XHTML 1.0 Strict input, it might need
transformation, but another one than for XHTML5 input. The user, however, can't
be expected to care about HTML version numbers and probably won't provide
information about it.

It seems like the Markup Validation Service implements the "Doctype: detect
automatically" feature for HTML5 by looking for <!DOCTYPE html>, which differs
from the HTML4/XHTML 1.0/XHTML 1.1 DOCTYPEs in terms of the public identifier,
while the presence of the XHTML namespace distinguishes between HTML and XHTML.
And a future HTML version might distinguish itself from the previons versions
by the absence of the DOCTYPE altogether.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 16 February 2015 01:45:47 UTC