Re: New DOM Level 2 Working Draft

"Stephen R. Savitzky" wrote:
> 
> 	[ re Attr.ownerElement ]
>
> 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.

It shouldn't be "parent" since attributes aren't children and you
can't enumerate them like children.  Were they ducks, they'd quack;
but they don't ...

Yes, I certainly did expect (way back when) that Attr values would
be sharable.  But somehow the L1 spec got a rule that precluded that,
by requiring INUSE_ATTRIBUTE_ERR to be reported.  So now we're stuck
with nonsharable attributes ... this L2 change is just making implicit
state explicit, making the best of a not so good situation (IMHO).


> Support for DTD's was on the list for Level 2, too; I'm not holding my
> breath.

It recently dawned on me that the basic reason I find the "DocumentType"
support in DOM (L1 and L2) to be useless is that it exposes no "Type"
information whatsoever!

The notation (and unparsed entity) stuff needs to be used in conjunction
with attribute typing information -- which isn't available.  And the most
powerful typing facility, content models, is likewise hidden.

In L2 we find minor tweaks (expose public/system IDs) that don't even help
anyone recognize that these two doctypes are equivalent:

	<!DOCTYPE foo SYSTEM "bar.dtd">
	<!DOCTYPE foo [ <!ENTITY % bar SYSTEM "bar.dtd"> %bar; ]>

Oh well ... I was just amused to notice what seems to be the root of the
problem (a "Type" class with no type info); maybe I'm too easily amused.

- Dave

Received on Monday, 27 September 1999 12:28:16 UTC