- From: Stephen R. Savitzky <steve@rsv.ricoh.com>
- Date: 27 Sep 1999 08:33:48 -0700
- To: Arnaud Le Hors <lehors@w3.org>
- Cc: www-dom@w3.org
Arnaud Le Hors <lehors@w3.org> writes: > "Stephen R. Savitzky" wrote: > > > > 1. The ownerElement method of Attr conflicts with the statement that > > "attributes are not part of the document tree". Unless I'm missing > > something, ownerElement is essentially the same as parentNode, and means > > that Attr's cannot be shared. > > This is correct but it isn't new. DOM Level 1 already prohibits you from > sharing an Attr node. Indeed, setAttributeNode() raises an > INUSE_ATTRIBUTE_ERR DOMException if you try. Given that, we decided to > go ahead and add ownerElement which a lot of people have requested. So why not just use parentNode like everything else does? I was under the impression that the reason for making parentNode return null from an Attr was so that attribute nodes that are defined with default values in the DTD can be shared among all the elements that use them. > > 2. There doesn't seem to be any way to create an Iterator from a NodeList or > > NamedNodeMap. In this regard it is also unfortunate that NamedNodeMap is > > not an extension of NodeList. > > > > 3. Ideally, all methods that return NodeList should be deprecated and > > replaced by methods that return an equivalent Iterator. > > > > 4. A Document should be able to import a TreeWalker. > > All of these can be added later so there is no real harm not to have > them now. And something gets added when someone thinks it is necessary > enough to lobby for it and can convince the rest of the group it really > is necessary. The problem is that a lot of things in the "can be added later" category aren't. Anyway, the one that's most important is adding methods to create a NodeIterator from a NodeList and NamedNodeMap to DocumentTraversal. The advantage is that it allows the programmer to select more favorable semantics for operations that would otherwise be prohibitively expensive. > > 6. There still doesn't seem to be any way to represent all of the > > information in a DTD. Among other things, shouldn't there be a "notation" > > attribute of "Attr"? I believe that not including all of the DTD > > information violates the claim that "... For XML, this is specified by > > the W3C XML Information Set [Infoset]. The DOM is simply an API to this > > information set", since the XML Information Set includes the complete DTD. > > I don't know where you got that from but it is incorrect. The XML > Information Set only includes some information from the DTD. It doesn't > include an element content type for instance. Anyway, support for DTDs > and schemas is definitely on our list for DOM Level 3. Stay tuned. -- I got the phrase "The DOM is simply an API to this information set" directly out of the Level 2 spec. If it's incorrect, please remove it. Support for DTD's was on the list for Level 2, too; I'm not holding my breath. -- Stephen R. Savitzky <steve@rsv.ricoh.com> <http://rsv.ricoh.com/~steve/> Quote of the month: Death is nature's way of telling you to slow down. Chief Software Scientist, Ricoh Silicon Valley, Inc. Calif. Research Center voice: 650.496.5710 front desk: 650.496.5700 fax: 650.854.8740 home: <steve@theStarport.org> URL: http://theStarport.org/people/steve/
Received on Monday, 27 September 1999 11:34:26 UTC