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 13480 - Misuse of "child nodes" term
Summary: Misuse of "child nodes" term
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-30 21:09 UTC by Jirka Kosek
Modified: 2011-08-05 15:33 UTC (History)
7 users (show)

See Also:


Attachments

Description Jirka Kosek 2011-07-30 21:09:17 UTC
The specification uses terms "direct child" and "child" in way that's equivalent to "child" and "descendant" terms in XPath world. Ideally this less ambiguous terminology should be used. If not, at least terms "direct child" and "child" should be properly defined to prevent confusion to people coming from XML world.
Comment 1 Anne 2011-07-30 22:01:05 UTC
I think they mean the same thing in HTML. It should probably just stick to child. Where do you think "child" means "descendant"?
Comment 2 Ian 'Hixie' Hickson 2011-07-30 23:45:13 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: Accepted
Change Description: see diff given below
Rationale: The term "child" is used in the HTML spec in its regular computer science sense. I've no idea if that's the same as what XPath does, but it is consistent with usage in the DOM specs, the CSS specs, and Wikipedia's various pages on related topics.

Since the word "direct" may be the source of this confusion, I've removed that word where it was redundant.
Comment 3 contributor 2011-07-30 23:45:33 UTC
Checked in as WHATWG revision r6340.
Check-in comment: Remove confusing use of the word 'direct'.
http://html5.org/tools/web-apps-tracker?from=6339&to=6340
Comment 4 Jirka Kosek 2011-07-31 07:10:39 UTC
In section 4.2.6 The style element in description of scoped attribute:

"If the scoped attribute is present, then the user agent must apply the specified style information only to the style element's parent element (if any), and that element's *child nodes*. Otherwise, the specified styles must, if applied, be applied to the entire document."

I think that logical would be to apply scoped style to its parent element and all parent's descendants, not only childs. So either description of scope is wrong or I don't understand how it works. This probably make me think that usage of child/direct child is wrong in the spec.
Comment 5 Aryeh Gregor 2011-08-02 16:08:35 UTC
That seems wrong, yeah.  It should say "descendants".  If you want to xref a definition, DOM Core has concept-tree-child, concept-tree-descendant, etc. (I'm now xref'ing these consistently in my specs).
Comment 6 Michael[tm] Smith 2011-08-04 05:36:27 UTC
mass-move component to LC1
Comment 7 Ian 'Hixie' Hickson 2011-08-05 15:30:35 UTC
Wow, yeah, I have no idea what I was smoking when I wrote that. Fixed.

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: Accepted
Change Description: see diff given below
Rationale: see comment 5

I didn't add cross-references since the terms are used all over the place and they're normal computer science terms used with their regular meaning.
Comment 8 contributor 2011-08-05 15:33:20 UTC
Checked in as WHATWG revision r6375.
Check-in comment: thinko
http://html5.org/tools/web-apps-tracker?from=6374&to=6375