Re: Nodes as NodeLists?

>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 UTC