W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [selectors-api] LCWD comments

From: Krzysztof Maczyński <1981km@gmail.com>
Date: Thu, 29 Jan 2009 22:09:12 +0100
Message-ID: <6AB237079D324E0DBD0250DD492995D2@kmPC>
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>
Cc: <public-webapps@w3.org>

> I'm not familiar with XPath's usage of the term. Please explain why this 
> is a problem for two completely orthogonal specs to define the same term 
> with different meaning?
Well, it's potentially confusing, I can easily imagine e.g. myself having to say "context node (in CSS sense)", and I see no reason not to call it a scoping node or something instead. If you do see one however about which you feel strongly, I don't intend to oppose fervently. There are already similar cases, the most famous being the term entity (SGML vs. HTTP).
> I cannot find an alternative term that would be appropriate.  However, I 
> have adjusted its definition to refer to the nodes as a collection 
> rather than a tree.
But you still call it a subtree, thus a tree, which it definitely needn't be. (Only now have I clearly understood that you don't want an element E to equal E.querySelector("*"). May be just as reasonable or more so than the opposite, but what's the rationale, by the way?) It's about as bad as if you have written (in the same fragment):
> The term *last* used in the definitions of the querySelector methods means first in document order.
I believe customary allowance for local redefinitions of pretty much anything shouldn't be used to gratuituously mislead people. So with this (a collection of elements, whereby there may be no common ancestor included, being construed as a tree) I'm not satisfied. I suggest to reword as follows (or, which I think would be an even better solution, put phrases like "except the scoping node itself" in a few places):
The term document order is defined in [DOM-LEVEL-3-CORE]. The term scoping node refers to the node upon which the method was invoked. The term node’s subelements refers to the collection of elements that are descendantsof the scoping node.
Referencing [DOM-LEVEL-3-CORE] seems prudent anyway, especially given that their definition is more general. Any two nodes in the same document can be compared, without mentioning any particular subtree they're both in. (And again, your assumption that what you described always forms a tree is false, rendering your definition inapplicable.)

I've just spotted one more issue:
> definitions of the querySelector methods
Is the plural intended?

Best regards,

Received on Thursday, 29 January 2009 21:12:24 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:13 UTC