ElementTraversal comments

Some comments on  
http://dev.w3.org/2006/webapi/ElementTraversal/publish/ElementTraversal.html  
below

* As mentioned on IRC, node types should probably be capitalized. E.g.  
Text instead of text.

* It's not clear from the introduction why we need childElementCount.  
Having both linked list and array like traversing for the DOM is already  
slightly unclear to me, but childElementCount seems to provide neither.

* I don't understand why 1.1 is marked as informative and section 1. is  
not.

* 2. talks about implementing methods where you mean attributes.

* In 2. ElementTraversal is not marked up.

* I don't understand "A User Agent may implement similar interfaces in  
other specifications, but such implementation is not required for  
conformance to this specification, if the User Agent is designed for a  
minimal code footprint." I suggest dropping this sentence.

* It's not clear to me how "For the purpose of ElementTraversal, an entity  
reference node which represents an element must be treated as an element  
node." works. Does this mean that an EntityReference node also implements  
this interface? I suggest dropping this sentence or stating that this  
interface assumes that all entities are normalized away or something. (We  
should really get rid of syntactic sugar in the DOM in due course...)

* "Accessing this attribute of an element must return a reference to the  
first child node of that element which is of nodeType 1, as an Element  
object." I don't think ", as an Element object." makes much sense in this  
sentence. (Likewise for similar sentences.)

* I don't think the IDL should be in the appendix. It's a useful overview  
of what the draft defines. I would also like to see pointers from the IDL  
bits to their definitions. As we've done in the XMLHttpRequest  
specification.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 25 February 2008 21:20:58 UTC