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

Re: readonly nodes

From: Rahul Srivastava <Rahul.Srivastava@Sun.COM>
Date: Thu, 18 Apr 2002 15:14:33 +0000 (Asia/Calcutta)
Message-Id: <200204180952.g3I9qJF08835@blr-root.India.Sun.COM>
To: plh@w3.org
Cc: www-dom@w3.org, Curt.Arnold@hyprotech.com, Amit.Handa@Sun.COM
> Philippe Le Hegaret wrote...
> 
> > On Wed, 2002-04-17 at 10:53, Rahul Srivastava wrote:
> > > Arnold, Curt wrote...
> > > 
> > > 
> > > Basically, the WG decided that the explicit statement that setting a
> > > nodeValue has no effect when nodeValue is defined to be null took precedence
> > > over throwing an exception when the node is readonly.
> > 
> > As of today DOM L1 SE, L2, L3 say:
> > "The value of this node, depending on its type; see the table above. When it is 
> > definied to be null, setting it has no effect".
> > 
> > But no one, neither errata says that no effect takes precedence over throwing 
> > exception.
> > 
> > Is the precedence clause going to be in DOM L1 SE, L2 errata and L3?
> 
> It is going to be a L2 erratum and included in L3. Regarding DOM L1 SE,
> no further developement are planned on it. Someone suggested a few
> months ago that it would be better to remove it.
> 

Thanks for the clarification Philippe. Does this means L2/L3 are not backward compatible 
with L1 on this issue?.

DOM L1 REC says:
----------------
DocumentType - "The DOM Level1 doesn't support editing DocumentType nodes". 
Does it mean DocumentType nodes are readonly?.

Notation - "The DOM Level1 doesn't support editing Notation nodes; they are 
therefore readonly". This means Notation nodes are readonly. 

Entity - "The DOM Level1 doesn't support editing Entity nodes; ....All 
descendants of an Entity node are readonly". This means Entity nodes itself are 
not readonly. 

EntityReference - "As with Entity node, all descendants of the EntityReference 
are readonly". This means EntityReference nodes itself are not readonly. 

Per L1 REC, only Notation is a readonly node.
Further,
DOM L1 REC says:
nodeValue - The value of this node, depending on its type; see the table above.
NO_MODIFICATION_ALLOWED_ERR: Raised when node is readonly.

Should setNodeValue() for Notation throw an exception or L1 SE should be referred?


DOM L1 WD SE differes with L1 REC:
----------------------------------
Entity - "The DOM Level1 doesn't support editing Entity nodes; ....Entity nodes 
and all their descendants are readonly". This means Entity nodes are readonly. 
The table has a value null for this node.

EntityReference - "As for Entity nodes, EntityReference nodes and all their 
descendants are readonly". This means EntityReference nodes are readonly. The 
table has a value null for this node.

Per L1 SE Notation, Entity and EntityReference nodes are readonly.
Further,
DOM L1 WD SE says:
nodeValue - The value of this node, depending on its type; see the table above. 
When it is defined to be null, setting it has no effect.
NO_MODIFICATION_ALLOWED_ERR: Raised when node is readonly.

Should setNodeValue() for Notation, Entity and EntityReference throw an exception?. If L1 
SE is thought to be removed, what is the resolution for L1 REC?. Perhaps an erratum 
should suffice.!?

Thanks,
Rahul.

Ps: I agree w/ Joe that at the first place setNodeValue() should not be invoked for nodes 
which have a null value as per the table. But, it is always nice for the spec to be clear 
in such places to avoid any confusion.
Received on Thursday, 18 April 2002 05:53:00 GMT

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