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 12926 - The phrase "in a Document" is not consistently used in the specification
Summary: The phrase "in a Document" is not consistently used in the specification
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-06-09 18:13 UTC by contributor
Modified: 2011-08-23 08:17 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2011-06-09 18:13:25 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html
Section: http://www.whatwg.org/specs/web-apps/current-work/#in-a-document

Comment:
The phrase "in a Document" is not consistently used in the specification

Posted from: 67.40.195.18
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a1) Gecko/20110607 Firefox/7.0a1
Comment 1 Boris Zbarsky 2011-06-09 18:20:17 UTC
In particular, the link above defines it as "When an element's root element is the root element of a Document object".  But http://www.whatwg.org/specs/web-apps/current-work/multipage/apis-in-html-documents.html#apis-in-html-documents talks about "in HTML documents" when it clearly means "when the ownerDocument of the element is an HTML document".  

The spec really needs to be consistent about whether it means "the document the element is actually in" (which might be null) or "the element's ownerDocument" (never null).

As things stand, for example, I can't tell which of the two meanings is meant at http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflect when talking about attributes of type HTMLElement.
Comment 2 Ian 'Hixie' Hickson 2011-07-28 01:28:36 UTC
When it means the definition at the top of comment 1, it's hyperlinked to the definition, so that should help clarify the meaning of the case mentioned at the bottom of comment 1.

Any suggestion as to better wording for one or both of these?
Comment 3 Boris Zbarsky 2011-07-28 02:47:04 UTC
I think that when you mean "the ownerDocument is an HTML document" you should say it exactly that way.  ;)

For the other, perhaps make the phrase "in a document tree" (and keep the linkage)?
Comment 4 Michael[tm] Smith 2011-08-04 05:16:42 UTC
mass-move component to LC1
Comment 5 Ian 'Hixie' Hickson 2011-08-15 05:21:59 UTC
(In reply to comment #3)
> I think that when you mean "the ownerDocument is an HTML document" you should
> say it exactly that way.  ;)

Yeah, but that's kinda verbose, and many of the places where this occurs are already pretty wordy, and many of the rest don't lend themselves to that phraseology. :-/


> For the other, perhaps make the phrase "in a document tree" (and keep the
> linkage)?

I think that's a step backwards actually, because an orphan subtree is still a kind of "document tree" (or "document object model tree"), just not one with a Document node at the top. So it wouldn't really clarify things IMHO.


Looking at this more closely, it seems every occurrence of referencing "HTML Documents" to mean ownerDocuments that have the HTML flavour of the APIs has a hyperlink, and every occurrence of "in a Document" meaning "is the descendant of a Document object" is also hyperlinked, and the remainder aren't actually cases of "in a document" so much as cases of the possessive form of Document used in the context of a Node or content attribute, in which case the meaning is that of ownerDocument.

I think a general fix is going to be impractical here.

There are still some specific cases that might be confusing (e.g. where I haven't used quite the same consistent terminology). I suggest raising those as individual cases (either here or in other bugs) so that we can improve them specifically. Would that be sufficient?

If you think a general approach would be better, could you give specific examples of how you'd fix a dozen or so of the cases you're worried about, to show me that I'm wrong about it being impractical?
Comment 6 Anne 2011-08-15 16:55:10 UTC
This bug is no longer valid now this moved to DOM Core I think. Is there anything besides that obsolete section that used this incorrectly?
Comment 7 Ian 'Hixie' Hickson 2011-08-23 00:09:24 UTC
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 comment 5 and comment 6
Comment 8 Boris Zbarsky 2011-08-23 02:32:04 UTC
Fwiw, what was really needed here is someone to go through uses of "in an HTML Document" and make sure they all made sense.  It sounds like Ian has done that, so things are fine....
Comment 9 Anne 2011-08-23 08:17:49 UTC
What has been done is that a section that relies on this concept heavily moved to DOM Core. Other than that I am not so sure.