- From: Lauren Wood <lauren@sqwest.bc.ca>
- Date: Tue, 28 Jul 1998 15:08:51 -0700
- To: www-dom@w3.org
At 28/07/98 03:03 PM , Stephen R. Savitzky wrote: > >In the documentation for Element, it is specified that, in the following >example, > <elementExample id="demo"> > ... > </elementExample> > >getTagName returns "elementExample". Would the attribute nodeName contain >"demo" in this case? If that's true, perhaps getTagName should be renamed >something like getElementTag, or nodeName renamed nodeID. No, nodeName returns elementExample as well. >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); 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. Lauren
Received on Tuesday, 28 July 1998 18:08:42 UTC