W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2008

Setting EntityReference.nodeValue and EntityReference.prefix

From: Eric Seidel <eric@webkit.org>
Date: Tue, 5 Feb 2008 22:21:35 -0800
Message-Id: <CE45DA9C-C711-474F-9146-2718517B28A0@webkit.org>
To: www-dom@w3.org
Cc: Maciej Stachowiak <mjs@apple.com>

The spec text for both Node.nodeValue and Node.prefix contain the text:
"When it is defined to be null, setting it has no effect, including if  
the node is read-only."

Yet under the explanation text for "Exceptions on setting:  
NO_MODIFICATION_ALLOWED_ERR", we find the following text:

Node.nodeValue, NO_MODIFICATION_ALLOWED_ERR:
Raised when the node is readonly and if it is not defined to be null.

Node.prefix, NO_MODIFICATION_ALLOWED_ERR:
Raised if this node is readonly.

EntityReferences are always readonly nodes.  The spec seems ambiguous  
here.  The main text for each property would suggest that neither  
should raise if the property value is always defined to be null.   
However, the exception explanations suggest that entityRef.nodeValue =  
'foo' should not raise (silently fail) and yet entityRef.prefix =  
"foo" should fail with NO_MODIFICATION_ALLOWED_ERR.

Please clarify.  Thanks!

-eric
Received on Wednesday, 6 February 2008 06:27:29 GMT

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