W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2006

[Bug 3196] [Ser] DOCTYPE MUST be HTML or html

From: <bugzilla@wiggum.w3.org>
Date: Thu, 04 May 2006 15:28:30 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Fbfkk-000378-RB@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3196





------- Comment #1 from davidc@nag.co.uk  2006-05-04 15:28 -------

The fact that the html element tag is optional doesn't affect the DOCTYPE
declaration, You can still have a top level html _element_ with its two
required children head and body, but just omit the start and end _tags_ This is
valid html even though there is not a single top level tag. It would not be
correct to replace the "html" in the DOCTYPE with either "head" or "body".


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title></title>
</head>
<body>
<p></p>
</body>


Of course in html (as in XHTML) You can have any fragment of a document
consisting of a single element and specify the top level element in the
DOCTYPE but this is unrelated to the fact that the start tag of html is
optional.

<!DOCTYPE p PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<p></p>


is valid html but would be valid XHML if the XHTML DTD were referenced, even
though no start or end tags are optional in XML. You can't generate this 
example in XSLT 1 but I don't think this is a great loss. As you say you could
in fact generate this example in XSLT2 using xhtml method.

David
Received on Thursday, 4 May 2006 15:28:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:29 UTC