W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: Nodes as NodeLists?

From: Jeff <jmackay@enteract.com>
Date: Tue, 28 Apr 1998 19:29:50 -0500
Message-ID: <001801bd7305$ec326bc0$dc8ae5cf@jmackay-4.soho.enteract.com>
To: <www-dom@w3.org>
>A node can have children, so the "collections" such as the external and
>internal subsets are stored as the set of children of the Node off of
>DocumentType.

But in reality, the "container" nodes aren't really nodes.  Which means that
a node in the DOM doesn't always translate into a "node" in the document.
Wouldn't it make more sense just to use a node iterator (or a NodeList, or
for entity, attribute, and notation definitions a NamedNodeList) instead?

>
>>How can an ElementDefinition belong to both the external subset and the
>>elementDefinitions node?
>
>I don't follow ... What are you referring to in the DOM spec that is
unclear?

The spec isn't very clear (or I'm just being dense).  A DocumentType can
have an internal and external subset which would contain all the
declarations found in the corresponding physical subset. But wouldn't each
ElementDefinition also be found as children of the node returned by
DocumentType.getElementTypes?

Also, there are no methods to retrieve an element definition by name.  To do
that, I'd have to iterate through the children each time I needed an element
definition...
Received on Tuesday, 28 April 1998 20:29:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT