Re: [DOMCore] createElement() and HTML-specific element interfaces

On 08/10/2011 12:33 AM, Ian Hickson wrote:
> On Tue, 9 Aug 2011, David Flanagan wrote:
>> On 8/9/11 1:55 PM, Ian Hickson wrote:
>>>> The terminology is confusing because we can have an object that
>>>> implements HTMLDocument but is not "flagged as an HTML document".
>>>> All documents are HTML documents but some are more HTML than others
>>>> and get special uppercasing and lowercasing behavior of their
>>>> tagnames.  Since the primary consumer of the DOM spec is the HTML
>>>> spec, I think the editors of the DOM spec might want to change the
>>>> phrase "flagged as an HTML document" since the term "html document"
>>>> gets overridden by the HTML spec :-)
>>>
>>> The term "HTML document" actually comes from the HTML spec originally.
>>> The term as used in the HTML spec is the same.
>>
>> Your suggestion on the whatwg list to change "interface HTMLDocument"
>> into "partial interface Document" would go a long way to clearing up the
>> confusion I experience.
>>
>> Still, I think it would be helpful if the DOM spec changed the html flag
>> into two distinct internal properties: caseSensitive and
>> allowsProcessingInstructions.  Documents created with createDocument()
>> are case sensitive and allow PIs.  Documents created with
>> createHTMLDocument() are not.
>
> There are far more differences. For example,<noscript>  is allowed in HTML
> Documents but not XML Documents.

Indeed. Also, having two flags would suggest that one could be set while 
the other isn't, and that would, I think, lead to more confusion.

Ms2ger

Received on Wednesday, 10 August 2011 08:57:34 UTC