RE: DOM 3 Core: Overlap with JAXP, Document order of attributes, getChildElementsByTagName, Exceptions

>> getChildElementsByTagName:

>I agree the name is misleading. It should really be called something
>like getDescendantsByTagName(). Now, do we need another method for
>immediate children? I personally think people are really lazy, 

Amen, but then they post a question on svg-developer or some other
forum thinking it is a bug instead of a feature and then need to
be taught how to iterate on nodes.

>the cost of looking for this themselves by walking the list of children is minor
>and there is little hope the implementation can do better. 

If the DOM was local and in-memory, I would agree, but if the DOM is 
out-of-process or a API for a datastore, then the difference could
be pretty substantial.  

Also, it is a place where users who aren't concerned about 
portability will go use implementation specific methods like
selectNode() and selectSingleNode()in MSXML.  Definitely not
suggesting adding calls that require an XPath implementation,
but I would think an audit of the uses of selectNode()
and selectSingleNode() would find that the pattern is almost 
always a tagName and that comparable DOM methods would be
widely used.

> Exceptions:
> 
>That's an interesting idea. I'll forward that one to the WG too.
>Thanks for your input!

I'm not sure what the answer to that one is, but it is a pain.  If you
look at the NIST ECMAScript DOM 1 tests, they were trying to examine
message strings and reading tea leaves to
try to guess what exception was intended.  Of course,
logic was specific to a particular implementation (MSXML) in
a particular locale (US English).  It might be something that is 
specific to the ECMAScript binding, since it doesn't affect Java
implementations.

Received on Tuesday, 15 May 2001 20:49:28 UTC