Re: Namespace treatment

james anderson wrote:
> 
> In any case, the issue of early/late binding is independent of where the
> URI (or prefix) is bound. The dom binds it to the element node. The
> alternative would have been to make the name itself a first class node
> and bind the URI there. Whether it is then late or early bound is a
> separate issue.

I believe that I was the one who introduced the terminology of early/late
binding in this situation, and it was in recognition of something that
didn't get brought up yet on this thread:  folk regularly implement DOM
using specialized subclasses to express behaviors of element types.

So for example an XHTML "img" node might well know how to render itself
and incrementally fetch an image -- but the "p" node would instead be
smart about reflowing contained inline text content.  Good non-browser
examples exist too, not limited to additional methods in HTML DOM nodes.

Given that recognition, it's clear that "early" bindings need to be
accomodated in some way, since the class implementing a DOM node can't
be changed after-the-fact ... and  those behaviors are exactly the ones
that folk intend to associate with elements, based on namespace IDs.

For nodes that don't implement such specialized behaviors, it is true
that "late" binding could work just fine; names could just be another
kind of attribute for elements (and attributes etc).  At this time, DOM
doesn't support such a notion though.

- Dave

Received on Monday, 6 March 2000 11:15:01 UTC