W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: Element name

From: <keshlam@us.ibm.com>
Date: Wed, 24 May 2000 10:58:19 -0400
cc: "DOM ML" <www-dom@w3.org>
Message-ID: <852568E9.00523AA2.00@D51MTA03.pok.ibm.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT