Re: Nodes as NodeLists?

At 08:29 PM 4/28/98 -0400, Jeff wrote:
>>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

A NodeIterator would make sense here ... I'll bring this up in the WG.

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

I'll revisit the wording here and make sure it is clearer and matches the
WG's sense of how this should work.

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

This also makes sense to me ... I'll bring it up.

Thanks for the suggestions,

Mike Champion

Received on Tuesday, 28 April 1998 22:51:25 UTC