[DOMCore] Traversal

DOM Traversal was not yet updated to meet our new requirements for robust  
specifications so over the past couple of days I attempted doing that. The  
result can be read in:

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#traversal

I fixed a number of issues with the old specification and included some  
suggestions from this list. This is a rough summary of what has changed  
apart from the new way of defining these features:

* The entityReferenceExpansion from the constructor methods is gone. As is  
the expandEntityReferences attribute. Nobody does entity reference nodes.

* acceptNode() now uses unsigned short.

* The constructor method arguments except for the first argument are now  
optional. whatToShow defaults to SHOW_ALL (in WebKit it currently defaults  
to 0 which is rather useless).

* Instead of throwing a NOT_SUPPORTED_ERR when the first argument is null  
it lets Web IDL decide what should be done there by not using the ? syntax  
in the IDL.

* Recursive invocation (i.e. from the filter) is prohibited and throws  
INVALID_STATE_ERR as is already the case in Opera and Gecko. (WebKit does  
not always do it.)

* The proprietary attributes referenceNode and pointerBeforeReferenceNode  
on NodeIterator as found in WebKit and Gecko have been added.

I included it in DOM Core because all the terminology is shared and the  
constructor methods for NodeIterator and TreeWalker are on Document.

Feedback very much appreciated!


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Friday, 22 July 2011 16:02:37 UTC