Re: Element name

In any component architecture, there will be some values which are
immutable. In the DOM, the node name is one of those.

>But why i cannot change it ?? Is there a reason ?

Architectural argument: Because the node name is part of the basic identity
of the node. Changing it would be like trying to change an Element into a
Processing instruction.

Practical argument: Some specialized DOMs may actually use different object
classes to represent different types of Elements. In those, changing the
name might require changing the object class, which becomes very ugly, very
quickly, We didn't want to forbid that, or require that DOM authors fight
their way around our design, so we had to forbid changing the node name.

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 24 May 2000 10:59:03 UTC