Re: Query regarging nodeName and getTagName()

Lauren Wood <lauren@sqwest.bc.ca> writes:

> No, nodeName returns elementExample as well.

In that case, getTagName is redundant.  I suppose it's in there for
compatibility with some existing scripting language?  In any case, the
situation needs to be clarified.

> >It would seem essential that the nodeName contain the ID, because that's the
> >only way you can use NamedNodeMap to represent the ID/NAME namespace, but
> >it's not really clear in the specification.
> 
> This only works in the HTML specification, where you can use 
> HTMLDocument.getElementById(in wstring elementId); and 
> HTMLDocument.getElementsByName(in wstring elementName);

Doesn't XML have ID as an attribute type as well?  We'll leave aside the
question of whether NamedNodeMap was ever intended to be used as a
general-purpose associative map the way NamedNodeList was -- obviously it
isn't. 

> We're planning on doing a filter/query language in Level 2 to give people
> that functionality for XML as well; it gets a little more complicated when
> an attribute can be called ID but not be of type ID, or be of type ID but
> not be called ID.

True.  Oh, well; I'll just go ahead and implement AssociativeNodeMap.

-- 
 Stephen R. Savitzky   Chief Software Scientist, Ricoh Silicon Valley, Inc., 
<steve@rsv.ricoh.com>                            California Research Center
 voice: 650.496.5710   fax: 650.854.8740    URL: http://rsv.ricoh.com/~steve/
  home: <steve@starport.com> URL: http://www.starport.com/people/steve/

Received on Tuesday, 28 July 1998 18:37:38 UTC