- From: Philip TAYLOR (Ret'd) <P.Taylor@Rhul.Ac.Uk>
- Date: Tue, 20 Jan 2009 14:45:39 +0000
- To: Jirka Kosek <jirka@kosek.cz>
- CC: HTML WG <public-html@w3.org>
Jirka Kosek wrote: > Giving completely aside question whether version information should or > shouldn't be included it is very bad idea to include it in DOCTYPE. The > version number should be encoded in both XML and HTML serializations in > the same way. But information from DOCTYPE is not a part of many XML > data models and XML APIs and is thus not easily accessible without > resorting to custom parsers. Well, I am no expert on XML, but reading the W3C specification for XHTML 1.1 [1] I see the following (under 2.1.1, Strictly Conforming Documents) > There MUST be a DOCTYPE declaration in the document prior to the root element. > If present, the public identifier included in the DOCTYPE declaration MUST > reference the DTD found in Appendix C using its public identifier. The system > identifier MAY be modified appropriately. > <!DOCTYPE > html PUBLIC "-//W3C//DTD XHTML 1.1//EN" > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> For XHTML 2.0 [2] I find > There should be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration must reference the DTD found in Appendix F using its Public Identifier. The system identifier may be modified appropriately. > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" > "http://www.w3.org/MarkUp/DTD/xhtml2.dtd"> but I note that the MUST of XHTML 1.1 has been watered down to a SHOULD for XHTML 2.0. The 2.0 "Strictly conforming" example then goes on to include : > <html xmlns="http://www.w3.org/2002/06/xhtml2/" xml:lang="en" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.w3.org/2002/06/xhtml2/ > http://www.w3.org/MarkUp/SCHEMA/xhtml2.xsd" > so would I be safe in assuming that when you write > So, if there should be version specified, then it should definitively > live in attribute or element value, probably version attribute would be > the best choice then. you are advocating something along the lines of the <html> element + attributes cited immediately above ? If so, I agree that this would allow an HTML document to unequivocally define to which version of the specification it is claiming adherence, in which case I would also agree that duplicating this information in the DOCTYPE is not essential and may well be contra-indicated. I would also be interested to know (are there any XHTML 2.0 WG members here ?) what benefit(s) the XHTML WG perceive in this duplication. Philip TAYLOR -------- [1] http://www.w3.org/TR/xhtml11/conformance.html#strict [2] http://www.w3.org/TR/xhtml2/conformance.html#s_conform
Received on Tuesday, 20 January 2009 14:46:22 UTC