This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12106 - 1. <quote> <!DOCTYPE HTML> </quote> Is this declaration part of an html document? Or is this part of a Document Type Definition (DTD)? Where are DTDs for html documents defined? 2. <title> Resource metadata management </title> <quote> A Document is always
Summary: 1. <quote> <!DOCTYPE HTML> </quote> Is this declaration part of an html docum...
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-17 10:07 UTC by contributor
Modified: 2011-08-04 05:12 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-02-17 10:07:40 UTC
Specification: http://dev.w3.org/html5/spec/Overview.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#top

Comment:
1.
<quote>
<!DOCTYPE HTML>
</quote>
Is this declaration part of an html document? Or is this part of a Document
Type Definition (DTD)? Where are DTDs for html documents defined?

2.
<title>
Resource metadata management
</title>
<quote>
A Document is always set to one of three modes: no-quirks mode, the default;
quirks mode, used typically for legacy documents; and limited-quirks mode,
also known as "almost standards" mode. The mode is only ever changed from the
default by the HTML parser, based on the presence, absence, or value of the
DOCTYPE string.
</quote>
Where do I define, which of the above modes a document is in?

3.
<title>
Common infrastructure
Terminology
</title>
<quote>
This specification refers to both HTML and XML attributes and IDL attributes, 

</quote>
Does this specification refers to all three or only to two (both?) of the
above attribute series? 
In the entire document it remains unclear, whether the standard pertains only
to static html/xhtml (as e.g. sent from a web server) or also to dynamic
html/xhtml (as e.g. produced by javascript invoked by user interaction). User
Agents, in some cases, behave differently when receiving a text/html document
from the web server, as opposed to when they execute javascript commands to
generate dynamically the same content. 
Are such User Agents not-conforming to this standard?

4.
<title>
The meta element
</title>
<quote>
The charset attribute specifies the character encoding used by the document.
This is a character encoding declaration. If the attribute is present in an
XML document, its value must be an ASCII case-insensitive match for the string
"UTF-8" (and the document is therefore forced to use UTF-8 as its encoding).

Note: The charset attribute on the meta element has no effect in XML
documents, and is only allowed in order to facilitate migration to and from
XHTML.
</quote>
Could you please make a statement, that the character encoding of an XML
attribute is defined by the Document Type Definition (e.g. <?xml version="1.0"
encoding="utf-8"?>

5.
Regarding the examples:

I would expect, that in a standard document the examples are reproducible in
all aspects, so that when I try an example in a User Agent, I get exactly what
the document says, the example should produce. This is, however, not the case
in many examples for 
<title>
Tabular Data
</title>
At least as far as border reproduction is concerned, practically all examples
fail, i.e. the examples do not show the border as it should according to the
document. And an example, which makes me first search the error does not help
very much. 



Thank you very much for your attention.

suomi@ayni.com


Posted from: 212.90.206.130
Comment 1 Aryeh Gregor 2011-02-18 19:15:55 UTC
File one bug per issue, please.  Otherwise it's significantly harder to deal with.  Although most of these seem to be questions rather than proposed changes anyway.

(In reply to comment #0)
> 1.
> <quote>
> <!DOCTYPE HTML>
> </quote>
> Is this declaration part of an html document? Or is this part of a Document
> Type Definition (DTD)? Where are DTDs for html documents defined?

http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype

You can only have one doctype, and only at the beginning.  The precise validity requirements are given implicitly in the text/html parsing section, which is not for the faint of heart:

http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing

In practice, just put one at the beginning and you're fine.  Check in a validator like validator.nu if you're not sure.

> 2.
> <title>
> Resource metadata management
> </title>
> <quote>
> A Document is always set to one of three modes: no-quirks mode, the default;
> quirks mode, used typically for legacy documents; and limited-quirks mode,
> also known as "almost standards" mode. The mode is only ever changed from the
> default by the HTML parser, based on the presence, absence, or value of the
> DOCTYPE string.
> </quote>
> Where do I define, which of the above modes a document is in?

As it says, the HTML parser decides.  The gist is that if you use a permitted doctype, like <!doctype html>, you will be in no-quirks mode, which is the mode you want.  Any valid HTML5 document will be in no-quirks mode.  Other modes have weird legacy behavior (more than HTML generally does) and are much less standardized and consistent between browsers, so in practice there's no reason you want anything but no-quirks mode.

Again, you can refer to the HTML parser if you want the full details, but that's far too complicated for anyone to be able to understand without inordinate effort, so it's best to just accept a simplified view.

> 3.
> <title>
> Common infrastructure
> Terminology
> </title>
> <quote>
> This specification refers to both HTML and XML attributes and IDL attributes, 
> 
> </quote>
> Does this specification refers to all three or only to two (both?) of the
> above attribute series? 

All three.

> In the entire document it remains unclear, whether the standard pertains only
> to static html/xhtml (as e.g. sent from a web server) or also to dynamic
> html/xhtml (as e.g. produced by javascript invoked by user interaction).

It applies to all HTML, including HTML that was constructed on the DOM level or otherwise not derived from a static document.  Conformance checkers don't normally try to check dynamically-generated pages for conformance, of course.

> User
> Agents, in some cases, behave differently when receiving a text/html document
> from the web server, as opposed to when they execute javascript commands to
> generate dynamically the same content. 
> Are such User Agents not-conforming to this standard?

It depends.  What specific behaviors did you have in mind?

> <title>
> The meta element
> </title>
> <quote>
> The charset attribute specifies the character encoding used by the document.
> This is a character encoding declaration. If the attribute is present in an
> XML document, its value must be an ASCII case-insensitive match for the string
> "UTF-8" (and the document is therefore forced to use UTF-8 as its encoding).
> 
> Note: The charset attribute on the meta element has no effect in XML
> documents, and is only allowed in order to facilitate migration to and from
> XHTML.
> </quote>
> Could you please make a statement, that the character encoding of an XML
> attribute is defined by the Document Type Definition (e.g. <?xml version="1.0"
> encoding="utf-8"?>

This is out-of-scope for HTML.  The actual character encoding of an XML document is defined by XML, not HTML.  HTML only lets you specify <meta charset> in an XML document because you might want to use the same content for text/html, where it does matter.

> Regarding the examples:
> 
> I would expect, that in a standard document the examples are reproducible in
> all aspects, so that when I try an example in a User Agent, I get exactly what
> the document says, the example should produce. This is, however, not the case
> in many examples for 
> <title>
> Tabular Data
> </title>
> At least as far as border reproduction is concerned, practically all examples
> fail, i.e. the examples do not show the border as it should according to the
> document. And an example, which makes me first search the error does not help
> very much. 

Which examples don't seem to be working for you, in which browsers?  What looks wrong about them?
Comment 2 Ian 'Hixie' Hickson 2011-05-04 23:08:56 UTC
> <!DOCTYPE HTML>
> Is this declaration part of an html document?

Yes.

> Or is this part of a Document
> Type Definition (DTD)?

No.

> Where are DTDs for html documents defined?

There are no official DTDs for HTML.


> "A Document is always set to one of three modes: no-quirks mode, the default;
> quirks mode, used typically for legacy documents; and limited-quirks mode,
> also known as "almost standards" mode. The mode is only ever changed from the
> default by the HTML parser, based on the presence, absence, or value of the
> DOCTYPE string."
>
> Where do I define, which of the above modes a document is in?

You don't, ideally. If you follow the spec rules, you'll always be in no-quirks mode.


> "This specification refers to both HTML and XML attributes and IDL attributes,"
> 
> Does this specification refers to all three or only to two (both?) of the
> above attribute series? 

It refers to HTML and XML attributes, and to IDL attributes. HTML and XML attributes are the same thing for the purposes of this text.


> In the entire document it remains unclear, whether the standard pertains only
> to static html/xhtml (as e.g. sent from a web server) or also to dynamic
> html/xhtml (as e.g. produced by javascript invoked by user interaction). User
> Agents, in some cases, behave differently when receiving a text/html document
> from the web server, as opposed to when they execute javascript commands to
> generate dynamically the same content. 
> Are such User Agents not-conforming to this standard?

The spec is intended to cover all of this. Can you clarify why this is not clear? I'm happy to make it clearer, but am not sure where to start.


> Could you please make a statement, that the character encoding of an XML
> attribute is defined by the Document Type Definition (e.g. <?xml version="1.0"
> encoding="utf-8"?>

Not sure what this means.


> Regarding the examples:
> 
> I would expect, that in a standard document the examples are reproducible in
> all aspects, so that when I try an example in a User Agent, I get exactly what
> the document says, the example should produce. This is, however, not the case
> in many examples for 
> <title>
> Tabular Data
> </title>
> At least as far as border reproduction is concerned, practically all examples
> fail, i.e. the examples do not show the border as it should according to the
> document. And an example, which makes me first search the error does not help
> very much. 

HTML doesn't guarantee a particular presentation. You will need to use CSS to change the presentation.


EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: see above for specific questions that would help resolve this issue.
Comment 3 Michael[tm] Smith 2011-08-04 05:12:20 UTC
mass-move component to LC1